[vlc-devel] [PATCH 11/14] contrib: ncurses: fix building on OSX 10.9 with clang

Vittorio Giovara vittorio.giovara at gmail.com
Mon Jun 30 21:04:31 CEST 2014


---
 contrib/src/ncurses/datarootdir.patch | 214448 +++++++++++++++++++++++++++++++
 contrib/src/ncurses/rules.mak         |      1 +
 2 files changed, 214449 insertions(+)
 create mode 100644 contrib/src/ncurses/datarootdir.patch

diff --git a/contrib/src/ncurses/datarootdir.patch b/contrib/src/ncurses/datarootdir.patch
new file mode 100644
index 0000000..fbad7e1
--- /dev/null
+++ b/contrib/src/ncurses/datarootdir.patch
@@ -0,0 +1,214448 @@
+From 12dfccfa0ceda96045fcad1518bf030d2172532d Mon Sep 17 00:00:00 2001
+From: "Thomas E. Dickey" <tom at invisible-island.net>
+Date: Thu, 26 Jun 2014 21:05:30 -0400
+Subject: [PATCH] 20130504
+
+Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
+---
+ Ada95/aclocal.m4                       |   1085 +-
+ Ada95/configure                        |   4603 +-
+ Ada95/configure.in                     |    115 +-
+ Ada95/doc/Makefile.in                  |      3 +-
+ Ada95/gen/Makefile.in                  |     12 +-
+ Ada95/gen/gen.c                        |     45 +-
+ Ada95/include/ncurses_defs             |      7 +-
+ Ada95/samples/Makefile.in              |      7 +-
+ Ada95/src/Makefile.in                  |     32 +-
+ INSTALL                                |    100 +-
+ MANIFEST                               |     27 +-
+ Makefile.in                            |     13 +-
+ NEWS                                   |   1234 +-
+ README                                 |     17 +-
+ README.MinGW                           |     93 +-
+ aclocal.m4                             |   1519 +-
+ announce.html.in                       |     63 +-
+ c++/Makefile.in                        |    111 +-
+ c++/cursesapp.h                        |     21 +-
+ c++/cursesf.cc                         |     12 +-
+ c++/cursesf.h                          |     14 +-
+ c++/cursesm.cc                         |     10 +-
+ c++/cursesm.h                          |     13 +-
+ c++/cursesp.h                          |      6 +-
+ c++/cursespad.cc                       |     54 +-
+ c++/cursesw.cc                         |      7 +-
+ c++/cursesw.h                          |     11 +-
+ c++/cursslk.cc                         |      9 +-
+ c++/demo.cc                            |      9 +-
+ c++/etip.h.in                          |     18 +-
+ c++/internal.h                         |      6 +-
+ c++/modules                            |     21 +-
+ config.guess                           |    249 +-
+ config.sub                             |    196 +-
+ configure                              |   7245 +-
+ configure.in                           |    510 +-
+ dist.mk                                |      6 +-
+ doc/html/man/adacurses-config.1.html   |      2 +-
+ doc/html/man/captoinfo.1m.html         |     11 +-
+ doc/html/man/clear.1.html              |      2 +-
+ doc/html/man/curs_add_wch.3x.html      |     24 +-
+ doc/html/man/curs_add_wchstr.3x.html   |     79 +-
+ doc/html/man/curs_addch.3x.html        |      5 +-
+ doc/html/man/curs_addchstr.3x.html     |     67 +-
+ doc/html/man/curs_addstr.3x.html       |     47 +-
+ doc/html/man/curs_addwstr.3x.html      |     54 +-
+ doc/html/man/curs_attr.3x.html         |      2 -
+ doc/html/man/curs_bkgrnd.3x.html       |      6 +-
+ doc/html/man/curs_border_set.3x.html   |      6 +-
+ doc/html/man/curs_get_wch.3x.html      |      6 +-
+ doc/html/man/curs_get_wstr.3x.html     |      6 +-
+ doc/html/man/curs_getcchar.3x.html     |      6 +-
+ doc/html/man/curs_getch.3x.html        |     20 +-
+ doc/html/man/curs_in_wchstr.3x.html    |      6 +-
+ doc/html/man/curs_inopts.3x.html       |     52 +-
+ doc/html/man/curs_ins_wstr.3x.html     |      6 +-
+ doc/html/man/curs_inwstr.3x.html       |      6 +-
+ doc/html/man/curs_mouse.3x.html        |      4 +-
+ doc/html/man/curs_sp_funcs.3x.html     |     50 +-
+ doc/html/man/curs_termattrs.3x.html    |     10 +-
+ doc/html/man/curs_termcap.3x.html      |    129 +-
+ doc/html/man/curs_terminfo.3x.html     |      6 +-
+ doc/html/man/curs_threads.3x.html      |      8 +-
+ doc/html/man/curs_util.3x.html         |     91 +-
+ doc/html/man/form.3x.html              |      2 +-
+ doc/html/man/form_field.3x.html        |      6 +-
+ doc/html/man/form_field_buffer.3x.html |      4 +-
+ doc/html/man/form_fieldtype.3x.html    |      4 +-
+ doc/html/man/infocmp.1m.html           |    282 +-
+ doc/html/man/infotocap.1m.html         |      6 +-
+ doc/html/man/menu.3x.html              |      2 +-
+ doc/html/man/menu_driver.3x.html       |     46 +-
+ doc/html/man/menu_items.3x.html        |      6 +-
+ doc/html/man/ncurses.3x.html           |    611 +-
+ doc/html/man/ncurses5-config.1.html    |      7 +-
+ doc/html/man/panel.3x.html             |     42 +-
+ doc/html/man/resizeterm.3x.html        |      8 +-
+ doc/html/man/tabs.1.html               |      6 +-
+ doc/html/man/term.7.html               |     10 +-
+ doc/html/man/term_variables.3x.html    |      4 +-
+ doc/html/man/terminfo.5.html           |   1321 +-
+ doc/html/man/tic.1m.html               |    265 +-
+ doc/html/man/toe.1m.html               |     16 +-
+ doc/html/man/tput.1.html               |    128 +-
+ doc/html/man/tset.1.html               |    149 +-
+ doc/html/ncurses-intro.html            |      5 +-
+ doc/ncurses-intro.doc                  |      1 +
+ form/Makefile.in                       |      7 +-
+ form/fld_arg.c                         |      6 +-
+ form/fld_def.c                         |     27 +-
+ form/fld_dup.c                         |      8 +-
+ form/fld_ftchoice.c                    |      6 +-
+ form/fld_ftlink.c                      |     10 +-
+ form/fld_just.c                        |      6 +-
+ form/fld_link.c                        |      8 +-
+ form/fld_max.c                         |      8 +-
+ form/fld_move.c                        |      8 +-
+ form/fld_page.c                        |      8 +-
+ form/fld_stat.c                        |      8 +-
+ form/form.priv.h                       |      9 +-
+ form/frm_def.c                         |     24 +-
+ form/frm_driver.c                      |    164 +-
+ form/frm_hook.c                        |      6 +-
+ form/frm_opts.c                        |     10 +-
+ form/frm_page.c                        |      6 +-
+ form/frm_post.c                        |      8 +-
+ form/frm_req_name.c                    |     21 +-
+ form/fty_generic.c                     |      6 +-
+ form/fty_int.c                         |      7 +-
+ form/fty_num.c                         |      7 +-
+ form/fty_regex.c                       |     14 +-
+ include/Caps                           |     18 +-
+ include/Caps.aix4                      |     18 +-
+ include/Caps.hpux11                    |     18 +-
+ include/Caps.keys                      |     18 +-
+ include/Caps.osf1r5                    |      6 +-
+ include/MKkey_defs.sh                  |      9 +-
+ include/MKterm.h.awk.in                |     39 +-
+ include/curses.h.in                    |    220 +-
+ include/curses.tail                    |      4 +-
+ include/curses.wide                    |    138 +-
+ include/headers                        |     17 +-
+ include/nc_alloc.h                     |     14 +-
+ include/nc_string.h                    |     77 +
+ include/nc_termios.h                   |    171 +
+ include/nc_tparm.h                     |      8 +-
+ include/ncurses_defs                   |     19 +-
+ include/ncurses_mingw.h                |    100 +-
+ include/term_entry.h                   |     66 +-
+ include/tic.h                          |     35 +-
+ man/Makefile.in                        |      3 +-
+ man/curs_add_wch.3x                    |      6 +-
+ man/curs_add_wchstr.3x                 |     64 +-
+ man/curs_addchstr.3x                   |     50 +-
+ man/curs_addstr.3x                     |     38 +-
+ man/curs_addwstr.3x                    |     35 +-
+ man/curs_bkgrnd.3x                     |      6 +-
+ man/curs_border_set.3x                 |      6 +-
+ man/curs_get_wch.3x                    |      6 +-
+ man/curs_get_wstr.3x                   |      6 +-
+ man/curs_getcchar.3x                   |      6 +-
+ man/curs_getch.3x                      |     12 +-
+ man/curs_in_wchstr.3x                  |      6 +-
+ man/curs_inopts.3x                     |     47 +-
+ man/curs_ins_wstr.3x                   |      6 +-
+ man/curs_inwstr.3x                     |      6 +-
+ man/curs_overlay.3x                    |     26 +-
+ man/curs_termcap.3x                    |     61 +-
+ man/curs_terminfo.3x                   |      8 +-
+ man/curs_threads.3x                    |      8 +-
+ man/curs_util.3x                       |     88 +-
+ man/form_field.3x                      |      6 +-
+ man/infocmp.1m                         |    176 +-
+ man/menu_items.3x                      |      6 +-
+ man/ncurses.3x                         |    142 +-
+ man/resizeterm.3x                      |      6 +-
+ man/tabs.1                             |     20 +-
+ man/term.7                             |      6 +-
+ man/term_variables.3x                  |      6 +-
+ man/terminfo.head                      |     15 +-
+ man/terminfo.tail                      |    188 +-
+ man/tic.1m                             |    194 +-
+ man/toe.1m                             |     21 +-
+ man/tput.1                             |     35 +-
+ man/tset.1                             |     39 +-
+ menu/Makefile.in                       |      7 +-
+ menu/m_attribs.c                       |      6 +-
+ menu/m_driver.c                        |     12 +-
+ menu/m_format.c                        |     20 +-
+ menu/m_global.c                        |     38 +-
+ menu/m_hook.c                          |      6 +-
+ menu/m_item_new.c                      |     21 +-
+ menu/m_pad.c                           |      6 +-
+ menu/m_post.c                          |     40 +-
+ menu/m_req_name.c                      |     19 +-
+ menu/m_spacing.c                       |     10 +-
+ menu/menu.priv.h                       |     15 +-
+ menu/mf_common.h                       |     18 +-
+ misc/Makefile.in                       |     10 +-
+ misc/gen-pkgconfig.in                  |     86 +-
+ misc/gen_edit.sh                       |     72 +-
+ misc/ncurses-config.in                 |     49 +-
+ misc/run_tic.in                        |      7 +-
+ misc/terminfo.src                      |   1357 +-
+ mk-0th.awk                             |     91 +-
+ mk-1st.awk                             |    118 +-
+ mk-dlls.sh.in                          |    114 -
+ ncurses-5.9-20130504-patch.sh          | 106265 ++++++++++++++++++++++++++++++
+ ncurses/Makefile.in                    |     22 +-
+ ncurses/base/MKkeyname.awk             |     13 +-
+ ncurses/base/MKlib_gen.sh              |     43 +-
+ ncurses/base/MKunctrl.awk              |      6 +-
+ ncurses/base/keybound.c                |      9 +-
+ ncurses/base/keyok.c                   |     64 +-
+ ncurses/base/lib_addch.c               |     16 +-
+ ncurses/base/lib_addstr.c              |     10 +-
+ ncurses/base/lib_beep.c                |     11 +-
+ ncurses/base/lib_bkgd.c                |     11 +-
+ ncurses/base/lib_color.c               |     89 +-
+ ncurses/base/lib_dft_fgbg.c            |      5 +-
+ ncurses/base/lib_driver.c              |     22 +-
+ ncurses/base/lib_flash.c               |     20 +-
+ ncurses/base/lib_freeall.c             |     20 +-
+ ncurses/base/lib_getch.c               |     39 +-
+ ncurses/base/lib_getstr.c              |      6 +-
+ ncurses/base/lib_insch.c               |      8 +-
+ ncurses/base/lib_instr.c               |     14 +-
+ ncurses/base/lib_mouse.c               |    415 +-
+ ncurses/base/lib_newterm.c             |     11 +-
+ ncurses/base/lib_newwin.c              |     17 +-
+ ncurses/base/lib_overlay.c             |     21 +-
+ ncurses/base/lib_printw.c              |     34 +-
+ ncurses/base/lib_refresh.c             |     17 +-
+ ncurses/base/lib_restart.c             |     10 +-
+ ncurses/base/lib_scanw.c               |      6 +-
+ ncurses/base/lib_screen.c              |     19 +-
+ ncurses/base/lib_scroll.c              |      8 +-
+ ncurses/base/lib_set_term.c            |     41 +-
+ ncurses/base/lib_slkrefr.c             |     22 +-
+ ncurses/base/lib_slkset.c              |     17 +-
+ ncurses/base/lib_touch.c               |      6 +-
+ ncurses/base/lib_ungetch.c             |     11 +-
+ ncurses/base/memmove.c                 |     69 -
+ ncurses/base/resizeterm.c              |     83 +-
+ ncurses/base/safe_sprintf.c            |     20 +-
+ ncurses/base/vsscanf.c                 |      8 +-
+ ncurses/base/wresize.c                 |      9 +-
+ ncurses/build.priv.h                   |      6 +-
+ ncurses/curses.priv.h                  |    280 +-
+ ncurses/fifo_defs.h                    |     46 +-
+ ncurses/llib-lncurses                  |     11 +
+ ncurses/llib-lncursest                 |     11 +
+ ncurses/llib-lncursestw                |     11 +
+ ncurses/llib-lncursesw                 |     11 +
+ ncurses/llib-ltic                      |    212 +
+ ncurses/llib-ltictw                    |    212 +
+ ncurses/llib-lticw                     |    212 +
+ ncurses/llib-ltinfo                    |   1504 +
+ ncurses/llib-ltinfotw                  |   1646 +
+ ncurses/llib-ltinfow                   |   1537 +
+ ncurses/modules                        |      8 +-
+ ncurses/tinfo/MKcaptab.sh              |     10 +-
+ ncurses/tinfo/access.c                 |     43 +-
+ ncurses/tinfo/alloc_entry.c            |     31 +-
+ ncurses/tinfo/alloc_ttype.c            |     52 +-
+ ncurses/tinfo/captoinfo.c              |    212 +-
+ ncurses/tinfo/comp_error.c             |     20 +-
+ ncurses/tinfo/comp_expand.c            |     19 +-
+ ncurses/tinfo/comp_parse.c             |    189 +-
+ ncurses/tinfo/comp_scan.c              |    169 +-
+ ncurses/tinfo/db_iterator.c            |    413 +-
+ ncurses/tinfo/doalloc.c                |     21 +-
+ ncurses/tinfo/entries.c                |     11 +-
+ ncurses/tinfo/getenv_num.c             |     21 +-
+ ncurses/tinfo/hashed_db.c              |    159 +-
+ ncurses/tinfo/home_terminfo.c          |     10 +-
+ ncurses/tinfo/lib_acs.c                |      7 +-
+ ncurses/tinfo/lib_cur_term.c           |      7 +-
+ ncurses/tinfo/lib_data.c               |     14 +-
+ ncurses/tinfo/lib_napms.c              |     12 +-
+ ncurses/tinfo/lib_options.c            |     39 +-
+ ncurses/tinfo/lib_print.c              |     10 +-
+ ncurses/tinfo/lib_raw.c                |     35 +-
+ ncurses/tinfo/lib_setup.c              |    158 +-
+ ncurses/tinfo/lib_termcap.c            |     39 +-
+ ncurses/tinfo/lib_tgoto.c              |      9 +-
+ ncurses/tinfo/lib_tparm.c              |     28 +-
+ ncurses/tinfo/lib_tputs.c              |     92 +-
+ ncurses/tinfo/lib_ttyflags.c           |     10 +-
+ ncurses/tinfo/make_hash.c              |     51 +-
+ ncurses/tinfo/make_keys.c              |      6 +-
+ ncurses/tinfo/name_match.c             |     42 +-
+ ncurses/tinfo/obsolete.c               |    102 +
+ ncurses/tinfo/parse_entry.c            |     40 +-
+ ncurses/tinfo/read_entry.c             |    274 +-
+ ncurses/tinfo/read_termcap.c           |     85 +-
+ ncurses/tinfo/setbuf.c                 |    169 -
+ ncurses/tinfo/strings.c                |      8 +-
+ ncurses/tinfo/tinfo_driver.c           |    181 +-
+ ncurses/tinfo/trim_sgr0.c              |     83 +-
+ ncurses/tinfo/write_entry.c            |    103 +-
+ ncurses/trace/lib_trace.c              |     20 +-
+ ncurses/trace/lib_traceatr.c           |     44 +-
+ ncurses/trace/lib_tracebits.c          |     24 +-
+ ncurses/trace/lib_tracechr.c           |     15 +-
+ ncurses/trace/lib_tracedmp.c           |      8 +-
+ ncurses/trace/lib_tracemse.c           |     44 +-
+ ncurses/trace/trace_buf.c              |     11 +-
+ ncurses/trace/trace_tries.c            |     37 +-
+ ncurses/trace/varargs.c                |     23 +-
+ ncurses/trace/visbuf.c                 |     48 +-
+ ncurses/tty/hardscroll.c               |     24 +-
+ ncurses/tty/hashmap.c                  |      6 +-
+ ncurses/tty/lib_mvcur.c                |    115 +-
+ ncurses/tty/lib_tstp.c                 |     55 +-
+ ncurses/tty/lib_twait.c                |     64 +-
+ ncurses/tty/lib_vidattr.c              |     50 +-
+ ncurses/tty/tty_display.h              |    140 -
+ ncurses/tty/tty_input.h                |     61 -
+ ncurses/tty/tty_update.c               |    266 +-
+ ncurses/widechar/lib_box_set.c         |      6 +-
+ ncurses/widechar/lib_cchar.c           |     16 +-
+ ncurses/widechar/lib_get_wch.c         |      9 +-
+ ncurses/widechar/lib_get_wstr.c        |      8 +-
+ ncurses/widechar/lib_ins_wch.c         |      6 +-
+ ncurses/widechar/lib_inwstr.c          |     11 +-
+ ncurses/widechar/lib_slk_wset.c        |     30 +-
+ ncurses/widechar/lib_unget_wch.c       |      6 +-
+ ncurses/widechar/lib_vid_attr.c        |     42 +-
+ ncurses/widechar/lib_wacs.c            |     36 +-
+ ncurses/widechar/lib_wunctrl.c         |     17 +-
+ ncurses/widechar/widechars.c           |    152 +
+ ncurses/win32con/win_driver.c          |    379 +-
+ package/debian/changelog               |     11 +
+ package/debian/compat                  |      1 +
+ package/debian/control                 |     16 +
+ package/debian/copyright               |    112 +
+ package/debian/rules                   |    123 +
+ package/debian/source/format           |      1 +
+ package/debian/watch                   |      4 +
+ package/ncurses.spec                   |     92 +
+ panel/Makefile.in                      |      8 +-
+ panel/p_above.c                        |      6 +-
+ panel/p_below.c                        |      6 +-
+ panel/panel.c                          |     12 +-
+ panel/panel.priv.h                     |      8 +-
+ progs/Makefile.in                      |     30 +-
+ progs/capconvert                       |     24 +-
+ progs/dump_entry.c                     |    205 +-
+ progs/dump_entry.h                     |     14 +-
+ progs/infocmp.c                        |    467 +-
+ progs/progs.priv.h                     |     22 +-
+ progs/tabs.c                           |     92 +-
+ progs/tic.c                            |    565 +-
+ progs/toe.c                            |    442 +-
+ progs/tput.c                           |      9 +-
+ progs/transform.c                      |     16 +-
+ progs/tset.c                           |     43 +-
+ test/Makefile.in                       |     10 +-
+ test/README                            |     52 +-
+ test/aclocal.m4                        |   1130 +-
+ test/background.c                      |    226 +-
+ test/blue.c                            |     12 +-
+ test/bs.c                              |     60 +-
+ test/cardfile.c                        |     24 +-
+ test/chgat.c                           |      6 +-
+ test/clip_printw.c                     |     11 +-
+ test/color_name.h                      |    103 +
+ test/color_set.c                       |      6 +-
+ test/configure                         |  18210 ++---
+ test/configure.in                      |    183 +-
+ test/demo_defkey.c                     |      6 +-
+ test/demo_forms.c                      |     25 +-
+ test/demo_menus.c                      |     33 +-
+ test/demo_termcap.c                    |    289 +-
+ test/demo_terminfo.c                   |    245 +-
+ test/ditto.c                           |     10 +-
+ test/dots.c                            |      8 +-
+ test/dots_mvcur.c                      |      8 +-
+ test/echochar.c                        |      6 +-
+ test/filter.c                          |      8 +-
+ test/firework.c                        |     16 +-
+ test/gdc.c                             |     20 +-
+ test/hanoi.c                           |     33 +-
+ test/hashtest.c                        |      6 +-
+ test/inchs.c                           |     16 +-
+ test/ins_wide.c                        |     34 +-
+ test/insdelln.c                        |      8 +-
+ test/inserts.c                         |     29 +-
+ test/knight.c                          |     70 +-
+ test/linedata.h                        |      6 +-
+ test/modules                           |      8 +-
+ test/movewindow.c                      |    227 +-
+ test/ncurses.c                         |    351 +-
+ test/newdemo.c                         |     23 +-
+ test/programs                          |      6 +-
+ test/railroad.c                        |      8 +-
+ test/rain.c                            |      8 +-
+ test/redraw.c                          |      6 +-
+ test/tclock.c                          |      6 +-
+ test/test.priv.h                       |    111 +-
+ test/test_add_wchstr.c                 |     31 +-
+ test/test_addchstr.c                   |     31 +-
+ test/test_addstr.c                     |     29 +-
+ test/test_addwstr.c                    |     34 +-
+ test/test_getstr.c                     |     15 +-
+ test/test_vid_puts.c                   |    148 +
+ test/test_vidputs.c                    |    148 +
+ test/testaddch.c                       |     12 +-
+ test/testcurs.c                        |     64 +-
+ test/view.c                            |     88 +-
+ test/widechars.h                       |     71 +
+ test/worm.c                            |     28 +-
+ test/xmas.c                            |      6 +-
+ 394 files changed, 145914 insertions(+), 22792 deletions(-)
+ create mode 100644 include/nc_string.h
+ create mode 100644 include/nc_termios.h
+ delete mode 100644 mk-dlls.sh.in
+ create mode 100644 ncurses-5.9-20130504-patch.sh
+ delete mode 100644 ncurses/base/memmove.c
+ create mode 100644 ncurses/llib-ltic
+ create mode 100644 ncurses/llib-ltictw
+ create mode 100644 ncurses/llib-lticw
+ create mode 100644 ncurses/llib-ltinfo
+ create mode 100644 ncurses/llib-ltinfotw
+ create mode 100644 ncurses/llib-ltinfow
+ create mode 100644 ncurses/tinfo/obsolete.c
+ delete mode 100644 ncurses/tinfo/setbuf.c
+ delete mode 100644 ncurses/tty/tty_display.h
+ delete mode 100644 ncurses/tty/tty_input.h
+ create mode 100644 ncurses/widechar/widechars.c
+ create mode 100644 package/debian/changelog
+ create mode 100644 package/debian/compat
+ create mode 100644 package/debian/control
+ create mode 100644 package/debian/copyright
+ create mode 100644 package/debian/rules
+ create mode 100644 package/debian/source/format
+ create mode 100644 package/debian/watch
+ create mode 100644 package/ncurses.spec
+ create mode 100644 test/color_name.h
+ create mode 100644 test/test_vid_puts.c
+ create mode 100644 test/test_vidputs.c
+ create mode 100644 test/widechars.h
+
+diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4
+index 597483b..3f7ad84 100644
+--- a/Ada95/aclocal.m4
++++ b/Ada95/aclocal.m4
+@@ -1,5 +1,5 @@
+ dnl***************************************************************************
+-dnl Copyright (c) 2010,2011 Free Software Foundation, Inc.                   *
++dnl Copyright (c) 2010-2012,2013 Free Software Foundation, Inc.              *
+ dnl                                                                          *
+ dnl Permission is hereby granted, free of charge, to any person obtaining a  *
+ dnl copy of this software and associated documentation files (the            *
+@@ -28,7 +28,7 @@ dnl***************************************************************************
+ dnl
+ dnl Author: Thomas E. Dickey
+ dnl
+-dnl $Id: aclocal.m4,v 1.24 2011/03/31 23:32:36 tom Exp $
++dnl $Id: aclocal.m4,v 1.66 2013/04/13 23:00:18 tom Exp $
+ dnl Macros used in NCURSES Ada95 auto-configuration script.
+ dnl
+ dnl These macros are maintained separately from NCURSES.  The copyright on
+@@ -39,6 +39,32 @@ dnl See http://invisible-island.net/autoconf/ for additional information.
+ dnl
+ dnl ---------------------------------------------------------------------------
+ dnl ---------------------------------------------------------------------------
++dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
++dnl ------------------
++dnl Conditionally generate script according to whether we're using a given autoconf.
++dnl
++dnl $1 = version to compare against
++dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
++dnl $3 = code to use if AC_ACVERSION is older than $1.
++define([CF_ACVERSION_CHECK],
++[
++ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
++ifdef([m4_version_compare],
++[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
++[CF_ACVERSION_COMPARE(
++AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
++AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
++dnl --------------------
++dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
++dnl                      MAJOR2, MINOR2, TERNARY2,
++dnl                      PRINTABLE2, not FOUND, FOUND)
++define([CF_ACVERSION_COMPARE],
++[ifelse(builtin([eval], [$2 < $5]), 1,
++[ifelse([$8], , ,[$8])],
++[ifelse([$9], , ,[$9])])])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
+ dnl -------------------
+ dnl Construct the list of include-options for the C programs in the Ada95
+@@ -290,75 +316,34 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
+ }
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32
+-dnl ----------------
+-dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
+-dnl in the sharutils 4.2 distribution.
+-AC_DEFUN([CF_ANSI_CC_CHECK],
+-[
+-AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[
+-cf_cv_ansi_cc=no
+-cf_save_CFLAGS="$CFLAGS"
+-cf_save_CPPFLAGS="$CPPFLAGS"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX			-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc
+-# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
+-for cf_arg in "-DCC_HAS_PROTOS" \
+-	"" \
+-	-qlanglvl=ansi \
+-	-std1 \
+-	-Ae \
+-	"-Aa -D_HPUX_SOURCE" \
+-	-Xc
+-do
+-	CF_ADD_CFLAGS($cf_arg)
+-	AC_TRY_COMPILE(
+-[
+-#ifndef CC_HAS_PROTOS
+-#if !defined(__STDC__) || (__STDC__ != 1)
+-choke me
+-#endif
+-#endif
+-],[
+-	int test (int i, double x);
+-	struct s1 {int (*f) (int a);};
+-	struct s2 {int (*f) (double a);};],
+-	[cf_cv_ansi_cc="$cf_arg"; break])
+-done
+-CFLAGS="$cf_save_CFLAGS"
+-CPPFLAGS="$cf_save_CPPFLAGS"
+-])
+-
+-if test "$cf_cv_ansi_cc" != "no"; then
+-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+-	CF_ADD_CFLAGS($cf_cv_ansi_cc)
+-else
+-	AC_DEFINE(CC_HAS_PROTOS)
+-fi
+-fi
+-])dnl
++dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
++dnl --------------
++dnl Allow user to disable a normally-on option.
++AC_DEFUN([CF_ARG_DISABLE],
++[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
+-dnl ---------------
+-dnl For programs that must use an ANSI compiler, obtain compiler options that
+-dnl will make it recognize prototypes.  We'll do preprocessor checks in other
+-dnl macros, since tools such as unproto can fake prototypes, but only part of
+-dnl the preprocessor.
+-AC_DEFUN([CF_ANSI_CC_REQD],
+-[AC_REQUIRE([CF_ANSI_CC_CHECK])
+-if test "$cf_cv_ansi_cc" = "no"; then
+-	AC_MSG_ERROR(
+-[Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto])
+-fi
+-])dnl
++dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42
++dnl -------------
++dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
++dnl values.
++dnl
++dnl Parameters:
++dnl $1 = option name
++dnl $2 = help-string
++dnl $3 = action to perform if option is not default
++dnl $4 = action if perform if option is default
++dnl $5 = default option value (either 'yes' or 'no')
++AC_DEFUN([CF_ARG_OPTION],
++[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
++  if test "$enableval" != "$5" ; then
++ifelse([$3],,[    :]dnl
++,[    $3]) ifelse([$4],,,[
++  else
++    $4])
++  fi],[enableval=$5 ifelse([$4],,,[
++  $4
++])dnl
++  ])])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_AR_FLAGS version: 5 updated: 2010/05/20 20:24:29
+ dnl -----------
+@@ -413,7 +398,7 @@ fi
+ AC_SUBST(ARFLAGS)
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_BUILD_CC version: 6 updated: 2006/10/14 15:23:15
++dnl CF_BUILD_CC version: 7 updated: 2012/10/06 15:31:55
+ 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
+@@ -423,7 +408,8 @@ dnl
+ dnl $1 = default for $CPPFLAGS
+ dnl $2 = default for $LIBS
+ AC_DEFUN([CF_BUILD_CC],[
+-AC_REQUIRE([CF_PROG_EXT])
++CF_ACVERSION_CHECK(2.52,,
++	[AC_REQUIRE([CF_PROG_EXT])])
+ if test "$cross_compiling" = yes ; then
+ 
+ 	# defaults that we might want to override
+@@ -504,7 +490,33 @@ AC_SUBST(BUILD_EXEEXT)
+ AC_SUBST(BUILD_OBJEXT)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CFG_DEFAULTS version: 7 updated: 2005/09/24 16:15:00
++dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49
++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 with
++dnl options, but eliminates a more common category of user confusion.
++AC_DEFUN([CF_CC_ENV_FLAGS],
++[
++# This should have been defined by AC_PROG_CC
++: ${CC:=cc}
++
++AC_MSG_CHECKING(\$CC variable)
++case "$CC" in #(vi
++*[[\ \	]]-[[IUD]]*)
++	AC_MSG_RESULT(broken)
++	AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
++	# humor him...
++	cf_flags=`echo "$CC" | sed -e 's/^[[^ 	]]*[[ 	]]//'`
++	CC=`echo "$CC" | sed -e 's/[[ 	]].*//'`
++	CF_ADD_CFLAGS($cf_flags)
++	;;
++*)
++	AC_MSG_RESULT(ok)
++	;;
++esac
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_CFG_DEFAULTS version: 9 updated: 2013/04/13 18:58:32
+ dnl ---------------
+ dnl Determine the default configuration into which we'll install ncurses.  This
+ dnl can be overridden by the user's command-line options.  There's two items to
+@@ -522,7 +534,7 @@ AC_MSG_CHECKING(for prefix)
+ if test "x$prefix" = "xNONE" ; then
+ 	case "$cf_cv_system_name" in
+ 		# non-vendor systems don't have a conflict
+-	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
++	openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
+ 		prefix=/usr
+ 		;;
+ 	*)	prefix=$ac_default_prefix
+@@ -558,7 +570,7 @@ AC_MSG_RESULT($includedir)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
++dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
+ dnl --------------
+ dnl Check if we're accidentally using a cache from a different machine.
+ dnl Derive the system name, as a check for reusing the autoconf cache.
+@@ -581,7 +593,7 @@ else
+ 		system_name="`(hostname) 2>/dev/null`"
+ 	fi
+ fi
+-test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
++test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.])
+ AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+ 
+ test -z "$system_name" && system_name="$cf_cv_system_name"
+@@ -593,7 +605,40 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CURSES_HEADER version: 2 updated: 2010/04/28 06:02:16
++dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
++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
++dnl not ignore some gcc options.
++dnl
++dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
++dnl ensure that it is not mistaken for gcc/g++.  It is normally invoked from
++dnl the wrappers for gcc and g++ warnings.
++dnl
++dnl $1 = GCC (default) or GXX
++dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
++dnl $3 = CFLAGS (default) or CXXFLAGS
++AC_DEFUN([CF_CLANG_COMPILER],[
++ifelse([$2],,CLANG_COMPILER,[$2])=no
++
++if test "$ifelse([$1],,[$1],GCC)" = yes ; then
++	AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
++	cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
++	ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
++	AC_TRY_COMPILE([],[
++#ifdef __clang__
++#else
++make an error
++#endif
++],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
++cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
++],[])
++	ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
++	AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
++fi
++])
++dnl ---------------------------------------------------------------------------
++dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45
+ dnl ----------------
+ dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
+ dnl variations of ncurses' installs.
+@@ -603,10 +648,10 @@ AC_DEFUN([CF_CURSES_HEADER],[
+ AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[
+ cf_cv_ncurses_header=none
+ for cf_header in ifelse($1,,,[ \
+-    $1/curses.h \
+-	$1/ncurses.h]) \
+-	curses.h \
+-	ncurses.h ifelse($1,,[ncurses/curses.h ncurses/ncurses.h])
++    $1/ncurses.h \
++	$1/curses.h]) \
++	ncurses.h \
++	curses.h ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
+ do
+ AC_TRY_COMPILE([#include <${cf_header}>],
+ 	[initscr(); tgoto("?", 0,0)],
+@@ -627,6 +672,67 @@ dnl ----------
+ dnl "dirname" is not portable, so we fake it with a shell script.
+ AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28
++dnl ---------------
++dnl You can always use "make -n" to see the actual options, but it's hard to
++dnl pick out/analyze warning messages when the compile-line is long.
++dnl
++dnl Sets:
++dnl	ECHO_LT - symbol to control if libtool is verbose
++dnl	ECHO_LD - symbol to prefix "cc -o" lines
++dnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
++dnl	SHOW_CC - symbol to put before explicit "cc -c" lines
++dnl	ECHO_CC - symbol to put before any "cc" line
++dnl
++AC_DEFUN([CF_DISABLE_ECHO],[
++AC_MSG_CHECKING(if you want to see long compiling messages)
++CF_ARG_DISABLE(echo,
++	[  --disable-echo          do not display "compiling" commands],
++	[
++    ECHO_LT='--silent'
++    ECHO_LD='@echo linking [$]@;'
++    RULE_CC='@echo compiling [$]<'
++    SHOW_CC='@echo compiling [$]@'
++    ECHO_CC='@'
++],[
++    ECHO_LT=''
++    ECHO_LD=''
++    RULE_CC=''
++    SHOW_CC=''
++    ECHO_CC=''
++])
++AC_MSG_RESULT($enableval)
++AC_SUBST(ECHO_LT)
++AC_SUBST(ECHO_LD)
++AC_SUBST(RULE_CC)
++AC_SUBST(SHOW_CC)
++AC_SUBST(ECHO_CC)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_ENABLE_PC_FILES version: 9 updated: 2012/08/04 13:59:54
++dnl ------------------
++dnl This is the "--enable-pc-files" option, which is available if there is a
++dnl pkg-config configuration on the local machine.
++AC_DEFUN([CF_ENABLE_PC_FILES],[
++AC_REQUIRE([CF_PKG_CONFIG])
++AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])
++
++if test "$PKG_CONFIG" != none ; then
++	AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
++	AC_ARG_ENABLE(pc-files,
++		[  --enable-pc-files       generate and install .pc files for pkg-config],
++		[enable_pc_files=$enableval],
++		[enable_pc_files=no])
++	AC_MSG_RESULT($enable_pc_files)
++	if test "$enable_pc_files" != no
++	then
++		CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
++	fi
++else
++	enable_pc_files=no
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
+ dnl ---------------
+ dnl Look for a non-standard library, given parameters for AC_TRY_LINK.  We
+@@ -807,7 +913,26 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
++dnl CF_FIXUP_ADAFLAGS version: 1 updated: 2012/03/31 18:48:10
++dnl -----------------
++dnl make ADAFLAGS consistent with CFLAGS
++AC_DEFUN([CF_FIXUP_ADAFLAGS],[
++	AC_MSG_CHECKING(optimization options for ADAFLAGS)
++	case "$CFLAGS" in
++	*-g*)
++		CF_ADD_ADAFLAGS(-g)
++		;;
++	esac
++	case "$CFLAGS" in
++	*-O*)
++		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[[ 	]].*//'`
++		CF_ADD_ADAFLAGS($cf_O_flag)
++		;;
++	esac
++	AC_MSG_RESULT($ADAFLAGS)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03
+ dnl -----------------
+ dnl Test for availability of useful gcc __attribute__ directives to quiet
+ dnl compiler warnings.  Though useful, not all are supported -- and contrary
+@@ -885,27 +1010,27 @@ EOF
+ 			test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
+ 			cat conftest.h >>confdefs.h
+ 			case $cf_attribute in #(vi
++			noreturn) #(vi
++				AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
++				;;
+ 			printf) #(vi
+-				if test "$cf_printf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+-EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+-EOF
++				cf_value='/* nothing */'
++				if test "$cf_printf_attribute" != no ; then
++					cf_value='__attribute__((format(printf,fmt,var)))'
++					AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
+ 				fi
++				AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
+ 				;;
+ 			scanf) #(vi
+-				if test "$cf_scanf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var) /* nothing */
+-EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
+-EOF
++				cf_value='/* nothing */'
++				if test "$cf_scanf_attribute" != no ; then
++					cf_value='__attribute__((format(scanf,fmt,var)))'
++					AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
+ 				fi
++				AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
++				;;
++			unused) #(vi
++				AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
+ 				;;
+ 			esac
+ 		fi
+@@ -917,7 +1042,7 @@ rm -rf conftest*
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
++dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33
+ dnl --------------
+ dnl Find version of gcc
+ AC_DEFUN([CF_GCC_VERSION],[
+@@ -925,13 +1050,13 @@ 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/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
++	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.]].*//'`"
+ 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ 	AC_MSG_RESULT($GCC_VERSION)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
++dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39
+ dnl ---------------
+ dnl Check if the compiler supports useful warning options.  There's a few that
+ dnl we don't use, simply because they're too noisy:
+@@ -954,6 +1079,7 @@ AC_DEFUN([CF_GCC_WARNINGS],
+ [
+ AC_REQUIRE([CF_GCC_VERSION])
+ CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
++CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
+ 
+ cat > conftest.$ac_ext <<EOF
+ #line __oline__ "${as_me:-configure}"
+@@ -1029,6 +1155,13 @@ then
+ 					continue;;
+ 				esac
+ 				;;
++			Wpointer-arith) #(vi
++				case $GCC_VERSION in
++				[[12]].*)
++					CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
++					continue;;
++				esac
++				;;
+ 			esac
+ 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ 		fi
+@@ -1070,53 +1203,6 @@ AC_SUBST(cf_compile_generics)
+ AC_SUBST(cf_generic_objects)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
+-dnl --------------
+-dnl Check if gnat supports SIGINT, and presumably tasking.  For the latter, it
+-dnl is noted that gnat may compile a tasking unit even for configurations which
+-dnl fail at runtime.
+-AC_DEFUN([CF_GNAT_SIGINT],[
+-AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
+-CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
+-
+-package ConfTest is
+-
+-   pragma Warnings (Off);  --  the next pragma exists since 3.11p
+-   pragma Unreserve_All_Interrupts;
+-   pragma Warnings (On);
+-
+-   protected Process is
+-      procedure Stop;
+-      function Continue return Boolean;
+-      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
+-   private
+-      Done : Boolean := False;
+-   end Process;
+-
+-end ConfTest;],
+-[package body ConfTest is
+-   protected body Process is
+-      procedure Stop is
+-      begin
+-         Done := True;
+-      end Stop;
+-      function Continue return Boolean is
+-      begin
+-         return not Done;
+-      end Continue;
+-   end Process;
+-end ConfTest;],
+-	[cf_cv_gnat_sigint=yes],
+-	[cf_cv_gnat_sigint=no])])
+-
+-if test $cf_cv_gnat_sigint = yes ; then
+-	USE_GNAT_SIGINT=""
+-else
+-	USE_GNAT_SIGINT="#"
+-fi
+-AC_SUBST(USE_GNAT_SIGINT)
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
+ dnl --------------------
+ dnl Check if the gnat pragma "Unreferenced" works.
+@@ -1253,6 +1339,53 @@ AC_SUBST(USE_GNAT_PROJECTS)
+ AC_SUBST(USE_GNAT_LIBRARIES)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
++dnl --------------
++dnl Check if gnat supports SIGINT, and presumably tasking.  For the latter, it
++dnl is noted that gnat may compile a tasking unit even for configurations which
++dnl fail at runtime.
++AC_DEFUN([CF_GNAT_SIGINT],[
++AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
++CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
++
++package ConfTest is
++
++   pragma Warnings (Off);  --  the next pragma exists since 3.11p
++   pragma Unreserve_All_Interrupts;
++   pragma Warnings (On);
++
++   protected Process is
++      procedure Stop;
++      function Continue return Boolean;
++      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
++   private
++      Done : Boolean := False;
++   end Process;
++
++end ConfTest;],
++[package body ConfTest is
++   protected body Process is
++      procedure Stop is
++      begin
++         Done := True;
++      end Stop;
++      function Continue return Boolean is
++      begin
++         return not Done;
++      end Continue;
++   end Process;
++end ConfTest;],
++	[cf_cv_gnat_sigint=yes],
++	[cf_cv_gnat_sigint=no])])
++
++if test $cf_cv_gnat_sigint = yes ; then
++	USE_GNAT_SIGINT=""
++else
++	USE_GNAT_SIGINT="#"
++fi
++AC_SUBST(USE_GNAT_SIGINT)
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45
+ dnl ----------------
+ dnl Verify that a test program compiles/links with GNAT.
+@@ -1311,7 +1444,7 @@ fi
+ rm -rf conftest* *~conftest*
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41
++dnl CF_GNAT_VERSION version: 18 updated: 2012/01/21 19:28:10
+ dnl ---------------
+ dnl Verify version of GNAT.
+ AC_DEFUN([CF_GNAT_VERSION],
+@@ -1323,7 +1456,7 @@ cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
+ AC_MSG_RESULT($cf_gnat_version)
+ 
+ case $cf_gnat_version in #(vi
+-3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
++3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|20[[0-9]][[0-9]]) #(vi
+ 	cf_cv_prog_gnat_correct=yes
+ 	;;
+ *)
+@@ -1416,7 +1549,7 @@ AC_DEFUN([CF_HELP_MESSAGE],
+ [AC_DIVERT_HELP([$1])dnl
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40
++dnl CF_INCLUDE_DIRS version: 7 updated: 2012/11/10 19:15:05
+ dnl ---------------
+ dnl Construct the list of include-options according to whether we're building
+ dnl in the source directory or using '--srcdir=DIR' option.  If we're building
+@@ -1424,25 +1557,25 @@ dnl with gcc, don't append the includedir if it happens to be /usr/include,
+ dnl since that usually breaks gcc's shadow-includes.
+ AC_DEFUN([CF_INCLUDE_DIRS],
+ [
+-CPPFLAGS="$CPPFLAGS -I. -I../include"
+-if test "$srcdir" != "."; then
+-	CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
+-fi
+ if test "$GCC" != yes; then
+-	CPPFLAGS="$CPPFLAGS -I\${includedir}"
++	CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ elif test "$includedir" != "/usr/include"; then
+ 	if test "$includedir" = '${prefix}/include' ; then
+ 		if test $prefix != /usr ; then
+-			CPPFLAGS="$CPPFLAGS -I\${includedir}"
++			CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 		fi
+ 	else
+-		CPPFLAGS="$CPPFLAGS -I\${includedir}"
++		CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 	fi
+ fi
++if test "$srcdir" != "."; then
++	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
++fi
++CPPFLAGS="-I. -I../include $CPPFLAGS"
+ AC_SUBST(CPPFLAGS)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
++dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
+ 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
+@@ -1456,6 +1589,7 @@ dnl $1 = GCC (default) or GXX
+ dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+ dnl $3 = CFLAGS (default) or CXXFLAGS
+ AC_DEFUN([CF_INTEL_COMPILER],[
++AC_REQUIRE([AC_CANONICAL_HOST])
+ ifelse([$2],,INTEL_COMPILER,[$2])=no
+ 
+ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+@@ -1479,7 +1613,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LARGEFILE version: 7 updated: 2007/06/02 11:58:50
++dnl CF_LARGEFILE version: 8 updated: 2012/10/06 08:57:51
+ dnl ------------
+ dnl Add checks for large file support.
+ AC_DEFUN([CF_LARGEFILE],[
+@@ -1513,12 +1647,12 @@ ifdef([AC_FUNC_FSEEKO],[
+ 		[cf_cv_struct_dirent64=yes],
+ 		[cf_cv_struct_dirent64=no])
+ 	])
+-	test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64)
++	test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Define to 1 if we have struct dirent64])
+     fi
+ ])
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05
++dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
+ dnl ---------------
+ dnl For the given system and compiler, find the compiler flags to pass to the
+ dnl loader to use the "rpath" feature.
+@@ -1539,10 +1673,10 @@ irix*) #(vi
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-openbsd[[2-9]].*) #(vi
++openbsd[[2-9]].*|mirbsd*) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-freebsd*) #(vi
++dragonfly*|freebsd*) #(vi
+ 	LD_RPATH_OPT="-rpath "
+ 	;;
+ netbsd*) #(vi
+@@ -1601,11 +1735,11 @@ CF_SUBDIR_PATH($1,$2,lib)
+ $1="$cf_library_path_list [$]$1"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
++dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
+ dnl -------------
+ dnl Compute the library-prefix for the given host system
+ dnl $1 = variable to set
+-AC_DEFUN([CF_LIB_PREFIX],
++define([CF_LIB_PREFIX],
+ [
+ 	case $cf_cv_system_name in #(vi
+ 	OS/2*|os2*) #(vi
+@@ -1618,44 +1752,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
+ 	AC_SUBST(LIB_PREFIX)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_SONAME version: 5 updated: 2010/08/14 18:25:37
+-dnl -------------
+-dnl Find the and soname for the given shared library.  Set the cache variable
+-dnl cf_cv_$3_soname to this, unless it is not found.  Then set the cache
+-dnl variable to "unknown".
+-dnl
+-dnl $1 = headers
+-dnl $2 = code
+-dnl $3 = library name
+-AC_DEFUN([CF_LIB_SONAME],
+-[
+-AC_CACHE_CHECK(for soname of $3 library,cf_cv_$3_soname,[
+-
+-cf_cv_$3_soname=unknown
+-if test "$cross_compiling" != yes ; then
+-cat >conftest.$ac_ext <<CF_EOF
+-$1
+-int main()
+-{
+-$2
+-	${cf_cv_main_return:-return}(0);
+-}
+-CF_EOF
+-cf_save_LIBS="$LIBS"
+-	CF_ADD_LIB($3)
+-	if AC_TRY_EVAL(ac_compile) ; then
+-		if AC_TRY_EVAL(ac_link) ; then
+-			cf_cv_$3_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep lib$3.`
+-			test -z "$cf_cv_$3_soname" && cf_cv_$3_soname=unknown
+-		fi
+-	fi
+-rm -rf conftest*
+-LIBS="$cf_save_LIBS"
+-fi
+-])
+-])
+-dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03
++dnl CF_LIB_SUFFIX version: 18 updated: 2012/02/25 15:20:07
+ dnl -------------
+ dnl Compute the library file-suffix from the given model name
+ dnl $1 = model name
+@@ -1684,11 +1781,11 @@ AC_DEFUN([CF_LIB_SUFFIX],
+ 		;;
+ 	shared) #(vi
+ 		case $cf_cv_system_name in
+-		aix[[56]]*) #(vi
++		aix[[5-7]]*) #(vi
+ 			$2='.a'
+ 			$3=[$]$2
+ 			;;
+-		cygwin*) #(vi
++		cygwin*|mingw*) #(vi
+ 			$2='.dll'
+ 			$3='.dll.a'
+ 			;;
+@@ -1735,7 +1832,7 @@ AC_DEFUN([CF_LIB_TYPE],
+ 	test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LINK_DATAONLY version: 9 updated: 2009/01/01 20:21:38
++dnl CF_LINK_DATAONLY version: 10 updated: 2012/10/06 17:41:51
+ 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
+@@ -1792,81 +1889,12 @@ EOF
+ AC_MSG_RESULT($cf_cv_link_dataonly)
+ 
+ if test "$cf_cv_link_dataonly" = no ; then
+-	AC_DEFINE(BROKEN_LINKER)
++	AC_DEFINE(BROKEN_LINKER,1,[if data-only library module does not link])
+ 	BROKEN_LINKER=1
+ fi
+ 
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LINK_FUNCS version: 7 updated: 2006/12/16 12:33:30
+-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).
+-AC_DEFUN([CF_LINK_FUNCS],
+-[
+-AC_CHECK_FUNCS( \
+-	remove \
+-	unlink )
+-
+-if test "$cross_compiling" = yes ; then
+-	AC_CHECK_FUNCS( \
+-		link \
+-		symlink )
+-else
+-	AC_CACHE_CHECK(if link/symlink functions work,cf_cv_link_funcs,[
+-		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
+-int main()
+-{
+-	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);
+-#ifdef HAVE_UNLINK
+-	unlink(dst);
+-#else
+-	remove(dst);
+-#endif
+-	${cf_cv_main_return:-return} (fail);
+-}
+-			],[
+-			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
+-			eval 'ac_cv_func_'$cf_func'=yes'],[
+-			eval 'ac_cv_func_'$cf_func'=no'],[
+-			eval 'ac_cv_func_'$cf_func'=error'])
+-		done
+-		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
+-	])
+-	test "$ac_cv_func_link"    = yes && AC_DEFINE(HAVE_LINK)
+-	test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK)
+-fi
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_MAIN_RETURN version: 1 updated: 2006/12/10 09:51:54
+-dnl --------------
+-dnl Check if a return from main to the shell actually returns the same exit
+-dnl code.  This is true for almost any POSIX environment.
+-dnl
+-dnl Some very old environments did not flush stdout, etc., on an exit.  That
+-dnl would be a useful case to test for also.
+-AC_DEFUN([CF_MAIN_RETURN],
+-[
+-cf_cv_main_return=return
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
+ dnl ------------
+ dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
+@@ -1944,7 +1972,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
+ AC_SUBST(MAKE_LOWER_TAGS)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
++dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
+ dnl ----------------------
+ dnl Check if the file-system supports mixed-case filenames.  If we're able to
+ dnl create a lowercase name and see it as uppercase, it doesn't support that.
+@@ -1971,10 +1999,10 @@ else
+ 	rm -f conftest CONFTEST
+ fi
+ ])
+-test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
++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: 7 updated: 2010/08/14 18:25:37
++dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49
+ 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).
+@@ -2016,11 +2044,13 @@ int main()
+ }
+ ],[cf_cv_func_mkstemp=yes
+ ],[cf_cv_func_mkstemp=no
+-],[AC_CHECK_FUNC(mkstemp)
+-])
++],[cf_cv_func_mkstemp=maybe])
+ ])
++if test "x$cf_cv_func_mkstemp" = xmaybe ; then
++	AC_CHECK_FUNC(mkstemp)
++fi
+ if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+-	AC_DEFINE(HAVE_MKSTEMP)
++	AC_DEFINE(HAVE_MKSTEMP,1,[Define to 1 if mkstemp() is available and working.])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+@@ -2141,7 +2171,7 @@ printf("old\n");
+ 	,[$1=no])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30
++dnl CF_NCURSES_CONFIG version: 10 updated: 2012/10/06 08:57:51
+ dnl -----------------
+ dnl Tie together the configure-script macros for ncurses.
+ dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
+@@ -2153,7 +2183,10 @@ AC_DEFUN([CF_NCURSES_CONFIG],
+ cf_ncuconfig_root=ifelse($1,,ncurses,$1)
+ 
+ echo "Looking for ${cf_ncuconfig_root}-config"
+-AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
++
++CF_ACVERSION_CHECK(2.52,
++	[AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
++	[AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
+ 
+ if test "$NCURSES_CONFIG" != none ; then
+ 
+@@ -2164,7 +2197,7 @@ CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
+ CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
+ 
+ dnl like CF_NCURSES_CPPFLAGS
+-AC_DEFINE(NCURSES)
++AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ 
+ dnl like CF_NCURSES_LIBS
+ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
+@@ -2181,7 +2214,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38
++dnl CF_NCURSES_CPPFLAGS version: 21 updated: 2012/10/06 08:57:51
+ dnl -------------------
+ dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
+ dnl the CPPFLAGS variable so we can include its header.
+@@ -2227,12 +2260,12 @@ CF_NCURSES_HEADER
+ CF_TERM_HEADER
+ 
+ # some applications need this, but should check for NCURSES_VERSION
+-AC_DEFINE(NCURSES)
++AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ 
+ CF_NCURSES_VERSION
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
++dnl CF_NCURSES_HEADER version: 3 updated: 2012/10/06 08:57:51
+ dnl -----------------
+ dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
+ dnl variations of ncurses' installs.
+@@ -2283,16 +2316,16 @@ fi
+ 
+ case $cf_cv_ncurses_header in # (vi
+ *ncurses.h)
+-	AC_DEFINE(HAVE_NCURSES_H)
++	AC_DEFINE(HAVE_NCURSES_H,1,[Define to 1 if we have ncurses.h])
+ 	;;
+ esac
+ 
+ case $cf_cv_ncurses_header in # (vi
+ ncurses/curses.h|ncurses/ncurses.h)
+-	AC_DEFINE(HAVE_NCURSES_NCURSES_H)
++	AC_DEFINE(HAVE_NCURSES_NCURSES_H,1,[Define to 1 if we have ncurses/ncurses.h])
+ 	;;
+ ncursesw/curses.h|ncursesw/ncurses.h)
+-	AC_DEFINE(HAVE_NCURSESW_NCURSES_H)
++	AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h])
+ 	;;
+ esac
+ 
+@@ -2366,7 +2399,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
+ AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49
++dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
+ dnl ------------------
+ dnl Check for the version of ncurses, to aid in reporting bugs, etc.
+ dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS.  We don't use
+@@ -2425,55 +2458,7 @@ EOF
+ ])
+ 	rm -f $cf_tempfile
+ ])
+-test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
+-dnl ------------------
+-dnl see CF_WITH_NO_LEAKS
+-AC_DEFUN([CF_NO_LEAKS_OPTION],[
+-AC_MSG_CHECKING(if you want to use $1 for testing)
+-AC_ARG_WITH($1,
+-	[$2],
+-	[AC_DEFINE($3)ifelse([$4],,[
+-	 $4
+-])
+-	: ${with_cflags:=-g}
+-	: ${with_no_leaks:=yes}
+-	 with_$1=yes],
+-	[with_$1=])
+-AC_MSG_RESULT(${with_$1:-no})
+-
+-case .$with_cflags in #(vi
+-.*-g*)
+-	case .$CFLAGS in #(vi
+-	.*-g*) #(vi
+-		;;
+-	*)
+-		CF_ADD_CFLAGS([-g])
+-		;;
+-	esac
+-	;;
+-esac
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
+-dnl ----------------
+-dnl Check if the given variable is a number.  If not, report an error.
+-dnl $1 is the variable
+-dnl $2 is the message
+-AC_DEFUN([CF_NUMBER_SYNTAX],[
+-if test -n "$1" ; then
+-  case $1 in #(vi
+-  [[0-9]]*) #(vi
+- 	;;
+-  *)
+-	AC_MSG_ERROR($2 is not a number: $1)
+- 	;;
+-  esac
+-else
+-  AC_MSG_ERROR($2 value is empty)
+-fi
++test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_OBJ_SUBDIR version: 4 updated: 2002/02/23 20:38:31
+@@ -2496,20 +2481,23 @@ AC_DEFUN([CF_OBJ_SUBDIR],
+ 	esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PATHSEP version: 5 updated: 2010/05/26 05:38:42
++dnl CF_PATHSEP version: 6 updated: 2012/09/29 18:38:12
+ dnl ----------
+-dnl Provide a value for the $PATH and similar separator
++dnl Provide a value for the $PATH and similar separator (or amend the value
++dnl as provided in autoconf 2.5x).
+ AC_DEFUN([CF_PATHSEP],
+ [
++	AC_MSG_CHECKING(for PATH separator)
+ 	case $cf_cv_system_name in
+ 	os2*)	PATH_SEPARATOR=';'  ;;
+-	*)	PATH_SEPARATOR=':'  ;;
++	*)	${PATH_SEPARATOR:=':'}  ;;
+ 	esac
+ ifelse([$1],,,[$1=$PATH_SEPARATOR])
+ 	AC_SUBST(PATH_SEPARATOR)
++	AC_MSG_RESULT($PATH_SEPARATOR)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42
++dnl CF_PATH_SYNTAX version: 14 updated: 2012/06/19 20:58:54
+ dnl --------------
+ dnl Check the argument to see that it looks like a pathname.  Rewrite it if it
+ dnl begins with one of the prefix/exec_prefix variables, and then again if the
+@@ -2529,7 +2517,7 @@ case ".[$]$1" in #(vi
+   ;;
+ .[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
+   ;;
+-.\[$]{*prefix}*) #(vi
++.\[$]{*prefix}*|.\[$]{*dir}*) #(vi
+   eval $1="[$]$1"
+   case ".[$]$1" in #(vi
+   .NONE/*)
+@@ -2546,7 +2534,7 @@ case ".[$]$1" in #(vi
+ esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24
++dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+ dnl -------------
+ dnl Check for the package-config program, unless disabled by command-line.
+ AC_DEFUN([CF_PKG_CONFIG],
+@@ -2563,7 +2551,9 @@ no) #(vi
+ 	PKG_CONFIG=none
+ 	;;
+ yes) #(vi
+-	AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
++	CF_ACVERSION_CHECK(2.52,
++		[AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
++		[AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
+ 	;;
+ *)
+ 	PKG_CONFIG=$withval
+@@ -2667,6 +2657,19 @@ AC_PROG_AWK
+ test -z "$AWK" && AC_MSG_ERROR(No awk program found)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55
++dnl ----------
++dnl standard check for CC, plus followup sanity checks
++dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
++AC_DEFUN([CF_PROG_CC],[
++ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)])
++CF_GCC_VERSION
++CF_ACVERSION_CHECK(2.52,
++	[AC_PROG_CC_STDC],
++	[CF_ANSI_CC_REQD])
++CF_CC_ENV_FLAGS 
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37
+ dnl --------------
+ dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that
+@@ -2721,7 +2724,7 @@ AC_DEFUN([CF_PROG_EGREP],
+ test -z "$EGREP" && AC_MSG_ERROR(No egrep program found)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
++dnl CF_PROG_EXT version: 11 updated: 2012/10/06 08:57:51
+ dnl -----------
+ dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
+ AC_DEFUN([CF_PROG_EXT],
+@@ -2743,10 +2746,10 @@ AC_OBJEXT
+ 
+ PROG_EXT="$EXEEXT"
+ AC_SUBST(PROG_EXT)
+-test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
++test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_GNAT version: 1 updated: 2010/06/19 15:22:18
++dnl CF_PROG_GNAT version: 2 updated: 2011/10/22 14:01:47
+ dnl ------------
+ dnl Check for gnatmake, ensure that it is complete.
+ AC_DEFUN([CF_PROG_GNAT],[
+@@ -2754,6 +2757,7 @@ cf_ada_make=gnatmake
+ AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
+ if test "$ac_cv_prog_gnat_exists" = no; then
+    cf_ada_make=
++   cf_cv_prog_gnat_correct=no
+ else
+    CF_GNAT_VERSION
+    AC_CHECK_PROG(M4_exists, m4, yes, no)
+@@ -2831,7 +2835,7 @@ define([CF_REMOVE_LIB],
+ $1=`echo "$2" | sed -e 's/-l$3[[ 	]]//g' -e 's/-l$3[$]//'`
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SHARED_OPTS version: 64 updated: 2010/06/05 16:51:16
++dnl CF_SHARED_OPTS version: 72 updated: 2013/01/26 16:26:12
+ dnl --------------
+ dnl --------------
+ dnl Attempt to determine the appropriate CC/LD options for creating a shared
+@@ -2887,6 +2891,7 @@ AC_DEFUN([CF_SHARED_OPTS],
+ 	AC_MSG_RESULT($cf_cv_shlib_version)
+ 
+ 	cf_cv_rm_so_locs=no
++	cf_try_cflags=
+ 
+ 	# Some less-capable ports of gcc support only -fpic
+ 	CC_SHARED_OPTS=
+@@ -2906,10 +2911,14 @@ AC_DEFUN([CF_SHARED_OPTS],
+ 	cf_cv_shlib_version_infix=no
+ 
+ 	case $cf_cv_system_name in #(vi
+-	aix[[56]]*) #(vi
++	aix4.[3-9]*|aix[[5-7]]*) #(vi
+ 		if test "$GCC" = yes; then
+ 			CC_SHARED_OPTS=
+-			MK_SHARED_LIB='$(CC) -shared'
++			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
++		else
++			# CC_SHARED_OPTS='-qpic=large -G'
++			# perhaps "-bM:SRE -bnoentry -bexpall"
++			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ 		fi
+ 		;;
+ 	beos*) #(vi
+@@ -2935,7 +2944,7 @@ CF_EOF
+ 		chmod +x mk_shared_lib.sh
+ 		;;
+ 	darwin*) #(vi
+-		EXTRA_CFLAGS="-no-cpp-precomp"
++		cf_try_cflags="no-cpp-precomp"
+ 		CC_SHARED_OPTS="-dynamic"
+ 		MK_SHARED_LIB='${CC} ${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
+@@ -2949,6 +2958,14 @@ CF_EOF
+ 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ 		fi
+ 		;;
++	hpux[[7-8]]*) #(vi
++		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list 
++		if test "$GCC" != yes; then
++			CC_SHARED_OPTS='+Z'
++		fi
++		MK_SHARED_LIB='${LD} -b -o $[@]'
++		INSTALL_LIB="-m 555"
++		;;
+ 	hpux*) #(vi
+ 		# (tested with gcc 2.7.2 -- I don't have c89)
+ 		if test "$GCC" = yes; then
+@@ -2962,9 +2979,19 @@ CF_EOF
+ 		# readonly to exploit a quirk in the memory manager.
+ 		INSTALL_LIB="-m 555"
+ 		;;
++	interix*)
++		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
++		if test "$cf_cv_shlib_version" = rel; then
++			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
++		else
++			cf_shared_soname='`basename $@`'
++		fi
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
++		;;
+ 	irix*) #(vi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		# tested with IRIX 5.2 and 'cc'.
+ 		if test "$GCC" != yes; then
+@@ -2981,18 +3008,39 @@ CF_EOF
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CF_SHARED_SONAME
+ 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ 		;;
+-	openbsd[[2-9]].*) #(vi
++	mingw*) #(vi
++		cf_cv_shlib_version=mingw
++		cf_cv_shlib_version_infix=mingw
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
++		#MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
++		#MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
++		cat >mk_shared_lib.sh <<-CF_EOF
++		#!/bin/sh
++		SHARED_LIB=\[$]1
++		IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
++		shift
++		cat <<-EOF
++		Linking shared library
++		** SHARED_LIB \[$]SHARED_LIB
++		** IMPORT_LIB \[$]IMPORT_LIB
++EOF
++		exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
++CF_EOF
++		chmod +x mk_shared_lib.sh
++		;;
++	openbsd[[2-9]].*|mirbsd*) #(vi
+ 		if test "$DFT_LWR_MODEL" = "shared" ; then
+ 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		CF_SHARED_SONAME
+@@ -3003,12 +3051,12 @@ CF_EOF
+ 		MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ 		;;
+-	freebsd*) #(vi
++	dragonfly*|freebsd*) #(vi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+-			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CF_SHARED_SONAME
+ 		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
+@@ -3018,7 +3066,7 @@ CF_EOF
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 			if test "$cf_cv_shlib_version" = auto; then
+ 			if test -f /usr/libexec/ld.elf_so; then
+ 				cf_cv_shlib_version=abi
+@@ -3123,10 +3171,40 @@ CF_EOF
+ 		;;
+ 	esac
+ 
+-	if test -n "$cf_ld_rpath_opt" ; then
+-		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
++	if test -n "$cf_try_cflags"
++	then
++cat > conftest.$ac_ext <<EOF
++#line __oline__ "${as_me:-configure}"
++#include <stdio.h>
++int main(int argc, char *argv[[]])
++{
++	printf("hello\n");
++	return (argv[[argc-1]] == 0) ;
++}
++EOF
++		cf_save_CFLAGS="$CFLAGS"
++		for cf_opt in $cf_try_cflags
++		do
++			CFLAGS="$cf_save_CFLAGS -$cf_opt"
++			AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
++			if AC_TRY_EVAL(ac_compile); then
++				AC_MSG_RESULT(yes)
++				cf_save_CFLAGS="$CFLAGS"
++			else
++				AC_MSG_RESULT(no)
++			fi
++		done
++		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+ 
++
++	# RPATH_LIST is a colon-separated list of directories
++	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
++	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
++
++	CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
++	CF_VERBOSE(MK_SHARED_LIB:  $MK_SHARED_LIB)
++
+ 	AC_SUBST(CC_SHARED_OPTS)
+ 	AC_SUBST(LD_RPATH_OPT)
+ 	AC_SUBST(LD_SHARED_OPTS)
+@@ -3137,6 +3215,7 @@ CF_EOF
+ 	AC_SUBST(LOCAL_LDFLAGS)
+ 	AC_SUBST(LOCAL_LDFLAGS2)
+ 	AC_SUBST(INSTALL_LIB)
++	AC_SUBST(RPATH_LIST)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
+@@ -3180,24 +3259,7 @@ CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
+ CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SUBST version: 4 updated: 2006/06/17 12:33:03
+-dnl --------
+-dnl	Shorthand macro for substituting things that the user may override
+-dnl	with an environment variable.
+-dnl
+-dnl	$1 = long/descriptive name
+-dnl	$2 = environment variable
+-dnl	$3 = default value
+-AC_DEFUN([CF_SUBST],
+-[AC_CACHE_VAL(cf_cv_subst_$2,[
+-AC_MSG_CHECKING(for $1 (symbol $2))
+-CF_SUBST_IF([-z "[$]$2"], [$2], [$3])
+-cf_cv_subst_$2=[$]$2
+-AC_MSG_RESULT([$]$2)
+-])
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_TERM_HEADER version: 2 updated: 2010/10/23 15:54:49
++dnl CF_TERM_HEADER version: 3 updated: 2012/10/06 08:57:51
+ dnl --------------
+ dnl Look for term.h, which is part of X/Open curses.  It defines the interface
+ dnl to terminfo database.  Usually it is in the same include-path as curses.h,
+@@ -3230,16 +3292,16 @@ done
+ 
+ case $cf_cv_term_header in # (vi
+ *term.h)
+-	AC_DEFINE(HAVE_TERM_H)
++	AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
+ 	;;
+ esac
+ 
+ case $cf_cv_term_header in # (vi
+ ncurses/term.h) #(vi
+-	AC_DEFINE(HAVE_NCURSES_TERM_H)
++	AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
+ 	;;
+ ncursesw/term.h)
+-	AC_DEFINE(HAVE_NCURSESW_TERM_H)
++	AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
+ 	;;
+ esac
+ ])dnl
+@@ -3253,6 +3315,45 @@ top_builddir=`pwd`
+ AC_SUBST(top_builddir)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
++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],
++	[cf_cv_xopen_source=no],
++	[cf_save="$CPPFLAGS"
++	 CPPFLAGS="$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"
++	])
++])
++
++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)
++fi
++])
++dnl ---------------------------------------------------------------------------
+ dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
+ dnl --------
+ dnl Make an uppercase version of a variable
+@@ -3262,7 +3363,7 @@ AC_DEFUN([CF_UPPER],
+ $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
++dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51
+ dnl -----------
+ dnl Check for multibyte support, and if not found, utf8 compatibility library
+ AC_DEFUN([CF_UTF8_LIB],
+@@ -3281,7 +3382,7 @@ AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
+ # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
+ # ncurses/ncursesw:
+ if test "$cf_cv_utf8_lib" = "add-on" ; then
+-	AC_DEFINE(HAVE_LIBUTF8_H)
++	AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h])
+ 	CF_ADD_INCDIR($cf_cv_header_path_utf8)
+ 	CF_ADD_LIBDIR($cf_cv_library_path_utf8)
+ 	CF_ADD_LIBS($cf_cv_library_file_utf8)
+@@ -3415,7 +3516,33 @@ then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18
++dnl CF_WITH_LIB_PREFIX version: 1 updated: 2012/01/21 19:28:10
++dnl ------------------
++dnl Allow the library-prefix to be overridden.  OS/2 EMX originally had no
++dnl "lib" prefix, e.g., because it used the dll naming convention.
++dnl
++dnl $1 = variable to set
++AC_DEFUN([CF_WITH_LIB_PREFIX],
++[
++AC_MSG_CHECKING(if you want to have a library-prefix)
++AC_ARG_WITH(lib-prefix,
++	[  --with-lib-prefix       override library-prefix],
++	[with_lib_prefix=$withval],
++	[with_lib_prefix=auto])
++AC_MSG_RESULT($with_lib_prefix)
++
++if test $with_lib_prefix = auto
++then
++	CF_LIB_PREFIX($1)
++elif test $with_lib_prefix = no
++then
++	LIB_PREFIX=
++else
++	LIB_PREFIX=$with_lib_prefix
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_WITH_PATH version: 11 updated: 2012/09/29 15:04:19
+ dnl ------------
+ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
+ dnl defaulting to yes/no.
+@@ -3432,11 +3559,54 @@ ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl
+ if ifelse([$5],,true,[test -n "$5"]) ; then
+ CF_PATH_SYNTAX(withval)
+ fi
+-$3="$withval"
++eval $3="$withval"
+ AC_SUBST($3)dnl
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_PTHREAD version: 3 updated: 2010/05/29 16:31:02
++dnl CF_WITH_PKG_CONFIG_LIBDIR version: 2 updated: 2011/12/10 18:58:47
++dnl -------------------------
++dnl Allow the choice of the pkg-config library directory to be overridden.
++AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
++if test "$PKG_CONFIG" != none ; then
++	AC_MSG_CHECKING(for $PKG_CONFIG library directory)
++	AC_ARG_WITH(pkg-config-libdir,
++		[  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
++		[PKG_CONFIG_LIBDIR=$withval],
++		[PKG_CONFIG_LIBDIR=yes])
++
++	case x$PKG_CONFIG_LIBDIR in #(vi
++	x/*) #(vi
++		;;
++	xyes) #(vi
++		# look for the library directory using the same prefix as the executable
++		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
++		case x`(arch) 2>/dev/null` in #(vi
++		*64) #(vi
++			for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
++			do
++				if test -d $cf_config/pkgconfig
++				then
++					PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
++					break
++				fi
++			done
++			;;
++		*)
++			PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
++			;;
++		esac
++		;;
++	*)
++		;;
++	esac
++
++	AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
++fi
++
++AC_SUBST(PKG_CONFIG_LIBDIR)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_WITH_PTHREAD version: 6 updated: 2012/10/06 17:41:51
+ dnl ---------------
+ dnl Check for POSIX thread library.
+ AC_DEFUN([CF_WITH_PTHREAD],
+@@ -3450,30 +3620,55 @@ AC_MSG_RESULT($with_pthread)
+ 
+ if test "$with_pthread" != no ; then
+     AC_CHECK_HEADER(pthread.h,[
+-        AC_DEFINE(HAVE_PTHREADS_H)
++        AC_DEFINE(HAVE_PTHREADS_H,1,[Define to 1 if we have pthreads.h header])
+ 
+-        AC_MSG_CHECKING(if we can link with the pthread library)
+-        cf_save_LIBS="$LIBS"
+-        CF_ADD_LIB(pthread)
+-        AC_TRY_LINK([
++	for cf_lib_pthread in pthread c_r
++	do
++	    AC_MSG_CHECKING(if we can link with the $cf_lib_pthread library)
++	    cf_save_LIBS="$LIBS"
++	    CF_ADD_LIB($cf_lib_pthread)
++	    AC_TRY_LINK([
+ #include <pthread.h>
+ ],[
+-        int rc = pthread_create(0,0,0,0);
++		int rc = pthread_create(0,0,0,0);
++		int r2 = pthread_mutexattr_settype(0, 0);
+ ],[with_pthread=yes],[with_pthread=no])
+-        LIBS="$cf_save_LIBS"
+-        AC_MSG_RESULT($with_pthread)
+-
+-        if test "$with_pthread" = yes ; then
+-            CF_ADD_LIB(pthread)
+-            AC_DEFINE(HAVE_LIBPTHREADS)
+-        else
+-            AC_MSG_ERROR(Cannot link with pthread library)
+-        fi
++	    LIBS="$cf_save_LIBS"
++	    AC_MSG_RESULT($with_pthread)
++	    test "$with_pthread" = yes && break
++	done
++
++	if test "$with_pthread" = yes ; then
++	    CF_ADD_LIB($cf_lib_pthread)
++	    AC_DEFINE(HAVE_LIBPTHREADS,1,[Define to 1 if we have pthreads library])
++	else
++	    AC_MSG_ERROR(Cannot link with pthread library)
++	fi
+     ])
+ fi
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
++dnl CF_WITH_SYSTYPE version: 1 updated: 2013/01/26 16:26:12
++dnl ---------------
++dnl For testing, override the derived host system-type which is used to decide
++dnl things such as the linker commands used to build shared libraries.  This is
++dnl normally chosen automatically based on the type of system which you are
++dnl building on.  We use it for testing the configure script.
++dnl
++dnl This is different from the --host option: it is used only for testing parts
++dnl of the configure script which would not be reachable with --host since that
++dnl relies on the build environment being real, rather than mocked up.
++AC_DEFUN([CF_WITH_SYSTYPE],[
++CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
++AC_ARG_WITH(system-type,
++	[  --with-system-type=XXX  test: override derived host system-type],
++[AC_MSG_WARN(overriding system type to $withval)
++	cf_cv_system_name=$withval
++	host_os=$withval
++])
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_XOPEN_SOURCE version: 43 updated: 2013/02/10 10:41:05
+ 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,
+@@ -3483,13 +3678,14 @@ dnl Parameters:
+ dnl	$1 is the nominal value for _XOPEN_SOURCE
+ dnl	$2 is the nominal value for _POSIX_C_SOURCE
+ AC_DEFUN([CF_XOPEN_SOURCE],[
++AC_REQUIRE([AC_CANONICAL_HOST])
+ 
+ cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
+ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
+ cf_xopen_source=
+ 
+ case $host_os in #(vi
+-aix[[456]]*) #(vi
++aix[[4-7]]*) #(vi
+ 	cf_xopen_source="-D_ALL_SOURCE"
+ 	;;
+ cygwin) #(vi
+@@ -3500,6 +3696,7 @@ darwin[[0-8]].*) #(vi
+ 	;;
+ darwin*) #(vi
+ 	cf_xopen_source="-D_DARWIN_C_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ freebsd*|dragonfly*) #(vi
+ 	# 5.x headers associate
+@@ -3517,15 +3714,23 @@ hpux*) #(vi
+ 	;;
+ irix[[56]].*) #(vi
+ 	cf_xopen_source="-D_SGI_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+ 	CF_GNU_SOURCE
+ 	;;
+ mirbsd*) #(vi
+-	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
++	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
++	cf_XOPEN_SOURCE=
++	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ 	;;
+ netbsd*) #(vi
+-	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
++	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]]*) #(vi
++	# 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
+ 	;;
+ openbsd*) #(vi
+ 	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+@@ -3539,36 +3744,11 @@ nto-qnx*) #(vi
+ sco*) #(vi
+ 	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ 	;;
+-solaris2.1[[0-9]]) #(vi
+-	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	;;
+-solaris2.[[1-9]]) #(vi
++solaris2.*) #(vi
+ 	cf_xopen_source="-D__EXTENSIONS__"
+ 	;;
+ *)
+-	AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+-	AC_TRY_COMPILE([#include <sys/types.h>],[
+-#ifndef _XOPEN_SOURCE
+-make an error
+-#endif],
+-	[cf_cv_xopen_source=no],
+-	[cf_save="$CPPFLAGS"
+-	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	 AC_TRY_COMPILE([#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"
+-	])
+-])
+-	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)
+-	fi
++	CF_TRY_XOPEN_SOURCE
+ 	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ 	;;
+ esac
+@@ -3576,4 +3756,33 @@ esac
+ if test -n "$cf_xopen_source" ; then
+ 	CF_ADD_CFLAGS($cf_xopen_source)
+ fi
++
++dnl In anything but the default case, we may have system-specific setting
++dnl which is still not guaranteed to provide all of the entrypoints that
++dnl _XOPEN_SOURCE would yield.
++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
++#endif],
++	[cf_XOPEN_SOURCE_set=yes],
++	[cf_XOPEN_SOURCE_set=no])
++	AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
++	if test $cf_XOPEN_SOURCE_set = yes
++	then
++		AC_TRY_COMPILE([#include <stdlib.h>],[
++#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
++make an error
++#endif],
++		[cf_XOPEN_SOURCE_set_ok=yes],
++		[cf_XOPEN_SOURCE_set_ok=no])
++		if test $cf_XOPEN_SOURCE_set_ok = no
++		then
++			AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
++		fi
++	else
++		CF_TRY_XOPEN_SOURCE
++	fi
++fi
+ ])
+diff --git a/Ada95/configure b/Ada95/configure
+index 4db6f1f..c5f87d1 100755
+--- a/Ada95/configure
++++ b/Ada95/configure
+@@ -1,7 +1,7 @@
+ #! /bin/sh
+-# From configure.in Revision: 1.30 .
++# From configure.in Revision: 1.47 .
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by Autoconf 2.52.20101002.
++# Generated by Autoconf 2.52.20121002.
+ #
+ # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+ # Free Software Foundation, Inc.
+@@ -135,15 +135,16 @@ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+-datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datarootdir}/info'
++mandir='${datarootdir}/man'
+ 
+ # Identity of this package.
+ PACKAGE_NAME=
+@@ -194,6 +195,13 @@ do
+   | --da=*)
+     datadir=$ac_optarg ;;
+ 
++  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++  | --dataroo | --dataro | --datar)
++    ac_prev=datarootdir ;;
++  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++    datarootdir=$ac_optarg ;;
++
+   -disable-* | --disable-*)
+     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+@@ -469,7 +477,7 @@ do
+ done
+ 
+ # Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
++for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
+               localstatedir libdir includedir oldincludedir infodir mandir
+ do
+   eval ac_val=$`echo $ac_var`
+@@ -606,15 +614,16 @@ Fine tuning of the installation directories:
+   --bindir=DIR            user executables [EPREFIX/bin]
+   --sbindir=DIR           system admin executables [EPREFIX/sbin]
+   --libexecdir=DIR        program executables [EPREFIX/libexec]
+-  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
++  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
++  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+   --libdir=DIR            object code libraries [EPREFIX/lib]
+   --includedir=DIR        C header files [PREFIX/include]
+   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+-  --infodir=DIR           info documentation [PREFIX/info]
+-  --mandir=DIR            man documentation [PREFIX/man]
++  --infodir=DIR           info documentation [DATAROOTDIR/info]
++  --mandir=DIR            man documentation [DATAROOTDIR/man]
+ EOF
+ 
+   cat <<\EOF
+@@ -645,6 +654,7 @@ Optional Features:
+ 
+   --with-system-type=XXX  test: override derived host system-type
+   --with-pkg-config{=path} enable/disable use of pkg-config
++  --with-pkg-config-libdir=XXX use given directory for installing pc-files
+   --enable-pc-files       generate and install .pc files for pkg-config
+   --without-tests         suppress build with test-programs
+   --enable-mixed-case     tic should assume mixed-case filenames
+@@ -660,6 +670,7 @@ Options to Specify the Libraries Built/Used:
+   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
+   --enable-widec          compile with wide-char/UTF-8 code
+   --with-curses-dir=DIR   directory in which (n)curses is installed
++  --with-lib-prefix       override library-prefix
+   --with-shlib-version=X  Specify rel or abi version for shared libs
+   --enable-rpath-link     link sample programs with rpath option
+ Fine-Tuning Your Configuration:
+@@ -677,7 +688,7 @@ Experimental Code:
+   --enable-reentrant      compile with experimental reentrant code
+   --with-wrap-prefix=XXX  override prefix used for public variables
+ Testing/development Options:
+-  --enable-echo           build: display "compiling" commands (default)
++  --disable-echo          do not display "compiling" commands
+   --enable-warnings       build: turn on GCC compiler warnings
+   --enable-assertions     test: turn on generation of assertion code
+   --enable-expanded       test: generate functions for certain macros
+@@ -757,7 +768,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.20101002.  Invocation command line was
++generated by GNU Autoconf 2.52.20121002.  Invocation command line was
+ 
+   $ $0 $@
+ 
+@@ -881,7 +892,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:884: loading site script $ac_site_file" >&5
++    { echo "$as_me:895: 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"
+@@ -892,7 +903,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:895: loading cache $cache_file" >&5
++    { echo "$as_me:906: loading cache $cache_file" >&5
+ echo "$as_me: loading cache $cache_file" >&6;}
+     case $cache_file in
+       [\\/]* | ?:[\\/]* ) . $cache_file;;
+@@ -900,7 +911,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
+     esac
+   fi
+ else
+-  { echo "$as_me:903: creating cache $cache_file" >&5
++  { echo "$as_me:914: creating cache $cache_file" >&5
+ echo "$as_me: creating cache $cache_file" >&6;}
+   >$cache_file
+ fi
+@@ -916,21 +927,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:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++      { echo "$as_me:930: 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:923: error: \`$ac_var' was not set in the previous run" >&5
++      { echo "$as_me:934: 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:929: error: \`$ac_var' has changed since the previous run:" >&5
++        { echo "$as_me:940: 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:931:   former value:  $ac_old_val" >&5
++        { echo "$as_me:942:   former value:  $ac_old_val" >&5
+ echo "$as_me:   former value:  $ac_old_val" >&2;}
+-        { echo "$as_me:933:   current value: $ac_new_val" >&5
++        { echo "$as_me:944:   current value: $ac_new_val" >&5
+ echo "$as_me:   current value: $ac_new_val" >&2;}
+         ac_cache_corrupted=:
+       fi;;
+@@ -949,9 +960,9 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
+   fi
+ done
+ if $ac_cache_corrupted; then
+-  { echo "$as_me:952: error: changes in the environment can compromise the build" >&5
++  { echo "$as_me:963: 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:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++  { { echo "$as_me:965: 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
+@@ -972,10 +983,10 @@ esac
+ echo "#! $SHELL" >conftest.sh
+ echo  "exit 0"   >>conftest.sh
+ chmod +x conftest.sh
+-if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5
++if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
+   (PATH=".;."; conftest.sh) 2>&5
+   ac_status=$?
+-  echo "$as_me:978: \$? = $ac_status" >&5
++  echo "$as_me:989: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+   ac_path_separator=';'
+ else
+@@ -1005,7 +1016,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+   fi
+ done
+ if test -z "$ac_aux_dir"; then
+-  { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
++  { { echo "$as_me:1019: 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
+@@ -1015,11 +1026,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:1018: error: cannot run $ac_config_sub" >&5
++  { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
+ echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+-echo "$as_me:1022: checking build system type" >&5
++echo "$as_me:1033: 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
+@@ -1028,23 +1039,23 @@ else
+ test -z "$ac_cv_build_alias" &&
+   ac_cv_build_alias=`$ac_config_guess`
+ test -z "$ac_cv_build_alias" &&
+-  { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
++  { { echo "$as_me:1042: 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:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
++  { { echo "$as_me:1046: 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:1040: result: $ac_cv_build" >&5
++echo "$as_me:1051: 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:1047: checking host system type" >&5
++echo "$as_me:1058: 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
+@@ -1053,12 +1064,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:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
++  { { echo "$as_me:1067: 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:1061: result: $ac_cv_host" >&5
++echo "$as_me:1072: 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/'`
+@@ -1066,7 +1077,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:1069: checking target system type" >&5
++	echo "$as_me:1080: 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
+@@ -1075,12 +1086,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:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5
++  { { echo "$as_me:1089: 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:1083: result: $ac_cv_target" >&5
++echo "$as_me:1094: 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/'`
+@@ -1100,7 +1111,8 @@ else
+ 		system_name="`(hostname) 2>/dev/null`"
+ 	fi
+ fi
+-test -n "$system_name" && cat >>confdefs.h <<EOF
++test -n "$system_name" &&
++cat >>confdefs.h <<EOF
+ #define SYSTEM_NAME "$system_name"
+ EOF
+ 
+@@ -1111,13 +1123,13 @@ else
+ fi
+ 
+ test -z "$system_name" && system_name="$cf_cv_system_name"
+-test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5
++test -n "$cf_cv_system_name" && echo "$as_me:1126: 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:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
++	echo "$as_me:1130: 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:1120: error: \"Please remove config.cache and try again.\"" >&5
++	{ { echo "$as_me:1132: 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
+@@ -1125,9 +1137,11 @@ 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:1128: WARNING: overriding system type to $withval" >&5
++  { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
+ echo "$as_me: WARNING: overriding system type to $withval" >&2;}
+- cf_cv_system_name=$withval
++	cf_cv_system_name=$withval
++	host_os=$withval
++
+ fi;
+ 
+ ###	Save the given $CFLAGS to allow user-override.
+@@ -1135,23 +1149,23 @@ cf_user_CFLAGS="$CFLAGS"
+ 
+ ###	Default install-location
+ 
+-echo "$as_me:1138: checking for prefix" >&5
++echo "$as_me:1152: 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
+ 		# non-vendor systems don't have a conflict
+-	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
++	openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
+ 		prefix=/usr
+ 		;;
+ 	*)	prefix=$ac_default_prefix
+ 		;;
+ 	esac
+ fi
+-echo "$as_me:1150: result: $prefix" >&5
++echo "$as_me:1164: result: $prefix" >&5
+ echo "${ECHO_T}$prefix" >&6
+ 
+ if test "x$prefix" = "xNONE" ; then
+-echo "$as_me:1154: checking for default include-directory" >&5
++echo "$as_me:1168: 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 \
+@@ -1174,11 +1188,12 @@ do
+ 	fi
+ 	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
+ done
+-echo "$as_me:1177: result: $includedir" >&5
++echo "$as_me:1191: result: $includedir" >&5
+ echo "${ECHO_T}$includedir" >&6
+ fi
+ 
+ ###	Checks for programs.
++
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -1186,213 +1201,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_main_return=return
+ if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}gcc; ac_word=$2
+-echo "$as_me:1191: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}gcc"
+-echo "$as_me:1206: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1214: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1217: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+-  ac_ct_CC=$CC
+-  # Extract the first word of "gcc", so it can be a program name with args.
+-set dummy gcc; ac_word=$2
+-echo "$as_me:1226: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$ac_ct_CC"; then
+-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="gcc"
+-echo "$as_me:1241: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1249: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
+-else
+-  echo "$as_me:1252: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-  CC=$ac_ct_CC
+-else
+-  CC="$ac_cv_prog_CC"
+-fi
+-
+-if test -z "$CC"; then
+-  if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}cc; ac_word=$2
+-echo "$as_me:1265: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}cc"
+-echo "$as_me:1280: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1288: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1291: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+-  ac_ct_CC=$CC
+-  # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:1300: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$ac_ct_CC"; then
+-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="cc"
+-echo "$as_me:1315: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1323: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
+-else
+-  echo "$as_me:1326: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-  CC=$ac_ct_CC
+-else
+-  CC="$ac_cv_prog_CC"
+-fi
+-
+-fi
+-if test -z "$CC"; then
+-  # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:1339: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_prog_rejected=no
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+-  ac_prog_rejected=yes
+-  continue
+-fi
+-ac_cv_prog_CC="cc"
+-echo "$as_me:1359: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-if test $ac_prog_rejected = yes; then
+-  # We found a bogon in the path, so make sure we never use it.
+-  set dummy $ac_cv_prog_CC
+-  shift
+-  if test $# != 0; then
+-    # We chose a different compiler from the bogus one.
+-    # However, it has the same basename, so the bogon will be chosen
+-    # first if we set CC to just the basename; use the full file name.
+-    shift
+-    set dummy "$ac_dir/$ac_word" ${1+"$@"}
+-    shift
+-    ac_cv_prog_CC="$@"
+-  fi
+-fi
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1381: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1384: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$CC"; then
+-  if test -n "$ac_tool_prefix"; then
+-  for ac_prog in cl
++  for ac_prog in gnatgcc gcc cc
+   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:1395: checking for $ac_word" >&5
++echo "$as_me:1208: 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
+@@ -1407,7 +1220,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:1410: found $ac_dir/$ac_word" >&5
++echo "$as_me:1223: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -1415,10 +1228,10 @@ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  echo "$as_me:1418: result: $CC" >&5
++  echo "$as_me:1231: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+-  echo "$as_me:1421: result: no" >&5
++  echo "$as_me:1234: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -1427,11 +1240,11 @@ fi
+ fi
+ if test -z "$CC"; then
+   ac_ct_CC=$CC
+-  for ac_prog in cl
++  for ac_prog in gnatgcc gcc cc
+ 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:1434: checking for $ac_word" >&5
++echo "$as_me:1247: 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
+@@ -1446,7 +1259,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:1449: found $ac_dir/$ac_word" >&5
++echo "$as_me:1262: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -1454,10 +1267,10 @@ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1457: result: $ac_ct_CC" >&5
++  echo "$as_me:1270: result: $ac_ct_CC" >&5
+ echo "${ECHO_T}$ac_ct_CC" >&6
+ else
+-  echo "$as_me:1460: result: no" >&5
++  echo "$as_me:1273: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -1467,34 +1280,32 @@ done
+   CC=$ac_ct_CC
+ fi
+ 
+-fi
+-
+-test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5
++test -z "$CC" && { { echo "$as_me:1283: 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:1477:" \
++echo "$as_me:1288:" \
+      "checking for C compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:1480: \"$ac_compiler --version </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
+   (eval $ac_compiler --version </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1483: \$? = $ac_status" >&5
++  echo "$as_me:1294: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:1485: \"$ac_compiler -v </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
+   (eval $ac_compiler -v </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1488: \$? = $ac_status" >&5
++  echo "$as_me:1299: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:1490: \"$ac_compiler -V </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
+   (eval $ac_compiler -V </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1493: \$? = $ac_status" >&5
++  echo "$as_me:1304: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1497 "configure"
++#line 1308 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1510,13 +1321,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:1513: checking for C compiler default output" >&5
++echo "$as_me:1324: 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:1516: \"$ac_link_default\"") >&5
++if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
+   (eval $ac_link_default) 2>&5
+   ac_status=$?
+-  echo "$as_me:1519: \$? = $ac_status" >&5
++  echo "$as_me:1330: \$? = $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
+@@ -1539,34 +1350,34 @@ done
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1542: error: C compiler cannot create executables" >&5
++{ { echo "$as_me:1353: 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:1548: result: $ac_file" >&5
++echo "$as_me:1359: 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:1553: checking whether the C compiler works" >&5
++echo "$as_me:1364: 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:1559: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1370: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1562: \$? = $ac_status" >&5
++  echo "$as_me:1373: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+     cross_compiling=no
+   else
+     if test "$cross_compiling" = maybe; then
+ 	cross_compiling=yes
+     else
+-	{ { echo "$as_me:1569: error: cannot run C compiled programs.
++	{ { echo "$as_me:1380: 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;}
+@@ -1574,24 +1385,24 @@ If you meant to cross compile, use \`--host'." >&2;}
+     fi
+   fi
+ fi
+-echo "$as_me:1577: result: yes" >&5
++echo "$as_me:1388: 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:1584: checking whether we are cross compiling" >&5
++echo "$as_me:1395: checking whether we are cross compiling" >&5
+ echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+-echo "$as_me:1586: result: $cross_compiling" >&5
++echo "$as_me:1397: result: $cross_compiling" >&5
+ echo "${ECHO_T}$cross_compiling" >&6
+ 
+-echo "$as_me:1589: checking for executable suffix" >&5
++echo "$as_me:1400: checking for executable suffix" >&5
+ echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+-if { (eval echo "$as_me:1591: \"$ac_link\"") >&5
++if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:1594: \$? = $ac_status" >&5
++  echo "$as_me:1405: \$? = $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
+@@ -1607,25 +1418,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+   esac
+ done
+ else
+-  { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5
++  { { echo "$as_me:1421: 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:1616: result: $ac_cv_exeext" >&5
++echo "$as_me:1427: 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:1622: checking for object suffix" >&5
++echo "$as_me:1433: 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 1628 "configure"
++#line 1439 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1637,10 +1448,10 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1643: \$? = $ac_status" >&5
++  echo "$as_me:1454: \$? = $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
+@@ -1652,24 +1463,24 @@ done
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5
++{ { echo "$as_me:1466: 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:1662: result: $ac_cv_objext" >&5
++echo "$as_me:1473: result: $ac_cv_objext" >&5
+ echo "${ECHO_T}$ac_cv_objext" >&6
+ OBJEXT=$ac_cv_objext
+ ac_objext=$OBJEXT
+-echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5
++echo "$as_me:1477: 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 1672 "configure"
++#line 1483 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1684,16 +1495,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1690: \$? = $ac_status" >&5
++  echo "$as_me:1501: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1693: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1504: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1696: \$? = $ac_status" >&5
++  echo "$as_me:1507: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_compiler_gnu=yes
+ else
+@@ -1705,19 +1516,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ 
+ fi
+-echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5
++echo "$as_me:1519: 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:1714: checking whether $CC accepts -g" >&5
++echo "$as_me:1525: 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 1720 "configure"
++#line 1531 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1729,16 +1540,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1735: \$? = $ac_status" >&5
++  echo "$as_me:1546: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1738: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1549: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1741: \$? = $ac_status" >&5
++  echo "$as_me:1552: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_prog_cc_g=yes
+ else
+@@ -1748,7 +1559,7 @@ ac_cv_prog_cc_g=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5
++echo "$as_me:1562: 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
+@@ -1775,16 +1586,16 @@ cat >conftest.$ac_ext <<_ACEOF
+ #endif
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1781: \$? = $ac_status" >&5
++  echo "$as_me:1592: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1784: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1595: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1787: \$? = $ac_status" >&5
++  echo "$as_me:1598: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   for ac_declaration in \
+    ''\
+@@ -1796,7 +1607,7 @@ if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
+    'void exit (int);'
+ do
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 1799 "configure"
++#line 1610 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ $ac_declaration
+@@ -1809,16 +1620,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1815: \$? = $ac_status" >&5
++  echo "$as_me:1626: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1818: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1629: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1821: \$? = $ac_status" >&5
++  echo "$as_me:1632: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -1828,7 +1639,7 @@ continue
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 1831 "configure"
++#line 1642 "configure"
+ #include "confdefs.h"
+ $ac_declaration
+ int
+@@ -1840,16 +1651,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1846: \$? = $ac_status" >&5
++  echo "$as_me:1657: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1849: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1660: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1852: \$? = $ac_status" >&5
++  echo "$as_me:1663: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -1879,68 +1690,259 @@ ac_main_return=return
+ 
+ GCC_VERSION=none
+ if test "$GCC" = yes ; then
+-	echo "$as_me:1882: checking version of $CC" >&5
++	echo "$as_me:1693: 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/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
++	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.].*//'`"
+ 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
+-	echo "$as_me:1886: result: $GCC_VERSION" >&5
++	echo "$as_me:1697: result: $GCC_VERSION" >&5
+ echo "${ECHO_T}$GCC_VERSION" >&6
+ fi
+ 
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-ac_main_return=return
+-echo "$as_me:1896: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+-# On Suns, sometimes $CPP names a directory.
+-if test -n "$CPP" && test -d "$CPP"; then
+-  CPP=
+-fi
+-if test -z "$CPP"; then
+-  if test "${ac_cv_prog_CPP+set}" = set; then
++echo "$as_me:1701: 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
+ else
+-      # Double quotes because CPP needs to be expanded
+-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+-    do
+-      ac_preproc_ok=false
+-for ac_c_preproc_warn_flag in '' yes
+-do
+-  # Use a header file that comes with gcc, so configuring glibc
+-  # with a fresh cross-compiler works.
+-  # On the NeXT, cc -E runs the code through the compiler's parser,
+-  # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-#line 1917 "configure"
++  ac_cv_prog_cc_stdc=no
++ac_save_CC=$CC
++cat >conftest.$ac_ext <<_ACEOF
++#line 1709 "configure"
+ #include "confdefs.h"
+-#include <assert.h>
+-                     Syntax error
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* 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;
++{
++  return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++  char *s;
++  va_list v;
++  va_start (v,p);
++  s = g (p, va_arg (v,int));
++  va_end (v);
++  return s;
++}
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
++  ;
++  return 0;
++}
+ _ACEOF
+-if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5
+-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++# Don't try gcc -ansi; that turns off useful extensions and
++# breaks some systems' header files.
++# AIX			-qlanglvl=ansi
++# Ultrix and OSF/1	-std1
++# HP-UX 10.20 and later	-Ae
++# HP-UX older versions	-Aa -D_HPUX_SOURCE
++# SVR4			-Xc -D__EXTENSIONS__
++for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++  CC="$ac_save_CC $ac_arg"
++  rm -f conftest.$ac_objext
++if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
+   ac_status=$?
+-  egrep -v '^ *\+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:1928: \$? = $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
+-  :
++  echo "$as_me:1761: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:1764: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:1767: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  ac_cv_prog_cc_stdc=$ac_arg
++break
+ else
+   echo "$as_me: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  # Broken: fails on valid input.
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext
++done
++rm -f conftest.$ac_ext conftest.$ac_objext
++CC=$ac_save_CC
++
++fi
++
++case "x$ac_cv_prog_cc_stdc" in
++  x|xno)
++    echo "$as_me:1784: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6 ;;
++  *)
++    echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
++    CC="$CC $ac_cv_prog_cc_stdc" ;;
++esac
++
++# This should have been defined by AC_PROG_CC
++: ${CC:=cc}
++
++echo "$as_me:1795: checking \$CC variable" >&5
++echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
++case "$CC" in #(vi
++*[\ \	]-[IUD]*)
++	echo "$as_me:1799: result: broken" >&5
++echo "${ECHO_T}broken" >&6
++	{ echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
++echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
++	# humor him...
++	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
++	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_flags
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
++
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
++fi
++
++	;;
++*)
++	echo "$as_me:1887: result: ok" >&5
++echo "${ECHO_T}ok" >&6
++	;;
++esac
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++ac_main_return=return
++echo "$as_me:1898: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++  CPP=
++fi
++if test -z "$CPP"; then
++  if test "${ac_cv_prog_CPP+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++      # Double quotes because CPP needs to be expanded
++    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++    do
++      ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat >conftest.$ac_ext <<_ACEOF
++#line 1919 "configure"
++#include "confdefs.h"
++#include <assert.h>
++                     Syntax error
++_ACEOF
++if { (eval echo "$as_me:1924: \"$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:1930: \$? = $ac_status" >&5
++  (exit $ac_status); } >/dev/null; then
++  if test -s conftest.err; then
++    ac_cpp_err=$ac_c_preproc_warn_flag
++  else
++    ac_cpp_err=
++  fi
++else
++  ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  # Broken: fails on valid input.
+ continue
+ fi
+ rm -f conftest.err conftest.$ac_ext
+@@ -1948,17 +1950,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 1951 "configure"
++#line 1953 "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:1957: \"$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:1961: \$? = $ac_status" >&5
++  echo "$as_me:1963: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -1995,7 +1997,7 @@ fi
+ else
+   ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:1998: result: $CPP" >&5
++echo "$as_me:2000: result: $CPP" >&5
+ echo "${ECHO_T}$CPP" >&6
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+@@ -2005,18 +2007,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 2008 "configure"
++#line 2010 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+                      Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:2015: \"$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:2019: \$? = $ac_status" >&5
++  echo "$as_me:2021: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2039,17 +2041,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 2042 "configure"
++#line 2044 "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:2048: \"$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:2052: \$? = $ac_status" >&5
++  echo "$as_me:2054: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2077,7 +2079,7 @@ rm -f conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then
+   :
+ else
+-  { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5
++  { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -2090,14 +2092,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:2093: checking whether $CC needs -traditional" >&5
++    echo "$as_me:2095: 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 2100 "configure"
++#line 2102 "configure"
+ #include "confdefs.h"
+ #include <sgtty.h>
+ int Autoconf = TIOCGETP;
+@@ -2112,7 +2114,7 @@ rm -rf conftest*
+ 
+   if test $ac_cv_prog_gcc_traditional = no; then
+     cat >conftest.$ac_ext <<_ACEOF
+-#line 2115 "configure"
++#line 2117 "configure"
+ #include "confdefs.h"
+ #include <termio.h>
+ int Autoconf = TCGETA;
+@@ -2125,14 +2127,14 @@ rm -rf conftest*
+ 
+   fi
+ fi
+-echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5
++echo "$as_me:2130: 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:2135: checking whether $CC understands -c and -o together" >&5
++echo "$as_me:2137: 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
+@@ -2148,15 +2150,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 -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+-if { (eval echo "$as_me:2151: \"$ac_try\"") >&5
++if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2154: \$? = $ac_status" >&5
++  echo "$as_me:2156: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-  test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5
++  test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2159: \$? = $ac_status" >&5
++  echo "$as_me:2161: \$? = $ac_status" >&5
+   (exit $ac_status); };
+ then
+   eval cf_cv_prog_CC_c_o=yes
+@@ -2167,378 +2169,84 @@ rm -rf conftest*
+ 
+ fi
+ if test $cf_cv_prog_CC_c_o = yes; then
+-  echo "$as_me:2170: result: yes" >&5
++  echo "$as_me:2172: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+-  echo "$as_me:2173: result: no" >&5
++  echo "$as_me:2175: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+-echo "$as_me:2177: checking for POSIXized ISC" >&5
+-echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
+-if test -d /etc/conf/kconfig.d &&
+-   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+-then
+-  echo "$as_me:2182: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+-  ISC=yes # If later tests want to check for ISC.
++test "$program_prefix" != NONE &&
++  program_transform_name="s,^,$program_prefix,;$program_transform_name"
++# Use a double $ so make ignores it.
++test "$program_suffix" != NONE &&
++  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
++# Double any \ or $.  echo might interpret backslashes.
++# By default was `s,x,x', remove it if useless.
++cat <<\_ACEOF >conftest.sed
++s/[\\$]/&&/g;s/;s,x,x,$//
++_ACEOF
++program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
++rm conftest.sed
+ 
+-cat >>confdefs.h <<\EOF
+-#define _POSIX_SOURCE 1
+-EOF
++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:2196: 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
++else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_AWK="$ac_prog"
++echo "$as_me:2211: found $ac_dir/$ac_word" >&5
++break
++done
+ 
+-  if test "$GCC" = yes; then
+-    CC="$CC -posix"
+-  else
+-    CC="$CC -Xp"
+-  fi
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  echo "$as_me:2219: result: $AWK" >&5
++echo "${ECHO_T}$AWK" >&6
+ else
+-  echo "$as_me:2196: result: no" >&5
++  echo "$as_me:2222: result: no" >&5
+ echo "${ECHO_T}no" >&6
+-  ISC=
+ fi
+ 
+-echo "$as_me:2201: checking for ${CC:-cc} option to accept ANSI C" >&5
+-echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
+-if test "${cf_cv_ansi_cc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-
+-cf_cv_ansi_cc=no
+-cf_save_CFLAGS="$CFLAGS"
+-cf_save_CPPFLAGS="$CPPFLAGS"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX			-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc
+-# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
+-for cf_arg in "-DCC_HAS_PROTOS" \
+-	"" \
+-	-qlanglvl=ansi \
+-	-std1 \
+-	-Ae \
+-	"-Aa -D_HPUX_SOURCE" \
+-	-Xc
+-do
+-
+-cf_fix_cppflags=no
+-cf_new_cflags=
+-cf_new_cppflags=
+-cf_new_extra_cppflags=
++  test -n "$AWK" && break
++done
+ 
+-for cf_add_cflags in $cf_arg
+-do
+-case $cf_fix_cppflags in
+-no)
+-	case $cf_add_cflags in #(vi
+-	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+-		case $cf_add_cflags in
+-		-D*)
+-			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
++echo "$as_me: error: No awk program found" >&2;}
++   { (exit 1); exit 1; }; }
+ 
+-			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-				&& test -z "${cf_tst_cflags}" \
+-				&& cf_fix_cppflags=yes
++echo "$as_me:2233: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6
++if test "${ac_cv_prog_egrep+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
++    then ac_cv_prog_egrep='grep -E'
++    else ac_cv_prog_egrep='egrep'
++    fi
++fi
++echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
++echo "${ECHO_T}$ac_cv_prog_egrep" >&6
++ EGREP=$ac_cv_prog_egrep
+ 
+-			if test $cf_fix_cppflags = yes ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			elif test "${cf_tst_cflags}" = "\"'" ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			fi
+-			;;
+-		esac
+-		case "$CPPFLAGS" in
+-		*$cf_add_cflags) #(vi
+-			;;
+-		*) #(vi
+-			case $cf_add_cflags in #(vi
+-			-D*)
+-				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+-
+-CPPFLAGS=`echo "$CPPFLAGS" | \
+-	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
+-		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
+-
+-				;;
+-			esac
+-			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+-			;;
+-		esac
+-		;;
+-	*)
+-		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+-		;;
+-	esac
+-	;;
+-yes)
+-	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-
+-	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+-
+-	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-		&& test -z "${cf_tst_cflags}" \
+-		&& cf_fix_cppflags=no
+-	;;
+-esac
+-done
+-
+-if test -n "$cf_new_cflags" ; then
+-
+-	CFLAGS="$CFLAGS $cf_new_cflags"
+-fi
+-
+-if test -n "$cf_new_cppflags" ; then
+-
+-	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+-fi
+-
+-if test -n "$cf_new_extra_cppflags" ; then
+-
+-	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+-fi
+-
+-	cat >conftest.$ac_ext <<_ACEOF
+-#line 2305 "configure"
+-#include "confdefs.h"
+-
+-#ifndef CC_HAS_PROTOS
+-#if !defined(__STDC__) || (__STDC__ != 1)
+-choke me
+-#endif
+-#endif
+-
+-int
+-main ()
+-{
+-
+-	int test (int i, double x);
+-	struct s1 {int (*f) (int a);};
+-	struct s2 {int (*f) (double a);};
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2326: \"$ac_compile\"") >&5
+-  (eval $ac_compile) 2>&5
+-  ac_status=$?
+-  echo "$as_me:2329: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-         { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2332: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:2335: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  cf_cv_ansi_cc="$cf_arg"; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
+-done
+-CFLAGS="$cf_save_CFLAGS"
+-CPPFLAGS="$cf_save_CPPFLAGS"
+-
+-fi
+-echo "$as_me:2348: result: $cf_cv_ansi_cc" >&5
+-echo "${ECHO_T}$cf_cv_ansi_cc" >&6
+-
+-if test "$cf_cv_ansi_cc" != "no"; then
+-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+-
+-cf_fix_cppflags=no
+-cf_new_cflags=
+-cf_new_cppflags=
+-cf_new_extra_cppflags=
+-
+-for cf_add_cflags in $cf_cv_ansi_cc
+-do
+-case $cf_fix_cppflags in
+-no)
+-	case $cf_add_cflags in #(vi
+-	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+-		case $cf_add_cflags in
+-		-D*)
+-			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+-
+-			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-				&& test -z "${cf_tst_cflags}" \
+-				&& cf_fix_cppflags=yes
+-
+-			if test $cf_fix_cppflags = yes ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			elif test "${cf_tst_cflags}" = "\"'" ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			fi
+-			;;
+-		esac
+-		case "$CPPFLAGS" in
+-		*$cf_add_cflags) #(vi
+-			;;
+-		*) #(vi
+-			case $cf_add_cflags in #(vi
+-			-D*)
+-				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+-
+-CPPFLAGS=`echo "$CPPFLAGS" | \
+-	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
+-		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
+-
+-				;;
+-			esac
+-			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+-			;;
+-		esac
+-		;;
+-	*)
+-		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+-		;;
+-	esac
+-	;;
+-yes)
+-	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-
+-	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+-
+-	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-		&& test -z "${cf_tst_cflags}" \
+-		&& cf_fix_cppflags=no
+-	;;
+-esac
+-done
+-
+-if test -n "$cf_new_cflags" ; then
+-
+-	CFLAGS="$CFLAGS $cf_new_cflags"
+-fi
+-
+-if test -n "$cf_new_cppflags" ; then
+-
+-	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+-fi
+-
+-if test -n "$cf_new_extra_cppflags" ; then
+-
+-	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+-fi
+-
+-else
+-	cat >>confdefs.h <<\EOF
+-#define CC_HAS_PROTOS 1
+-EOF
+-
+-fi
+-fi
+-
+-if test "$cf_cv_ansi_cc" = "no"; then
+-	{ { echo "$as_me:2441: error: Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto" >&5
+-echo "$as_me: error: Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-case $cf_cv_system_name in
+-os2*)
+-    CFLAGS="$CFLAGS -Zmt"
+-    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+-    CXXFLAGS="$CXXFLAGS -Zmt"
+-    # autoconf's macro sets -Zexe and suffix both, which conflict:w
+-    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+-    ac_cv_exeext=.exe
+-    ;;
+-esac
+-
+-PROG_EXT="$EXEEXT"
+-
+-test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
+-#define PROG_EXT "$PROG_EXT"
+-EOF
+-
+-test "$program_prefix" != NONE &&
+-  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+-# Use a double $ so make ignores it.
+-test "$program_suffix" != NONE &&
+-  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+-# Double any \ or $.  echo might interpret backslashes.
+-# By default was `s,x,x', remove it if useless.
+-cat <<\_ACEOF >conftest.sed
+-s/[\\$]/&&/g;s/;s,x,x,$//
+-_ACEOF
+-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+-rm conftest.sed
+-
+-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:2488: 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
+-else
+-  if test -n "$AWK"; then
+-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_AWK="$ac_prog"
+-echo "$as_me:2503: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-AWK=$ac_cv_prog_AWK
+-if test -n "$AWK"; then
+-  echo "$as_me:2511: result: $AWK" >&5
+-echo "${ECHO_T}$AWK" >&6
+-else
+-  echo "$as_me:2514: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-  test -n "$AWK" && break
+-done
+-
+-test -z "$AWK" && { { echo "$as_me:2521: error: No awk program found" >&5
+-echo "$as_me: error: No awk program found" >&2;}
+-   { (exit 1); exit 1; }; }
+-
+-echo "$as_me:2525: checking for egrep" >&5
+-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+-if test "${ac_cv_prog_egrep+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+-    then ac_cv_prog_egrep='grep -E'
+-    else ac_cv_prog_egrep='egrep'
+-    fi
+-fi
+-echo "$as_me:2535: result: $ac_cv_prog_egrep" >&5
+-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+- EGREP=$ac_cv_prog_egrep
+-
+-test -z "$EGREP" && { { echo "$as_me:2539: error: No egrep program found" >&5
+-echo "$as_me: error: No egrep program found" >&2;}
+-   { (exit 1); exit 1; }; }
++test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
++echo "$as_me: error: No egrep program found" >&2;}
++   { (exit 1); exit 1; }; }
+ 
+ # Find a good install program.  We prefer a C program (faster),
+ # so one script is as good as another.  But avoid the broken or
+@@ -2552,7 +2260,7 @@ echo "$as_me: error: No egrep 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:2555: checking for a BSD compatible install" >&5
++echo "$as_me:2263: 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
+@@ -2601,7 +2309,7 @@ fi
+     INSTALL=$ac_install_sh
+   fi
+ fi
+-echo "$as_me:2604: result: $INSTALL" >&5
++echo "$as_me:2312: result: $INSTALL" >&5
+ echo "${ECHO_T}$INSTALL" >&6
+ 
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+@@ -2612,18 +2320,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+ 
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
+-echo "$as_me:2615: checking whether ln -s works" >&5
++echo "$as_me:2323: 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:2619: result: yes" >&5
++  echo "$as_me:2327: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+-  echo "$as_me:2622: result: no, using $LN_S" >&5
++  echo "$as_me:2330: result: no, using $LN_S" >&5
+ echo "${ECHO_T}no, using $LN_S" >&6
+ fi
+ 
+-echo "$as_me:2626: checking if $LN_S -f options work" >&5
++echo "$as_me:2334: 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
+@@ -2635,12 +2343,12 @@ else
+ 	cf_prog_ln_sf=no
+ fi
+ rm -f conf$$.dst conf$$src
+-echo "$as_me:2638: result: $cf_prog_ln_sf" >&5
++echo "$as_me:2346: 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:2643: checking for long file names" >&5
++echo "$as_me:2351: 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
+@@ -2679,7 +2387,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:2682: result: $ac_cv_sys_long_file_names" >&5
++echo "$as_me:2390: 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
+ 
+@@ -2691,7 +2399,7 @@ fi
+ 
+ # if we find pkg-config, check if we should install the ".pc" files.
+ 
+-echo "$as_me:2694: checking if you want to use pkg-config" >&5
++echo "$as_me:2402: 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.
+@@ -2701,7 +2409,7 @@ if test "${with_pkg_config+set}" = set; then
+ else
+   cf_pkg_config=yes
+ fi;
+-echo "$as_me:2704: result: $cf_pkg_config" >&5
++echo "$as_me:2412: result: $cf_pkg_config" >&5
+ echo "${ECHO_T}$cf_pkg_config" >&6
+ 
+ case $cf_pkg_config in #(vi
+@@ -2709,10 +2417,11 @@ no) #(vi
+ 	PKG_CONFIG=none
+ 	;;
+ yes) #(vi
+-	if test -n "$ac_tool_prefix"; then
++
++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:2715: checking for $ac_word" >&5
++echo "$as_me:2424: 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
+@@ -2729,7 +2438,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:2732: found $ac_dir/$ac_word" >&5
++   echo "$as_me:2441: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -2740,10 +2449,10 @@ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ 
+ if test -n "$PKG_CONFIG"; then
+-  echo "$as_me:2743: result: $PKG_CONFIG" >&5
++  echo "$as_me:2452: result: $PKG_CONFIG" >&5
+ echo "${ECHO_T}$PKG_CONFIG" >&6
+ else
+-  echo "$as_me:2746: result: no" >&5
++  echo "$as_me:2455: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -2752,7 +2461,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:2755: checking for $ac_word" >&5
++echo "$as_me:2464: 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
+@@ -2769,7 +2478,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:2772: found $ac_dir/$ac_word" >&5
++   echo "$as_me:2481: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -2781,10 +2490,10 @@ fi
+ ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+ 
+ if test -n "$ac_pt_PKG_CONFIG"; then
+-  echo "$as_me:2784: result: $ac_pt_PKG_CONFIG" >&5
++  echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
+ echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+ else
+-  echo "$as_me:2787: result: no" >&5
++  echo "$as_me:2496: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -2815,7 +2524,7 @@ case ".$PKG_CONFIG" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval PKG_CONFIG="$PKG_CONFIG"
+   case ".$PKG_CONFIG" in #(vi
+   .NONE/*)
+@@ -2827,7 +2536,7 @@ case ".$PKG_CONFIG" in #(vi
+   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:2830: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
++  { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+@@ -2836,15 +2545,50 @@ esac
+ fi
+ 
+ if test "$PKG_CONFIG" != none ; then
+-	echo "$as_me:2839: 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
++	echo "$as_me:2548: checking for $PKG_CONFIG library directory" >&5
++echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
+ 
+-	# Leave this as something that can be overridden in the environment.
+-	if test -z "$PKG_CONFIG_LIBDIR" ; then
+-		PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
+-	fi
+-	PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
+-	if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
++# 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
++else
++  PKG_CONFIG_LIBDIR=yes
++fi;
++
++	case x$PKG_CONFIG_LIBDIR in #(vi
++	x/*) #(vi
++		;;
++	xyes) #(vi
++		# look for the library directory using the same prefix as the executable
++		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
++		case x`(arch) 2>/dev/null` in #(vi
++		*64) #(vi
++			for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
++			do
++				if test -d $cf_config/pkgconfig
++				then
++					PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
++					break
++				fi
++			done
++			;;
++		*)
++			PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
++			;;
++		esac
++		;;
++	*)
++		;;
++	esac
++
++	echo "$as_me:2585: result: $PKG_CONFIG_LIBDIR" >&5
++echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
++fi
++
++if test "$PKG_CONFIG" != none ; then
++	echo "$as_me:2590: 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
+ 
+ # Check whether --enable-pc-files or --disable-pc-files was given.
+ if test "${enable_pc_files+set}" = set; then
+@@ -2853,18 +2597,48 @@ if test "${enable_pc_files+set}" = set; then
+ else
+   enable_pc_files=no
+ fi;
+-		echo "$as_me:2856: result: $enable_pc_files" >&5
++	echo "$as_me:2600: result: $enable_pc_files" >&5
+ echo "${ECHO_T}$enable_pc_files" >&6
+-	else
+-		echo "$as_me:2859: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-		{ echo "$as_me:2861: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
+-echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
+-		enable_pc_files=no
+-	fi
++	if test "$enable_pc_files" != no
++	then
++
++if test "x$prefix" != xNONE; then
++  cf_path_syntax="$prefix"
++else
++  cf_path_syntax="$ac_default_prefix"
++fi
++
++case ".$PKG_CONFIG_LIBDIR" in #(vi
++.\$\(*\)*|.\'*\'*) #(vi
++  ;;
++..|./*|.\\*) #(vi
++  ;;
++.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
++  ;;
++.\${*prefix}*|.\${*dir}*) #(vi
++  eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
++  case ".$PKG_CONFIG_LIBDIR" in #(vi
++  .NONE/*)
++    PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
++    ;;
++  esac
++  ;; #(vi
++.no|.NONE/*)
++  PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
++  ;;
++*)
++  { { echo "$as_me:2630: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
++echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
++   { (exit 1); exit 1; }; }
++  ;;
++esac
++
++	fi
++else
++	enable_pc_files=no
+ fi
+ 
+-echo "$as_me:2867: checking if you want to build test-programs" >&5
++echo "$as_me:2641: 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.
+@@ -2874,10 +2648,10 @@ if test "${with_tests+set}" = set; then
+ else
+   cf_with_tests=yes
+ fi;
+-echo "$as_me:2877: result: $cf_with_tests" >&5
++echo "$as_me:2651: result: $cf_with_tests" >&5
+ echo "${ECHO_T}$cf_with_tests" >&6
+ 
+-echo "$as_me:2880: checking if we should assume mixed-case filenames" >&5
++echo "$as_me:2654: 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.
+@@ -2887,11 +2661,11 @@ if test "${enable_mixed_case+set}" = set; then
+ else
+   enable_mixedcase=auto
+ fi;
+-echo "$as_me:2890: result: $enable_mixedcase" >&5
++echo "$as_me:2664: result: $enable_mixedcase" >&5
+ echo "${ECHO_T}$enable_mixedcase" >&6
+ if test "$enable_mixedcase" = "auto" ; then
+ 
+-echo "$as_me:2894: checking if filesystem supports mixed-case filenames" >&5
++echo "$as_me:2668: 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
+@@ -2918,9 +2692,10 @@ else
+ fi
+ 
+ fi
+-echo "$as_me:2921: result: $cf_cv_mixedcase" >&5
++echo "$as_me:2695: result: $cf_cv_mixedcase" >&5
+ echo "${ECHO_T}$cf_cv_mixedcase" >&6
+-test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
++test "$cf_cv_mixedcase" = yes &&
++cat >>confdefs.h <<\EOF
+ #define MIXEDCASE_FILENAMES 1
+ EOF
+ 
+@@ -2935,7 +2710,7 @@ EOF
+ fi
+ 
+ # do this after mixed-case option (tags/TAGS is not as important as tic).
+-echo "$as_me:2938: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "$as_me:2713: 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
+@@ -2955,11 +2730,11 @@ fi
+ rm -f conftest.make
+ fi
+ if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+-  echo "$as_me:2958: result: yes" >&5
++  echo "$as_me:2733: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+   SET_MAKE=
+ else
+-  echo "$as_me:2962: result: no" >&5
++  echo "$as_me:2737: result: no" >&5
+ echo "${ECHO_T}no" >&6
+   SET_MAKE="MAKE=${MAKE-make}"
+ fi
+@@ -2968,7 +2743,7 @@ 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:2971: checking for $ac_word" >&5
++echo "$as_me:2746: 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
+@@ -2983,7 +2758,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:2986: found $ac_dir/$ac_word" >&5
++echo "$as_me:2761: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -2991,10 +2766,10 @@ fi
+ fi
+ CTAGS=$ac_cv_prog_CTAGS
+ if test -n "$CTAGS"; then
+-  echo "$as_me:2994: result: $CTAGS" >&5
++  echo "$as_me:2769: result: $CTAGS" >&5
+ echo "${ECHO_T}$CTAGS" >&6
+ else
+-  echo "$as_me:2997: result: no" >&5
++  echo "$as_me:2772: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3005,7 +2780,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:3008: checking for $ac_word" >&5
++echo "$as_me:2783: 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
+@@ -3020,7 +2795,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:3023: found $ac_dir/$ac_word" >&5
++echo "$as_me:2798: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3028,10 +2803,10 @@ fi
+ fi
+ ETAGS=$ac_cv_prog_ETAGS
+ if test -n "$ETAGS"; then
+-  echo "$as_me:3031: result: $ETAGS" >&5
++  echo "$as_me:2806: result: $ETAGS" >&5
+ echo "${ECHO_T}$ETAGS" >&6
+ else
+-  echo "$as_me:3034: result: no" >&5
++  echo "$as_me:2809: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3040,7 +2815,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:3043: checking for $ac_word" >&5
++echo "$as_me:2818: 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
+@@ -3055,7 +2830,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:3058: found $ac_dir/$ac_word" >&5
++echo "$as_me:2833: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3064,17 +2839,17 @@ fi
+ fi
+ MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
+ if test -n "$MAKE_LOWER_TAGS"; then
+-  echo "$as_me:3067: result: $MAKE_LOWER_TAGS" >&5
++  echo "$as_me:2842: result: $MAKE_LOWER_TAGS" >&5
+ echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
+ else
+-  echo "$as_me:3070: result: no" >&5
++  echo "$as_me:2845: 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:3077: checking for $ac_word" >&5
++echo "$as_me:2852: 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
+@@ -3089,7 +2864,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:3092: found $ac_dir/$ac_word" >&5
++echo "$as_me:2867: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3098,10 +2873,10 @@ fi
+ fi
+ MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
+ if test -n "$MAKE_UPPER_TAGS"; then
+-  echo "$as_me:3101: result: $MAKE_UPPER_TAGS" >&5
++  echo "$as_me:2876: result: $MAKE_UPPER_TAGS" >&5
+ echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
+ else
+-  echo "$as_me:3104: result: no" >&5
++  echo "$as_me:2879: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3121,7 +2896,7 @@ else
+ 	MAKE_LOWER_TAGS="#"
+ fi
+ 
+-echo "$as_me:3124: checking for makeflags variable" >&5
++echo "$as_me:2899: 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
+@@ -3155,13 +2930,13 @@ CF_EOF
+ 	rm -f cf_makeflags.tmp
+ 
+ fi
+-echo "$as_me:3158: result: $cf_cv_makeflags" >&5
++echo "$as_me:2933: 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:3164: checking for $ac_word" >&5
++echo "$as_me:2939: 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
+@@ -3176,7 +2951,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:3179: found $ac_dir/$ac_word" >&5
++echo "$as_me:2954: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3184,10 +2959,10 @@ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+-  echo "$as_me:3187: result: $RANLIB" >&5
++  echo "$as_me:2962: result: $RANLIB" >&5
+ echo "${ECHO_T}$RANLIB" >&6
+ else
+-  echo "$as_me:3190: result: no" >&5
++  echo "$as_me:2965: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3196,7 +2971,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:3199: checking for $ac_word" >&5
++echo "$as_me:2974: 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
+@@ -3211,7 +2986,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:3214: found $ac_dir/$ac_word" >&5
++echo "$as_me:2989: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3220,10 +2995,10 @@ fi
+ fi
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+-  echo "$as_me:3223: result: $ac_ct_RANLIB" >&5
++  echo "$as_me:2998: result: $ac_ct_RANLIB" >&5
+ echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ else
+-  echo "$as_me:3226: result: no" >&5
++  echo "$as_me:3001: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3235,7 +3010,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:3238: checking for $ac_word" >&5
++echo "$as_me:3013: 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
+@@ -3250,7 +3025,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:3253: found $ac_dir/$ac_word" >&5
++echo "$as_me:3028: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3258,10 +3033,10 @@ fi
+ fi
+ LD=$ac_cv_prog_LD
+ if test -n "$LD"; then
+-  echo "$as_me:3261: result: $LD" >&5
++  echo "$as_me:3036: result: $LD" >&5
+ echo "${ECHO_T}$LD" >&6
+ else
+-  echo "$as_me:3264: result: no" >&5
++  echo "$as_me:3039: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3270,7 +3045,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:3273: checking for $ac_word" >&5
++echo "$as_me:3048: 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
+@@ -3285,7 +3060,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:3288: found $ac_dir/$ac_word" >&5
++echo "$as_me:3063: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3294,10 +3069,10 @@ fi
+ fi
+ ac_ct_LD=$ac_cv_prog_ac_ct_LD
+ if test -n "$ac_ct_LD"; then
+-  echo "$as_me:3297: result: $ac_ct_LD" >&5
++  echo "$as_me:3072: result: $ac_ct_LD" >&5
+ echo "${ECHO_T}$ac_ct_LD" >&6
+ else
+-  echo "$as_me:3300: result: no" >&5
++  echo "$as_me:3075: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3309,7 +3084,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:3312: checking for $ac_word" >&5
++echo "$as_me:3087: 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
+@@ -3324,7 +3099,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:3327: found $ac_dir/$ac_word" >&5
++echo "$as_me:3102: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3332,10 +3107,10 @@ fi
+ fi
+ AR=$ac_cv_prog_AR
+ if test -n "$AR"; then
+-  echo "$as_me:3335: result: $AR" >&5
++  echo "$as_me:3110: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6
+ else
+-  echo "$as_me:3338: result: no" >&5
++  echo "$as_me:3113: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3344,7 +3119,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:3347: checking for $ac_word" >&5
++echo "$as_me:3122: 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
+@@ -3359,7 +3134,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:3362: found $ac_dir/$ac_word" >&5
++echo "$as_me:3137: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3368,10 +3143,10 @@ fi
+ fi
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
+ if test -n "$ac_ct_AR"; then
+-  echo "$as_me:3371: result: $ac_ct_AR" >&5
++  echo "$as_me:3146: result: $ac_ct_AR" >&5
+ echo "${ECHO_T}$ac_ct_AR" >&6
+ else
+-  echo "$as_me:3374: result: no" >&5
++  echo "$as_me:3149: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3383,7 +3158,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:3386: checking for $ac_word" >&5
++echo "$as_me:3161: 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
+@@ -3398,7 +3173,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:3401: found $ac_dir/$ac_word" >&5
++echo "$as_me:3176: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3406,10 +3181,10 @@ fi
+ fi
+ AR=$ac_cv_prog_AR
+ if test -n "$AR"; then
+-  echo "$as_me:3409: result: $AR" >&5
++  echo "$as_me:3184: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6
+ else
+-  echo "$as_me:3412: result: no" >&5
++  echo "$as_me:3187: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3418,7 +3193,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:3421: checking for $ac_word" >&5
++echo "$as_me:3196: 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
+@@ -3433,7 +3208,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:3436: found $ac_dir/$ac_word" >&5
++echo "$as_me:3211: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3442,10 +3217,10 @@ fi
+ fi
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
+ if test -n "$ac_ct_AR"; then
+-  echo "$as_me:3445: result: $ac_ct_AR" >&5
++  echo "$as_me:3220: result: $ac_ct_AR" >&5
+ echo "${ECHO_T}$ac_ct_AR" >&6
+ else
+-  echo "$as_me:3448: result: no" >&5
++  echo "$as_me:3223: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3454,7 +3229,7 @@ else
+   AR="$ac_cv_prog_AR"
+ fi
+ 
+-echo "$as_me:3457: checking for options to update archives" >&5
++echo "$as_me:3232: 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
+@@ -3477,13 +3252,13 @@ else
+ 		rm -f conftest.a
+ 
+ 		cat >conftest.$ac_ext <<EOF
+-#line 3480 "configure"
++#line 3255 "configure"
+ int	testdata[3] = { 123, 456, 789 };
+ EOF
+-		if { (eval echo "$as_me:3483: \"$ac_compile\"") >&5
++		if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:3486: \$? = $ac_status" >&5
++  echo "$as_me:3261: \$? = $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
+@@ -3494,7 +3269,7 @@ EOF
+ 		else
+ 			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
+ 
+-echo "${as_me:-configure}:3497: testing cannot compile test-program ..." 1>&5
++echo "${as_me:-configure}:3272: testing cannot compile test-program ..." 1>&5
+ 
+ 			break
+ 		fi
+@@ -3502,7 +3277,7 @@ echo "${as_me:-configure}:3497: testing cannot compile test-program ..." 1>&5
+ 	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+ 
+ fi
+-echo "$as_me:3505: result: $cf_cv_ar_flags" >&5
++echo "$as_me:3280: result: $cf_cv_ar_flags" >&5
+ echo "${ECHO_T}$cf_cv_ar_flags" >&6
+ 
+ if test -n "$ARFLAGS" ; then
+@@ -3513,7 +3288,17 @@ else
+ 	ARFLAGS=$cf_cv_ar_flags
+ fi
+ 
+-echo "$as_me:3516: checking if you have specified an install-prefix" >&5
++	echo "$as_me:3291: 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:3298: result: $PATH_SEPARATOR" >&5
++echo "${ECHO_T}$PATH_SEPARATOR" >&6
++
++echo "$as_me:3301: checking if you have specified an install-prefix" >&5
+ echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
+ 
+ # Check whether --with-install-prefix or --without-install-prefix was given.
+@@ -3526,7 +3311,7 @@ if test "${with_install_prefix+set}" = set; then
+ 		;;
+ 	esac
+ fi;
+-echo "$as_me:3529: result: $DESTDIR" >&5
++echo "$as_me:3314: result: $DESTDIR" >&5
+ echo "${ECHO_T}$DESTDIR" >&6
+ 
+ ###############################################################################
+@@ -3554,7 +3339,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:3557: checking for $ac_word" >&5
++echo "$as_me:3342: 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
+@@ -3569,7 +3354,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:3572: found $ac_dir/$ac_word" >&5
++echo "$as_me:3357: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3577,10 +3362,10 @@ fi
+ fi
+ BUILD_CC=$ac_cv_prog_BUILD_CC
+ if test -n "$BUILD_CC"; then
+-  echo "$as_me:3580: result: $BUILD_CC" >&5
++  echo "$as_me:3365: result: $BUILD_CC" >&5
+ echo "${ECHO_T}$BUILD_CC" >&6
+ else
+-  echo "$as_me:3583: result: no" >&5
++  echo "$as_me:3368: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3588,12 +3373,12 @@ fi
+ done
+ 
+ fi;
+-	echo "$as_me:3591: checking for native build C compiler" >&5
++	echo "$as_me:3376: checking for native build C compiler" >&5
+ echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
+-	echo "$as_me:3593: result: $BUILD_CC" >&5
++	echo "$as_me:3378: result: $BUILD_CC" >&5
+ echo "${ECHO_T}$BUILD_CC" >&6
+ 
+-	echo "$as_me:3596: checking for native build C preprocessor" >&5
++	echo "$as_me:3381: 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.
+@@ -3603,10 +3388,10 @@ if test "${with_build_cpp+set}" = set; then
+ else
+   BUILD_CPP='${BUILD_CC} -E'
+ fi;
+-	echo "$as_me:3606: result: $BUILD_CPP" >&5
++	echo "$as_me:3391: result: $BUILD_CPP" >&5
+ echo "${ECHO_T}$BUILD_CPP" >&6
+ 
+-	echo "$as_me:3609: checking for native build C flags" >&5
++	echo "$as_me:3394: 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.
+@@ -3614,10 +3399,10 @@ if test "${with_build_cflags+set}" = set; then
+   withval="$with_build_cflags"
+   BUILD_CFLAGS="$withval"
+ fi;
+-	echo "$as_me:3617: result: $BUILD_CFLAGS" >&5
++	echo "$as_me:3402: result: $BUILD_CFLAGS" >&5
+ echo "${ECHO_T}$BUILD_CFLAGS" >&6
+ 
+-	echo "$as_me:3620: checking for native build C preprocessor-flags" >&5
++	echo "$as_me:3405: 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.
+@@ -3625,10 +3410,10 @@ if test "${with_build_cppflags+set}" = set; then
+   withval="$with_build_cppflags"
+   BUILD_CPPFLAGS="$withval"
+ fi;
+-	echo "$as_me:3628: result: $BUILD_CPPFLAGS" >&5
++	echo "$as_me:3413: result: $BUILD_CPPFLAGS" >&5
+ echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
+ 
+-	echo "$as_me:3631: checking for native build linker-flags" >&5
++	echo "$as_me:3416: 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.
+@@ -3636,10 +3421,10 @@ if test "${with_build_ldflags+set}" = set; then
+   withval="$with_build_ldflags"
+   BUILD_LDFLAGS="$withval"
+ fi;
+-	echo "$as_me:3639: result: $BUILD_LDFLAGS" >&5
++	echo "$as_me:3424: result: $BUILD_LDFLAGS" >&5
+ echo "${ECHO_T}$BUILD_LDFLAGS" >&6
+ 
+-	echo "$as_me:3642: checking for native build linker-libraries" >&5
++	echo "$as_me:3427: 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.
+@@ -3647,7 +3432,7 @@ if test "${with_build_libs+set}" = set; then
+   withval="$with_build_libs"
+   BUILD_LIBS="$withval"
+ fi;
+-	echo "$as_me:3650: result: $BUILD_LIBS" >&5
++	echo "$as_me:3435: result: $BUILD_LIBS" >&5
+ echo "${ECHO_T}$BUILD_LIBS" >&6
+ 
+ 	# this assumes we're on Unix.
+@@ -3657,7 +3442,7 @@ echo "${ECHO_T}$BUILD_LIBS" >&6
+ 	: ${BUILD_CC:='${CC}'}
+ 
+ 	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
+-		{ { echo "$as_me:3660: error: Cross-build requires two compilers.
++		{ { echo "$as_me:3445: 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;}
+@@ -3682,7 +3467,7 @@ fi
+ ### shared, for example.
+ cf_list_models=""
+ 
+-echo "$as_me:3685: checking if you want to build shared C-objects" >&5
++echo "$as_me:3470: checking if you want to build shared C-objects" >&5
+ echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
+ 
+ # Check whether --with-shared or --without-shared was given.
+@@ -3692,27 +3477,27 @@ if test "${with_shared+set}" = set; then
+ else
+   with_shared=no
+ fi;
+-echo "$as_me:3695: result: $with_shared" >&5
++echo "$as_me:3480: result: $with_shared" >&5
+ echo "${ECHO_T}$with_shared" >&6
+ test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
+ 
+-echo "$as_me:3699: checking for specified models" >&5
++echo "$as_me:3484: checking for specified models" >&5
+ echo $ECHO_N "checking for specified models... $ECHO_C" >&6
+ test -z "$cf_list_models" && cf_list_models=normal
+-echo "$as_me:3702: result: $cf_list_models" >&5
++echo "$as_me:3487: 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:3707: checking for default model" >&5
++echo "$as_me:3492: 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:3710: result: $DFT_LWR_MODEL" >&5
++echo "$as_me:3495: result: $DFT_LWR_MODEL" >&5
+ echo "${ECHO_T}$DFT_LWR_MODEL" >&6
+ 
+ DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+ 
+-echo "$as_me:3715: checking for specific curses-directory" >&5
++echo "$as_me:3500: checking for specific curses-directory" >&5
+ echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
+ 
+ # Check whether --with-curses-dir or --without-curses-dir was given.
+@@ -3722,7 +3507,7 @@ if test "${with_curses_dir+set}" = set; then
+ else
+   cf_cv_curses_dir=no
+ fi;
+-echo "$as_me:3725: result: $cf_cv_curses_dir" >&5
++echo "$as_me:3510: result: $cf_cv_curses_dir" >&5
+ echo "${ECHO_T}$cf_cv_curses_dir" >&6
+ 
+ if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+@@ -3741,7 +3526,7 @@ case ".$withval" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval withval="$withval"
+   case ".$withval" in #(vi
+   .NONE/*)
+@@ -3753,7 +3538,7 @@ case ".$withval" in #(vi
+   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:3756: error: expected a pathname, not \"$withval\"" >&5
++  { { echo "$as_me:3541: error: expected a pathname, not \"$withval\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+@@ -3786,7 +3571,7 @@ if test -n "$cf_cv_curses_dir/include" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 3789 "configure"
++#line 3574 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -3798,16 +3583,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:3801: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:3586: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:3804: \$? = $ac_status" >&5
++  echo "$as_me:3589: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:3807: \"$ac_try\"") >&5
++  { (eval echo "$as_me:3592: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3810: \$? = $ac_status" >&5
++  echo "$as_me:3595: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -3824,7 +3609,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}:3827: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:3612: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -3858,7 +3643,7 @@ if test -n "$cf_cv_curses_dir/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}:3861: testing adding $cf_add_libdir to library-path ..." 1>&5
++echo "${as_me:-configure}:3646: testing adding $cf_add_libdir to library-path ..." 1>&5
+ 
+         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+       fi
+@@ -3869,7 +3654,7 @@ fi
+ 	fi
+ fi
+ 
+-echo "$as_me:3872: checking if you want wide-character code" >&5
++echo "$as_me:3657: 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.
+@@ -3879,11 +3664,11 @@ if test "${enable_widec+set}" = set; then
+ else
+   with_widec=no
+ fi;
+-echo "$as_me:3882: result: $with_widec" >&5
++echo "$as_me:3667: result: $with_widec" >&5
+ echo "${ECHO_T}$with_widec" >&6
+ if test "$with_widec" = yes ; then
+ 
+-echo "$as_me:3886: checking for multibyte character support" >&5
++echo "$as_me:3671: 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
+@@ -3891,7 +3676,7 @@ else
+ 
+ 	cf_save_LIBS="$LIBS"
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 3894 "configure"
++#line 3679 "configure"
+ #include "confdefs.h"
+ 
+ #include <stdlib.h>
+@@ -3904,16 +3689,16 @@ putwc(0,0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3907: \"$ac_link\"") >&5
++if { (eval echo "$as_me:3692: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:3910: \$? = $ac_status" >&5
++  echo "$as_me:3695: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:3913: \"$ac_try\"") >&5
++  { (eval echo "$as_me:3698: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3916: \$? = $ac_status" >&5
++  echo "$as_me:3701: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_utf8_lib=yes
+ else
+@@ -3925,12 +3710,12 @@ cat conftest.$ac_ext >&5
+ cf_cv_header_path_utf8=
+ cf_cv_library_path_utf8=
+ 
+-echo "${as_me:-configure}:3928: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
++echo "${as_me:-configure}:3713: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+ 
+ cf_save_LIBS="$LIBS"
+ 
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3933 "configure"
++#line 3718 "configure"
+ #include "confdefs.h"
+ 
+ #include <libutf8.h>
+@@ -3943,16 +3728,16 @@ putwc(0,0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3946: \"$ac_link\"") >&5
++if { (eval echo "$as_me:3731: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:3949: \$? = $ac_status" >&5
++  echo "$as_me:3734: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:3952: \"$ac_try\"") >&5
++  { (eval echo "$as_me:3737: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3955: \$? = $ac_status" >&5
++  echo "$as_me:3740: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_find_linkage_utf8=yes
+@@ -3966,7 +3751,7 @@ cat conftest.$ac_ext >&5
+ LIBS="-lutf8  $cf_save_LIBS"
+ 
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3969 "configure"
++#line 3754 "configure"
+ #include "confdefs.h"
+ 
+ #include <libutf8.h>
+@@ -3979,16 +3764,16 @@ putwc(0,0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3982: \"$ac_link\"") >&5
++if { (eval echo "$as_me:3767: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:3985: \$? = $ac_status" >&5
++  echo "$as_me:3770: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:3988: \"$ac_try\"") >&5
++  { (eval echo "$as_me:3773: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3991: \$? = $ac_status" >&5
++  echo "$as_me:3776: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_find_linkage_utf8=yes
+@@ -4005,9 +3790,9 @@ cat conftest.$ac_ext >&5
+ 
+     test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
+ 
+-echo "${as_me:-configure}:4008: testing find linkage for utf8 library ..." 1>&5
++echo "${as_me:-configure}:3793: testing find linkage for utf8 library ..." 1>&5
+ 
+-echo "${as_me:-configure}:4010: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
++echo "${as_me:-configure}:3795: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+ 
+     cf_save_CPPFLAGS="$CPPFLAGS"
+     cf_test_CPPFLAGS="$CPPFLAGS"
+@@ -4120,11 +3905,11 @@ 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}:4123: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
++echo "${as_me:-configure}:3908: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+ 
+         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
+         cat >conftest.$ac_ext <<_ACEOF
+-#line 4127 "configure"
++#line 3912 "configure"
+ #include "confdefs.h"
+ 
+ #include <libutf8.h>
+@@ -4137,21 +3922,21 @@ putwc(0,0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4140: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:3925: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4143: \$? = $ac_status" >&5
++  echo "$as_me:3928: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4146: \"$ac_try\"") >&5
++  { (eval echo "$as_me:3931: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4149: \$? = $ac_status" >&5
++  echo "$as_me:3934: \$? = $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}:4154: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
++echo "${as_me:-configure}:3939: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+ 
+             cf_cv_find_linkage_utf8=maybe
+             cf_test_CPPFLAGS="$CPPFLAGS"
+@@ -4169,7 +3954,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+     if test "$cf_cv_find_linkage_utf8" = maybe ; then
+ 
+-echo "${as_me:-configure}:4172: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
++echo "${as_me:-configure}:3957: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+ 
+       cf_save_LIBS="$LIBS"
+       cf_save_LDFLAGS="$LDFLAGS"
+@@ -4266,13 +4051,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}:4269: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
++echo "${as_me:-configure}:4054: 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 4275 "configure"
++#line 4060 "configure"
+ #include "confdefs.h"
+ 
+ #include <libutf8.h>
+@@ -4285,21 +4070,21 @@ putwc(0,0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:4288: \"$ac_link\"") >&5
++if { (eval echo "$as_me:4073: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:4291: \$? = $ac_status" >&5
++  echo "$as_me:4076: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:4294: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4079: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4297: \$? = $ac_status" >&5
++  echo "$as_me:4082: \$? = $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}:4302: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
++echo "${as_me:-configure}:4087: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+ 
+                 cf_cv_find_linkage_utf8=yes
+                 cf_cv_library_file_utf8="-lutf8"
+@@ -4341,13 +4126,14 @@ fi
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:4344: result: $cf_cv_utf8_lib" >&5
++echo "$as_me:4129: 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
+ # ncurses/ncursesw:
+ if test "$cf_cv_utf8_lib" = "add-on" ; then
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_LIBUTF8_H 1
+ EOF
+ 
+@@ -4375,7 +4161,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 4378 "configure"
++#line 4164 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -4387,16 +4173,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4390: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4176: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4393: \$? = $ac_status" >&5
++  echo "$as_me:4179: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4396: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4182: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4399: \$? = $ac_status" >&5
++  echo "$as_me:4185: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -4413,7 +4199,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}:4416: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:4202: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -4447,7 +4233,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}:4450: testing adding $cf_add_libdir to library-path ..." 1>&5
++echo "${as_me:-configure}:4236: testing adding $cf_add_libdir to library-path ..." 1>&5
+ 
+         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+       fi
+@@ -4461,48 +4247,87 @@ fi
+ cf_ncuconfig_root=ncursesw
+ 
+ echo "Looking for ${cf_ncuconfig_root}-config"
+-for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
++
++if test -n "$ac_tool_prefix"; then
++  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
++  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:4256: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$NCURSES_CONFIG"; then
++  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
++echo "$as_me:4271: found $ac_dir/$ac_word" >&5
++break
++done
++
++fi
++fi
++NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
++if test -n "$NCURSES_CONFIG"; then
++  echo "$as_me:4279: result: $NCURSES_CONFIG" >&5
++echo "${ECHO_T}$NCURSES_CONFIG" >&6
++else
++  echo "$as_me:4282: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++    test -n "$NCURSES_CONFIG" && break
++  done
++fi
++if test -z "$NCURSES_CONFIG"; then
++  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
++  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ 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:4468: checking for $ac_word" >&5
++echo "$as_me:4295: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
++if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  case $NCURSES_CONFIG in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
+-  ;;
+-  *)
++  if test -n "$ac_ct_NCURSES_CONFIG"; then
++  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
++else
+   ac_save_IFS=$IFS; IFS=$ac_path_separator
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+   IFS=$ac_save_IFS
+   test -z "$ac_dir" && ac_dir=.
+-  if $as_executable_p "$ac_dir/$ac_word"; then
+-   ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
+-   echo "$as_me:4485: found $ac_dir/$ac_word" >&5
+-   break
+-fi
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
++echo "$as_me:4310: found $ac_dir/$ac_word" >&5
++break
+ done
+ 
+-  ;;
+-esac
+ fi
+-NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
+-
+-if test -n "$NCURSES_CONFIG"; then
+-  echo "$as_me:4496: result: $NCURSES_CONFIG" >&5
+-echo "${ECHO_T}$NCURSES_CONFIG" >&6
++fi
++ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
++if test -n "$ac_ct_NCURSES_CONFIG"; then
++  echo "$as_me:4318: result: $ac_ct_NCURSES_CONFIG" >&5
++echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+ else
+-  echo "$as_me:4499: result: no" >&5
++  echo "$as_me:4321: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+-  test -n "$NCURSES_CONFIG" && break
++  test -n "$ac_ct_NCURSES_CONFIG" && break
+ done
+-test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
++test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
++
++  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
++fi
+ 
+ if test "$NCURSES_CONFIG" != none ; then
+ 
+@@ -4511,7 +4336,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+ 
+ # even with config script, some packages use no-override for curses.h
+ 
+-echo "$as_me:4514: checking if we have identified curses headers" >&5
++echo "$as_me:4339: checking if we have identified curses headers" >&5
+ echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_header+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -4519,13 +4344,13 @@ else
+ 
+ cf_cv_ncurses_header=none
+ for cf_header in  \
+-    ncursesw/curses.h \
+-	ncursesw/ncurses.h \
+-	curses.h \
+-	ncurses.h
++    ncursesw/ncurses.h \
++	ncursesw/curses.h \
++	ncurses.h \
++	curses.h
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4528 "configure"
++#line 4353 "configure"
+ #include "confdefs.h"
+ #include <${cf_header}>
+ int
+@@ -4537,16 +4362,16 @@ initscr(); tgoto("?", 0,0)
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4365: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4543: \$? = $ac_status" >&5
++  echo "$as_me:4368: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4546: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4371: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4549: \$? = $ac_status" >&5
++  echo "$as_me:4374: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_header=$cf_header; break
+ else
+@@ -4557,11 +4382,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ 
+ fi
+-echo "$as_me:4560: result: $cf_cv_ncurses_header" >&5
++echo "$as_me:4385: result: $cf_cv_ncurses_header" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_header" >&6
+ 
+ if test "$cf_cv_ncurses_header" = none ; then
+-	{ { echo "$as_me:4564: error: No curses header-files found" >&5
++	{ { echo "$as_me:4389: error: No curses header-files found" >&5
+ echo "$as_me: error: No curses header-files found" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -4571,23 +4396,23 @@ fi
+ for ac_header in $cf_cv_ncurses_header
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:4574: checking for $ac_header" >&5
++echo "$as_me:4399: 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 4580 "configure"
++#line 4405 "configure"
+ #include "confdefs.h"
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:4584: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:4409: \"$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:4590: \$? = $ac_status" >&5
++  echo "$as_me:4415: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -4606,7 +4431,7 @@ else
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ fi
+-echo "$as_me:4609: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:4434: 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
+@@ -4659,7 +4484,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 4662 "configure"
++#line 4487 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -4671,16 +4496,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4674: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4499: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4677: \$? = $ac_status" >&5
++  echo "$as_me:4502: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4680: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4505: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4683: \$? = $ac_status" >&5
++  echo "$as_me:4508: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -4697,7 +4522,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}:4700: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:4525: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -4714,7 +4539,7 @@ fi
+ 
+ }
+ 
+-echo "$as_me:4717: checking for $cf_ncuhdr_root header in include-path" >&5
++echo "$as_me:4542: checking for $cf_ncuhdr_root header in include-path" >&5
+ echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -4726,7 +4551,7 @@ else
+ 	do
+ 
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 4729 "configure"
++#line 4554 "configure"
+ #include "confdefs.h"
+ 
+ #define _XOPEN_SOURCE_EXTENDED
+@@ -4758,16 +4583,16 @@ printf("old\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4761: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4586: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4764: \$? = $ac_status" >&5
++  echo "$as_me:4589: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4767: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4592: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4770: \$? = $ac_status" >&5
++  echo "$as_me:4595: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_h=$cf_header
+ 
+@@ -4782,14 +4607,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 	done
+ 
+ fi
+-echo "$as_me:4785: result: $cf_cv_ncurses_h" >&5
++echo "$as_me:4610: result: $cf_cv_ncurses_h" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_h" >&6
+ 
+ if test "$cf_cv_ncurses_h" != no ; then
+ 	cf_cv_ncurses_header=$cf_cv_ncurses_h
+ else
+ 
+-echo "$as_me:4792: checking for $cf_ncuhdr_root include-path" >&5
++echo "$as_me:4617: checking for $cf_ncuhdr_root include-path" >&5
+ echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_h2+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -4929,7 +4754,7 @@ if test -n "$cf_incdir" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 4932 "configure"
++#line 4757 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -4941,16 +4766,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4944: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4769: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4947: \$? = $ac_status" >&5
++  echo "$as_me:4772: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:4950: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4775: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4953: \$? = $ac_status" >&5
++  echo "$as_me:4778: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -4967,7 +4792,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}:4970: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:4795: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -4988,7 +4813,7 @@ fi
+ 		do
+ 
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 4991 "configure"
++#line 4816 "configure"
+ #include "confdefs.h"
+ 
+ #include <$cf_header>
+@@ -5012,16 +4837,16 @@ printf("old\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5015: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4840: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5018: \$? = $ac_status" >&5
++  echo "$as_me:4843: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5021: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4846: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5024: \$? = $ac_status" >&5
++  echo "$as_me:4849: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_h2=$cf_header
+ 
+@@ -5042,12 +4867,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 		CPPFLAGS="$cf_save2_CPPFLAGS"
+ 		test "$cf_cv_ncurses_h2" != no && break
+ 	done
+-	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5045: error: not found" >&5
++	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4870: error: not found" >&5
+ echo "$as_me: error: not found" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+ fi
+-echo "$as_me:5050: result: $cf_cv_ncurses_h2" >&5
++echo "$as_me:4875: result: $cf_cv_ncurses_h2" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
+ 
+ 	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
+@@ -5080,7 +4905,7 @@ if test -n "$cf_1st_incdir" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 5083 "configure"
++#line 4908 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -5092,16 +4917,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5095: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:4920: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5098: \$? = $ac_status" >&5
++  echo "$as_me:4923: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5101: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4926: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5104: \$? = $ac_status" >&5
++  echo "$as_me:4929: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -5118,7 +4943,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}:5121: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:4946: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -5139,7 +4964,8 @@ fi
+ 
+ case $cf_cv_ncurses_header in # (vi
+ *ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_H 1
+ EOF
+ 
+@@ -5148,20 +4974,22 @@ esac
+ 
+ case $cf_cv_ncurses_header in # (vi
+ ncurses/curses.h|ncurses/ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_NCURSES_H 1
+ EOF
+ 
+ 	;;
+ ncursesw/curses.h|ncursesw/ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSESW_NCURSES_H 1
+ EOF
+ 
+ 	;;
+ esac
+ 
+-echo "$as_me:5164: checking for terminfo header" >&5
++echo "$as_me:4992: checking for terminfo header" >&5
+ echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
+ if test "${cf_cv_term_header+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5179,7 +5007,7 @@ esac
+ for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5182 "configure"
++#line 5010 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ #include <${cf_cv_ncurses_header:-curses.h}>
+@@ -5194,16 +5022,16 @@ int x = auto_left_margin
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5197: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5025: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5200: \$? = $ac_status" >&5
++  echo "$as_me:5028: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5203: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5031: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5206: \$? = $ac_status" >&5
++  echo "$as_me:5034: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_term_header="$cf_test"
+@@ -5219,14 +5047,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ 
+ fi
+-echo "$as_me:5222: result: $cf_cv_term_header" >&5
++echo "$as_me:5050: result: $cf_cv_term_header" >&5
+ echo "${ECHO_T}$cf_cv_term_header" >&6
+ 
+ # Set definitions to allow ifdef'ing to accommodate subdirectories
+ 
+ case $cf_cv_term_header in # (vi
+ *term.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_TERM_H 1
+ EOF
+ 
+@@ -5235,13 +5064,15 @@ esac
+ 
+ case $cf_cv_term_header in # (vi
+ ncurses/term.h) #(vi
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_TERM_H 1
+ EOF
+ 
+ 	;;
+ ncursesw/term.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSESW_TERM_H 1
+ EOF
+ 
+@@ -5249,11 +5080,12 @@ EOF
+ esac
+ 
+ # some applications need this, but should check for NCURSES_VERSION
++
+ cat >>confdefs.h <<\EOF
+ #define NCURSES 1
+ EOF
+ 
+-echo "$as_me:5256: checking for ncurses version" >&5
++echo "$as_me:5088: checking for ncurses version" >&5
+ echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_version+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5279,10 +5111,10 @@ Autoconf "old"
+ #endif
+ EOF
+ 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+-	{ (eval echo "$as_me:5282: \"$cf_try\"") >&5
++	{ (eval echo "$as_me:5114: \"$cf_try\"") >&5
+   (eval $cf_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5285: \$? = $ac_status" >&5
++  echo "$as_me:5117: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 	if test -f conftest.out ; then
+ 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
+@@ -5292,7 +5124,7 @@ EOF
+ 
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 5295 "configure"
++#line 5127 "configure"
+ #include "confdefs.h"
+ 
+ #include <${cf_cv_ncurses_header:-curses.h}>
+@@ -5317,15 +5149,15 @@ int main()
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:5320: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5152: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5323: \$? = $ac_status" >&5
++  echo "$as_me:5155: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:5325: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5157: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5328: \$? = $ac_status" >&5
++  echo "$as_me:5160: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_ncurses_version=`cat $cf_tempfile`
+@@ -5339,9 +5171,10 @@ fi
+ 	rm -f $cf_tempfile
+ 
+ fi
+-echo "$as_me:5342: result: $cf_cv_ncurses_version" >&5
++echo "$as_me:5174: result: $cf_cv_ncurses_version" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
++test "$cf_cv_ncurses_version" = no ||
++cat >>confdefs.h <<\EOF
+ #define NCURSES 1
+ EOF
+ 
+@@ -5351,7 +5184,7 @@ cf_nculib_root=ncursesw
+ 	# to link gpm.
+ cf_ncurses_LIBS=""
+ cf_ncurses_SAVE="$LIBS"
+-echo "$as_me:5354: checking for Gpm_Open in -lgpm" >&5
++echo "$as_me:5187: 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
+@@ -5359,7 +5192,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5362 "configure"
++#line 5195 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -5378,16 +5211,16 @@ Gpm_Open ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5381: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5384: \$? = $ac_status" >&5
++  echo "$as_me:5217: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5387: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5220: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5390: \$? = $ac_status" >&5
++  echo "$as_me:5223: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_Gpm_Open=yes
+ else
+@@ -5398,10 +5231,10 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:5401: result: $ac_cv_lib_gpm_Gpm_Open" >&5
++echo "$as_me:5234: 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
+-  echo "$as_me:5404: checking for initscr in -lgpm" >&5
++  echo "$as_me:5237: checking for initscr in -lgpm" >&5
+ echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
+ if test "${ac_cv_lib_gpm_initscr+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5409,7 +5242,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5412 "configure"
++#line 5245 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -5428,16 +5261,16 @@ initscr ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5264: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5434: \$? = $ac_status" >&5
++  echo "$as_me:5267: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5437: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5270: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5440: \$? = $ac_status" >&5
++  echo "$as_me:5273: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_initscr=yes
+ else
+@@ -5448,7 +5281,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:5451: result: $ac_cv_lib_gpm_initscr" >&5
++echo "$as_me:5284: result: $ac_cv_lib_gpm_initscr" >&5
+ echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
+ if test $ac_cv_lib_gpm_initscr = yes; then
+   LIBS="$cf_ncurses_SAVE"
+@@ -5463,7 +5296,7 @@ freebsd*)
+ 	# This is only necessary if you are linking against an obsolete
+ 	# version of ncurses (but it should do no harm, since it's static).
+ 	if test "$cf_nculib_root" = ncurses ; then
+-		echo "$as_me:5466: checking for tgoto in -lmytinfo" >&5
++		echo "$as_me:5299: checking for tgoto in -lmytinfo" >&5
+ echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
+ if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5471,7 +5304,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lmytinfo  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5474 "configure"
++#line 5307 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -5490,16 +5323,16 @@ tgoto ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5493: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5326: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5496: \$? = $ac_status" >&5
++  echo "$as_me:5329: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5499: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5332: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5502: \$? = $ac_status" >&5
++  echo "$as_me:5335: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_mytinfo_tgoto=yes
+ else
+@@ -5510,7 +5343,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:5513: result: $ac_cv_lib_mytinfo_tgoto" >&5
++echo "$as_me:5346: result: $ac_cv_lib_mytinfo_tgoto" >&5
+ echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
+ if test $ac_cv_lib_mytinfo_tgoto = yes; then
+   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
+@@ -5529,13 +5362,13 @@ else
+ 
+ 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ 	cf_libdir=""
+-	echo "$as_me:5532: checking for initscr" >&5
++	echo "$as_me:5365: checking for initscr" >&5
+ echo $ECHO_N "checking for initscr... $ECHO_C" >&6
+ if test "${ac_cv_func_initscr+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 5538 "configure"
++#line 5371 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char initscr (); below.  */
+@@ -5558,7 +5391,7 @@ main ()
+ #if defined (__stub_initscr) || defined (__stub___initscr)
+ choke me
+ #else
+-f = initscr;
++f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -5566,16 +5399,16 @@ f = initscr;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5569: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5402: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5572: \$? = $ac_status" >&5
++  echo "$as_me:5405: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5575: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5408: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5578: \$? = $ac_status" >&5
++  echo "$as_me:5411: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func_initscr=yes
+ else
+@@ -5585,18 +5418,18 @@ ac_cv_func_initscr=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:5588: result: $ac_cv_func_initscr" >&5
++echo "$as_me:5421: result: $ac_cv_func_initscr" >&5
+ echo "${ECHO_T}$ac_cv_func_initscr" >&6
+ if test $ac_cv_func_initscr = yes; then
+   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ else
+ 
+ 		cf_save_LIBS="$LIBS"
+-		echo "$as_me:5595: checking for initscr in -l$cf_nculib_root" >&5
++		echo "$as_me:5428: checking for initscr in -l$cf_nculib_root" >&5
+ echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
+ 		LIBS="-l$cf_nculib_root $LIBS"
+ 		cat >conftest.$ac_ext <<_ACEOF
+-#line 5599 "configure"
++#line 5432 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -5608,25 +5441,25 @@ initscr()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5614: \$? = $ac_status" >&5
++  echo "$as_me:5447: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5617: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5450: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5620: \$? = $ac_status" >&5
++  echo "$as_me:5453: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:5622: result: yes" >&5
++  echo "$as_me:5455: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ 
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:5629: result: no" >&5
++echo "$as_me:5462: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 
+ cf_search=
+@@ -5716,11 +5549,11 @@ cf_search="$cf_library_path_list $cf_search"
+ 
+ 			for cf_libdir in $cf_search
+ 			do
+-				echo "$as_me:5719: checking for -l$cf_nculib_root in $cf_libdir" >&5
++				echo "$as_me:5552: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
+ 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
+ 				cat >conftest.$ac_ext <<_ACEOF
+-#line 5723 "configure"
++#line 5556 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -5732,25 +5565,25 @@ initscr()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5735: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5568: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5738: \$? = $ac_status" >&5
++  echo "$as_me:5571: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5741: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5574: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5744: \$? = $ac_status" >&5
++  echo "$as_me:5577: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:5746: result: yes" >&5
++  echo "$as_me:5579: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ 					 break
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:5753: result: no" >&5
++echo "$as_me:5586: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 					 LIBS="$cf_save_LIBS"
+ fi
+@@ -5765,7 +5598,7 @@ fi
+ eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+ 
+ if test $cf_found_library = no ; then
+-	{ { echo "$as_me:5768: error: Cannot link $cf_nculib_root library" >&5
++	{ { echo "$as_me:5601: error: Cannot link $cf_nculib_root library" >&5
+ echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -5773,7 +5606,7 @@ fi
+ fi
+ 
+ if test -n "$cf_ncurses_LIBS" ; then
+-	echo "$as_me:5776: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
++	echo "$as_me:5609: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
+ 	cf_ncurses_SAVE="$LIBS"
+ 	for p in $cf_ncurses_LIBS ; do
+@@ -5783,7 +5616,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
+ 		fi
+ 	done
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 5786 "configure"
++#line 5619 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -5795,23 +5628,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5798: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5631: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5801: \$? = $ac_status" >&5
++  echo "$as_me:5634: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5804: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5637: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5807: \$? = $ac_status" >&5
++  echo "$as_me:5640: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:5809: result: yes" >&5
++  echo "$as_me:5642: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:5814: result: no" >&5
++echo "$as_me:5647: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 		 LIBS="$cf_ncurses_SAVE"
+ fi
+@@ -5831,48 +5664,87 @@ else
+ cf_ncuconfig_root=ncurses
+ 
+ echo "Looking for ${cf_ncuconfig_root}-config"
+-for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
++
++if test -n "$ac_tool_prefix"; then
++  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
++  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:5673: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$NCURSES_CONFIG"; then
++  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
++echo "$as_me:5688: found $ac_dir/$ac_word" >&5
++break
++done
++
++fi
++fi
++NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
++if test -n "$NCURSES_CONFIG"; then
++  echo "$as_me:5696: result: $NCURSES_CONFIG" >&5
++echo "${ECHO_T}$NCURSES_CONFIG" >&6
++else
++  echo "$as_me:5699: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++    test -n "$NCURSES_CONFIG" && break
++  done
++fi
++if test -z "$NCURSES_CONFIG"; then
++  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
++  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ 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:5838: checking for $ac_word" >&5
++echo "$as_me:5712: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
++if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  case $NCURSES_CONFIG in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
+-  ;;
+-  *)
++  if test -n "$ac_ct_NCURSES_CONFIG"; then
++  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
++else
+   ac_save_IFS=$IFS; IFS=$ac_path_separator
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+   IFS=$ac_save_IFS
+   test -z "$ac_dir" && ac_dir=.
+-  if $as_executable_p "$ac_dir/$ac_word"; then
+-   ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
+-   echo "$as_me:5855: found $ac_dir/$ac_word" >&5
+-   break
+-fi
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
++echo "$as_me:5727: found $ac_dir/$ac_word" >&5
++break
+ done
+ 
+-  ;;
+-esac
+ fi
+-NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
+-
+-if test -n "$NCURSES_CONFIG"; then
+-  echo "$as_me:5866: result: $NCURSES_CONFIG" >&5
+-echo "${ECHO_T}$NCURSES_CONFIG" >&6
++fi
++ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
++if test -n "$ac_ct_NCURSES_CONFIG"; then
++  echo "$as_me:5735: result: $ac_ct_NCURSES_CONFIG" >&5
++echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+ else
+-  echo "$as_me:5869: result: no" >&5
++  echo "$as_me:5738: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+-  test -n "$NCURSES_CONFIG" && break
++  test -n "$ac_ct_NCURSES_CONFIG" && break
+ done
+-test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
++test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
++
++  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
++fi
+ 
+ if test "$NCURSES_CONFIG" != none ; then
+ 
+@@ -5881,7 +5753,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+ 
+ # even with config script, some packages use no-override for curses.h
+ 
+-echo "$as_me:5884: checking if we have identified curses headers" >&5
++echo "$as_me:5756: checking if we have identified curses headers" >&5
+ echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_header+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5889,13 +5761,13 @@ else
+ 
+ cf_cv_ncurses_header=none
+ for cf_header in  \
+-    ncurses/curses.h \
+-	ncurses/ncurses.h \
+-	curses.h \
+-	ncurses.h
++    ncurses/ncurses.h \
++	ncurses/curses.h \
++	ncurses.h \
++	curses.h
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5898 "configure"
++#line 5770 "configure"
+ #include "confdefs.h"
+ #include <${cf_header}>
+ int
+@@ -5907,16 +5779,16 @@ initscr(); tgoto("?", 0,0)
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5910: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5782: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5913: \$? = $ac_status" >&5
++  echo "$as_me:5785: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5916: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5788: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5919: \$? = $ac_status" >&5
++  echo "$as_me:5791: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_header=$cf_header; break
+ else
+@@ -5927,11 +5799,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ 
+ fi
+-echo "$as_me:5930: result: $cf_cv_ncurses_header" >&5
++echo "$as_me:5802: result: $cf_cv_ncurses_header" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_header" >&6
+ 
+ if test "$cf_cv_ncurses_header" = none ; then
+-	{ { echo "$as_me:5934: error: No curses header-files found" >&5
++	{ { echo "$as_me:5806: error: No curses header-files found" >&5
+ echo "$as_me: error: No curses header-files found" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -5941,23 +5813,23 @@ fi
+ for ac_header in $cf_cv_ncurses_header
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:5944: checking for $ac_header" >&5
++echo "$as_me:5816: 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 5950 "configure"
++#line 5822 "configure"
+ #include "confdefs.h"
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:5954: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:5826: \"$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:5960: \$? = $ac_status" >&5
++  echo "$as_me:5832: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -5976,7 +5848,7 @@ else
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ fi
+-echo "$as_me:5979: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:5851: 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
+@@ -6029,7 +5901,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 6032 "configure"
++#line 5904 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -6041,16 +5913,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6044: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5916: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6047: \$? = $ac_status" >&5
++  echo "$as_me:5919: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6050: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5922: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6053: \$? = $ac_status" >&5
++  echo "$as_me:5925: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -6067,7 +5939,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}:6070: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:5942: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -6084,7 +5956,7 @@ fi
+ 
+ }
+ 
+-echo "$as_me:6087: checking for $cf_ncuhdr_root header in include-path" >&5
++echo "$as_me:5959: checking for $cf_ncuhdr_root header in include-path" >&5
+ echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6096,7 +5968,7 @@ else
+ 	do
+ 
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 6099 "configure"
++#line 5971 "configure"
+ #include "confdefs.h"
+ 
+ #include <$cf_header>
+@@ -6120,16 +5992,16 @@ printf("old\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6123: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5995: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6126: \$? = $ac_status" >&5
++  echo "$as_me:5998: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6129: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6001: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6132: \$? = $ac_status" >&5
++  echo "$as_me:6004: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_h=$cf_header
+ 
+@@ -6144,14 +6016,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 	done
+ 
+ fi
+-echo "$as_me:6147: result: $cf_cv_ncurses_h" >&5
++echo "$as_me:6019: result: $cf_cv_ncurses_h" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_h" >&6
+ 
+ if test "$cf_cv_ncurses_h" != no ; then
+ 	cf_cv_ncurses_header=$cf_cv_ncurses_h
+ else
+ 
+-echo "$as_me:6154: checking for $cf_ncuhdr_root include-path" >&5
++echo "$as_me:6026: checking for $cf_ncuhdr_root include-path" >&5
+ echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_h2+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6291,7 +6163,7 @@ if test -n "$cf_incdir" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 6294 "configure"
++#line 6166 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -6303,16 +6175,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:6178: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6309: \$? = $ac_status" >&5
++  echo "$as_me:6181: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6312: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6184: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6315: \$? = $ac_status" >&5
++  echo "$as_me:6187: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -6329,7 +6201,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}:6332: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:6204: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -6350,7 +6222,7 @@ fi
+ 		do
+ 
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 6353 "configure"
++#line 6225 "configure"
+ #include "confdefs.h"
+ 
+ #include <$cf_header>
+@@ -6374,16 +6246,16 @@ printf("old\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:6249: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6380: \$? = $ac_status" >&5
++  echo "$as_me:6252: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6383: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6255: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6386: \$? = $ac_status" >&5
++  echo "$as_me:6258: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ncurses_h2=$cf_header
+ 
+@@ -6404,12 +6276,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 		CPPFLAGS="$cf_save2_CPPFLAGS"
+ 		test "$cf_cv_ncurses_h2" != no && break
+ 	done
+-	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6407: error: not found" >&5
++	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6279: error: not found" >&5
+ echo "$as_me: error: not found" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+ fi
+-echo "$as_me:6412: result: $cf_cv_ncurses_h2" >&5
++echo "$as_me:6284: result: $cf_cv_ncurses_h2" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
+ 
+ 	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
+@@ -6442,7 +6314,7 @@ if test -n "$cf_1st_incdir" ; then
+ 			  cf_save_CPPFLAGS=$CPPFLAGS
+ 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 			  cat >conftest.$ac_ext <<_ACEOF
+-#line 6445 "configure"
++#line 6317 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -6454,16 +6326,16 @@ printf("Hello")
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:6329: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6460: \$? = $ac_status" >&5
++  echo "$as_me:6332: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6463: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6335: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6466: \$? = $ac_status" >&5
++  echo "$as_me:6338: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -6480,7 +6352,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}:6483: testing adding $cf_add_incdir to include-path ..." 1>&5
++echo "${as_me:-configure}:6355: testing adding $cf_add_incdir to include-path ..." 1>&5
+ 
+ 		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ 
+@@ -6501,7 +6373,8 @@ fi
+ 
+ case $cf_cv_ncurses_header in # (vi
+ *ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_H 1
+ EOF
+ 
+@@ -6510,20 +6383,22 @@ esac
+ 
+ case $cf_cv_ncurses_header in # (vi
+ ncurses/curses.h|ncurses/ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_NCURSES_H 1
+ EOF
+ 
+ 	;;
+ ncursesw/curses.h|ncursesw/ncurses.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSESW_NCURSES_H 1
+ EOF
+ 
+ 	;;
+ esac
+ 
+-echo "$as_me:6526: checking for terminfo header" >&5
++echo "$as_me:6401: checking for terminfo header" >&5
+ echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
+ if test "${cf_cv_term_header+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6541,7 +6416,7 @@ esac
+ for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6544 "configure"
++#line 6419 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ #include <${cf_cv_ncurses_header:-curses.h}>
+@@ -6556,16 +6431,16 @@ int x = auto_left_margin
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6559: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:6434: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:6562: \$? = $ac_status" >&5
++  echo "$as_me:6437: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:6565: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6440: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6568: \$? = $ac_status" >&5
++  echo "$as_me:6443: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_term_header="$cf_test"
+@@ -6581,14 +6456,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ 
+ fi
+-echo "$as_me:6584: result: $cf_cv_term_header" >&5
++echo "$as_me:6459: result: $cf_cv_term_header" >&5
+ echo "${ECHO_T}$cf_cv_term_header" >&6
+ 
+ # Set definitions to allow ifdef'ing to accommodate subdirectories
+ 
+ case $cf_cv_term_header in # (vi
+ *term.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_TERM_H 1
+ EOF
+ 
+@@ -6597,13 +6473,15 @@ esac
+ 
+ case $cf_cv_term_header in # (vi
+ ncurses/term.h) #(vi
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSES_TERM_H 1
+ EOF
+ 
+ 	;;
+ ncursesw/term.h)
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_NCURSESW_TERM_H 1
+ EOF
+ 
+@@ -6611,11 +6489,12 @@ EOF
+ esac
+ 
+ # some applications need this, but should check for NCURSES_VERSION
++
+ cat >>confdefs.h <<\EOF
+ #define NCURSES 1
+ EOF
+ 
+-echo "$as_me:6618: checking for ncurses version" >&5
++echo "$as_me:6497: checking for ncurses version" >&5
+ echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
+ if test "${cf_cv_ncurses_version+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6641,10 +6520,10 @@ Autoconf "old"
+ #endif
+ EOF
+ 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+-	{ (eval echo "$as_me:6644: \"$cf_try\"") >&5
++	{ (eval echo "$as_me:6523: \"$cf_try\"") >&5
+   (eval $cf_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6647: \$? = $ac_status" >&5
++  echo "$as_me:6526: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 	if test -f conftest.out ; then
+ 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
+@@ -6654,7 +6533,7 @@ EOF
+ 
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 6657 "configure"
++#line 6536 "configure"
+ #include "confdefs.h"
+ 
+ #include <${cf_cv_ncurses_header:-curses.h}>
+@@ -6679,15 +6558,15 @@ int main()
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:6682: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6561: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6685: \$? = $ac_status" >&5
++  echo "$as_me:6564: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:6687: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6566: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6690: \$? = $ac_status" >&5
++  echo "$as_me:6569: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 	cf_cv_ncurses_version=`cat $cf_tempfile`
+@@ -6701,9 +6580,10 @@ fi
+ 	rm -f $cf_tempfile
+ 
+ fi
+-echo "$as_me:6704: result: $cf_cv_ncurses_version" >&5
++echo "$as_me:6583: result: $cf_cv_ncurses_version" >&5
+ echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
++test "$cf_cv_ncurses_version" = no ||
++cat >>confdefs.h <<\EOF
+ #define NCURSES 1
+ EOF
+ 
+@@ -6713,7 +6593,7 @@ cf_nculib_root=ncurses
+ 	# to link gpm.
+ cf_ncurses_LIBS=""
+ cf_ncurses_SAVE="$LIBS"
+-echo "$as_me:6716: checking for Gpm_Open in -lgpm" >&5
++echo "$as_me:6596: 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
+@@ -6721,7 +6601,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6724 "configure"
++#line 6604 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -6740,16 +6620,16 @@ Gpm_Open ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6743: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6746: \$? = $ac_status" >&5
++  echo "$as_me:6626: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6749: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6629: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6752: \$? = $ac_status" >&5
++  echo "$as_me:6632: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_Gpm_Open=yes
+ else
+@@ -6760,10 +6640,10 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:6763: result: $ac_cv_lib_gpm_Gpm_Open" >&5
++echo "$as_me:6643: 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
+-  echo "$as_me:6766: checking for initscr in -lgpm" >&5
++  echo "$as_me:6646: checking for initscr in -lgpm" >&5
+ echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
+ if test "${ac_cv_lib_gpm_initscr+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6771,7 +6651,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6774 "configure"
++#line 6654 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -6790,16 +6670,16 @@ initscr ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6793: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6673: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6796: \$? = $ac_status" >&5
++  echo "$as_me:6676: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6799: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6679: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6802: \$? = $ac_status" >&5
++  echo "$as_me:6682: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_initscr=yes
+ else
+@@ -6810,7 +6690,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:6813: result: $ac_cv_lib_gpm_initscr" >&5
++echo "$as_me:6693: result: $ac_cv_lib_gpm_initscr" >&5
+ echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
+ if test $ac_cv_lib_gpm_initscr = yes; then
+   LIBS="$cf_ncurses_SAVE"
+@@ -6825,7 +6705,7 @@ freebsd*)
+ 	# This is only necessary if you are linking against an obsolete
+ 	# version of ncurses (but it should do no harm, since it's static).
+ 	if test "$cf_nculib_root" = ncurses ; then
+-		echo "$as_me:6828: checking for tgoto in -lmytinfo" >&5
++		echo "$as_me:6708: checking for tgoto in -lmytinfo" >&5
+ echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
+ if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6833,7 +6713,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lmytinfo  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6836 "configure"
++#line 6716 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -6852,16 +6732,16 @@ tgoto ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6855: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6735: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6858: \$? = $ac_status" >&5
++  echo "$as_me:6738: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6861: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6741: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6864: \$? = $ac_status" >&5
++  echo "$as_me:6744: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_mytinfo_tgoto=yes
+ else
+@@ -6872,7 +6752,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:6875: result: $ac_cv_lib_mytinfo_tgoto" >&5
++echo "$as_me:6755: result: $ac_cv_lib_mytinfo_tgoto" >&5
+ echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
+ if test $ac_cv_lib_mytinfo_tgoto = yes; then
+   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
+@@ -6891,13 +6771,13 @@ else
+ 
+ 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ 	cf_libdir=""
+-	echo "$as_me:6894: checking for initscr" >&5
++	echo "$as_me:6774: checking for initscr" >&5
+ echo $ECHO_N "checking for initscr... $ECHO_C" >&6
+ if test "${ac_cv_func_initscr+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 6900 "configure"
++#line 6780 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char initscr (); below.  */
+@@ -6920,7 +6800,7 @@ main ()
+ #if defined (__stub_initscr) || defined (__stub___initscr)
+ choke me
+ #else
+-f = initscr;
++f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -6928,16 +6808,16 @@ f = initscr;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6811: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6934: \$? = $ac_status" >&5
++  echo "$as_me:6814: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6937: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6817: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6940: \$? = $ac_status" >&5
++  echo "$as_me:6820: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func_initscr=yes
+ else
+@@ -6947,18 +6827,18 @@ ac_cv_func_initscr=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:6950: result: $ac_cv_func_initscr" >&5
++echo "$as_me:6830: result: $ac_cv_func_initscr" >&5
+ echo "${ECHO_T}$ac_cv_func_initscr" >&6
+ if test $ac_cv_func_initscr = yes; then
+   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ else
+ 
+ 		cf_save_LIBS="$LIBS"
+-		echo "$as_me:6957: checking for initscr in -l$cf_nculib_root" >&5
++		echo "$as_me:6837: checking for initscr in -l$cf_nculib_root" >&5
+ echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
+ 		LIBS="-l$cf_nculib_root $LIBS"
+ 		cat >conftest.$ac_ext <<_ACEOF
+-#line 6961 "configure"
++#line 6841 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -6970,25 +6850,25 @@ initscr()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6973: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6853: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6976: \$? = $ac_status" >&5
++  echo "$as_me:6856: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6979: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6859: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6982: \$? = $ac_status" >&5
++  echo "$as_me:6862: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:6984: result: yes" >&5
++  echo "$as_me:6864: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ 
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:6991: result: no" >&5
++echo "$as_me:6871: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 
+ cf_search=
+@@ -7078,11 +6958,11 @@ cf_search="$cf_library_path_list $cf_search"
+ 
+ 			for cf_libdir in $cf_search
+ 			do
+-				echo "$as_me:7081: checking for -l$cf_nculib_root in $cf_libdir" >&5
++				echo "$as_me:6961: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
+ 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
+ 				cat >conftest.$ac_ext <<_ACEOF
+-#line 7085 "configure"
++#line 6965 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -7094,25 +6974,25 @@ initscr()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:7097: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6977: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:7100: \$? = $ac_status" >&5
++  echo "$as_me:6980: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:7103: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6983: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7106: \$? = $ac_status" >&5
++  echo "$as_me:6986: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:7108: result: yes" >&5
++  echo "$as_me:6988: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ 					 break
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:7115: result: no" >&5
++echo "$as_me:6995: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 					 LIBS="$cf_save_LIBS"
+ fi
+@@ -7127,7 +7007,7 @@ fi
+ eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+ 
+ if test $cf_found_library = no ; then
+-	{ { echo "$as_me:7130: error: Cannot link $cf_nculib_root library" >&5
++	{ { echo "$as_me:7010: error: Cannot link $cf_nculib_root library" >&5
+ echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -7135,7 +7015,7 @@ fi
+ fi
+ 
+ if test -n "$cf_ncurses_LIBS" ; then
+-	echo "$as_me:7138: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
++	echo "$as_me:7018: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
+ 	cf_ncurses_SAVE="$LIBS"
+ 	for p in $cf_ncurses_LIBS ; do
+@@ -7145,7 +7025,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
+ 		fi
+ 	done
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 7148 "configure"
++#line 7028 "configure"
+ #include "confdefs.h"
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ int
+@@ -7157,23 +7037,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:7160: \"$ac_link\"") >&5
++if { (eval echo "$as_me:7040: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:7163: \$? = $ac_status" >&5
++  echo "$as_me:7043: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:7166: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7046: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7169: \$? = $ac_status" >&5
++  echo "$as_me:7049: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  echo "$as_me:7171: result: yes" >&5
++  echo "$as_me:7051: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:7176: result: no" >&5
++echo "$as_me:7056: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ 		 LIBS="$cf_ncurses_SAVE"
+ fi
+@@ -7210,10 +7090,10 @@ cat >conftest.$ac_ext <<CF_EOF
+ AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
+ CF_EOF
+ 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
+-	{ (eval echo "$as_me:7213: \"$cf_try\"") >&5
++	{ (eval echo "$as_me:7093: \"$cf_try\"") >&5
+   (eval $cf_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7216: \$? = $ac_status" >&5
++  echo "$as_me:7096: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 	if test -f conftest.out ; then
+ 		cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ 	][ 	]*//"`
+@@ -7231,9 +7111,25 @@ cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+ 
+ cf_cv_timestamp=`date`
+ 
+-echo "$as_me:7234: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
++echo "$as_me:7114: 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:7117: 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.
++if test "${with_lib_prefix+set}" = set; then
++  withval="$with_lib_prefix"
++  with_lib_prefix=$withval
++else
++  with_lib_prefix=auto
++fi;
++echo "$as_me:7127: result: $with_lib_prefix" >&5
++echo "${ECHO_T}$with_lib_prefix" >&6
++
++if test $with_lib_prefix = auto
++then
++
+ 	case $cf_cv_system_name in #(vi
+ 	OS/2*|os2*) #(vi
+         LIB_PREFIX=''
+@@ -7243,7 +7139,12 @@ echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($c
+ 	esac
+ cf_prefix=$LIB_PREFIX
+ 
+-LIB_PREFIX=$cf_prefix
++elif test $with_lib_prefix = no
++then
++	LIB_PREFIX=
++else
++	LIB_PREFIX=$with_lib_prefix
++fi
+ 
+ LIB_SUFFIX=
+ 
+@@ -7254,7 +7155,7 @@ if test X"$CC_G_OPT" = X"" ; then
+ 	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+ fi
+ 
+-echo "$as_me:7257: checking for default loader flags" >&5
++echo "$as_me:7158: checking for default loader flags" >&5
+ echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
+ case $DFT_LWR_MODEL in
+ normal)  LD_MODEL=''   ;;
+@@ -7262,11 +7163,11 @@ debug)   LD_MODEL=$CC_G_OPT ;;
+ profile) LD_MODEL='-pg';;
+ shared)  LD_MODEL=''   ;;
+ esac
+-echo "$as_me:7265: result: $LD_MODEL" >&5
++echo "$as_me:7166: result: $LD_MODEL" >&5
+ echo "${ECHO_T}$LD_MODEL" >&6
+ 
+ LD_RPATH_OPT=
+-echo "$as_me:7269: checking for an rpath option" >&5
++echo "$as_me:7170: checking for an rpath option" >&5
+ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
+ case $cf_cv_system_name in #(vi
+ irix*) #(vi
+@@ -7279,10 +7180,10 @@ irix*) #(vi
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-openbsd[2-9].*) #(vi
++openbsd[2-9].*|mirbsd*) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-freebsd*) #(vi
++dragonfly*|freebsd*) #(vi
+ 	LD_RPATH_OPT="-rpath "
+ 	;;
+ netbsd*) #(vi
+@@ -7297,17 +7198,17 @@ solaris2*) #(vi
+ *)
+ 	;;
+ esac
+-echo "$as_me:7300: result: $LD_RPATH_OPT" >&5
++echo "$as_me:7201: result: $LD_RPATH_OPT" >&5
+ echo "${ECHO_T}$LD_RPATH_OPT" >&6
+ 
+ case "x$LD_RPATH_OPT" in #(vi
+ x-R*)
+-	echo "$as_me:7305: checking if we need a space after rpath option" >&5
++	echo "$as_me:7206: 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"
+ 	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 7310 "configure"
++#line 7211 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -7319,16 +7220,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:7322: \"$ac_link\"") >&5
++if { (eval echo "$as_me:7223: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:7325: \$? = $ac_status" >&5
++  echo "$as_me:7226: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:7328: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7229: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7331: \$? = $ac_status" >&5
++  echo "$as_me:7232: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_rpath_space=no
+ else
+@@ -7338,7 +7239,7 @@ cf_rpath_space=yes
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ 	LIBS="$cf_save_LIBS"
+-	echo "$as_me:7341: result: $cf_rpath_space" >&5
++	echo "$as_me:7242: result: $cf_rpath_space" >&5
+ echo "${ECHO_T}$cf_rpath_space" >&6
+ 	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ 	;;
+@@ -7353,7 +7254,7 @@ esac
+ 	cf_ld_rpath_opt=
+ 	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+ 
+-	echo "$as_me:7356: checking if release/abi version should be used for shared libs" >&5
++	echo "$as_me:7257: 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
+ 
+ # Check whether --with-shlib-version or --without-shlib-version was given.
+@@ -7368,7 +7269,7 @@ if test "${with_shlib_version+set}" = set; then
+ 		cf_cv_shlib_version=$withval
+ 		;;
+ 	*)
+-		{ { echo "$as_me:7371: error: option value must be one of: rel, abi, auto or no" >&5
++		{ { echo "$as_me:7272: error: option value must be one of: rel, abi, auto or no" >&5
+ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+    { (exit 1); exit 1; }; }
+ 		;;
+@@ -7377,23 +7278,24 @@ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+ else
+   cf_cv_shlib_version=auto
+ fi;
+-	echo "$as_me:7380: result: $cf_cv_shlib_version" >&5
++	echo "$as_me:7281: result: $cf_cv_shlib_version" >&5
+ echo "${ECHO_T}$cf_cv_shlib_version" >&6
+ 
+ 	cf_cv_rm_so_locs=no
++	cf_try_cflags=
+ 
+ 	# Some less-capable ports of gcc support only -fpic
+ 	CC_SHARED_OPTS=
+ 	if test "$GCC" = yes
+ 	then
+-		echo "$as_me:7389: checking which $CC option to use" >&5
++		echo "$as_me:7291: 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 7396 "configure"
++#line 7298 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -7405,16 +7307,16 @@ int x = 1
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7411: \$? = $ac_status" >&5
++  echo "$as_me:7313: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7414: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7316: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7417: \$? = $ac_status" >&5
++  echo "$as_me:7319: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -7423,7 +7325,7 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 		done
+-		echo "$as_me:7426: result: $CC_SHARED_OPTS" >&5
++		echo "$as_me:7328: result: $CC_SHARED_OPTS" >&5
+ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ 		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+@@ -7431,10 +7333,14 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ 	cf_cv_shlib_version_infix=no
+ 
+ 	case $cf_cv_system_name in #(vi
+-	aix[56]*) #(vi
++	aix4.3-9*|aix[5-7]*) #(vi
+ 		if test "$GCC" = yes; then
+ 			CC_SHARED_OPTS=
+-			MK_SHARED_LIB='$(CC) -shared'
++			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
++		else
++			# CC_SHARED_OPTS='-qpic=large -G'
++			# perhaps "-bM:SRE -bnoentry -bexpall"
++			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ 		fi
+ 		;;
+ 	beos*) #(vi
+@@ -7460,12 +7366,12 @@ CF_EOF
+ 		chmod +x mk_shared_lib.sh
+ 		;;
+ 	darwin*) #(vi
+-		EXTRA_CFLAGS="-no-cpp-precomp"
++		cf_try_cflags="no-cpp-precomp"
+ 		CC_SHARED_OPTS="-dynamic"
+ 		MK_SHARED_LIB='${CC} ${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:7468: checking if ld -search_paths_first works" >&5
++		echo "$as_me:7374: 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
+@@ -7474,7 +7380,7 @@ else
+ 			cf_save_LDFLAGS=$LDFLAGS
+ 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ 			cat >conftest.$ac_ext <<_ACEOF
+-#line 7477 "configure"
++#line 7383 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -7486,16 +7392,16 @@ int i;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:7489: \"$ac_link\"") >&5
++if { (eval echo "$as_me:7395: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:7492: \$? = $ac_status" >&5
++  echo "$as_me:7398: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:7495: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7401: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7498: \$? = $ac_status" >&5
++  echo "$as_me:7404: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ldflags_search_paths_first=yes
+ else
+@@ -7506,12 +7412,20 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ 				LDFLAGS=$cf_save_LDFLAGS
+ fi
+-echo "$as_me:7509: result: $cf_cv_ldflags_search_paths_first" >&5
++echo "$as_me:7415: 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
+ 		;;
++	hpux[7-8]*) #(vi
++		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
++		if test "$GCC" != yes; then
++			CC_SHARED_OPTS='+Z'
++		fi
++		MK_SHARED_LIB='${LD} -b -o $@'
++		INSTALL_LIB="-m 555"
++		;;
+ 	hpux*) #(vi
+ 		# (tested with gcc 2.7.2 -- I don't have c89)
+ 		if test "$GCC" = yes; then
+@@ -7525,9 +7439,19 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		# readonly to exploit a quirk in the memory manager.
+ 		INSTALL_LIB="-m 555"
+ 		;;
++	interix*)
++		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
++		if test "$cf_cv_shlib_version" = rel; then
++			cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
++		else
++			cf_shared_soname='`basename `'
++		fi
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
++		;;
+ 	irix*) #(vi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		# tested with IRIX 5.2 and 'cc'.
+ 		if test "$GCC" != yes; then
+@@ -7544,7 +7468,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 
+ 	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+@@ -7556,13 +7480,34 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 
+ 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ 		;;
+-	openbsd[2-9].*) #(vi
++	mingw*) #(vi
++		cf_cv_shlib_version=mingw
++		cf_cv_shlib_version_infix=mingw
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
++		#MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
++		#MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
++		cat >mk_shared_lib.sh <<-CF_EOF
++		#!/bin/sh
++		SHARED_LIB=\$1
++		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
++		shift
++		cat <<-EOF
++		Linking shared library
++		** SHARED_LIB \$SHARED_LIB
++		** IMPORT_LIB \$IMPORT_LIB
++EOF
++		exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
++CF_EOF
++		chmod +x mk_shared_lib.sh
++		;;
++	openbsd[2-9].*|mirbsd*) #(vi
+ 		if test "$DFT_LWR_MODEL" = "shared" ; then
+ 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 
+@@ -7580,12 +7525,12 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		MK_SHARED_LIB='${LD} -Bshareable -o $@'
+ 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ 		;;
+-	freebsd*) #(vi
++	dragonfly*|freebsd*) #(vi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+-			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 
+ 	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+@@ -7602,7 +7547,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 			if test "$cf_cv_shlib_version" = auto; then
+ 			if test -f /usr/libexec/ld.elf_so; then
+ 				cf_cv_shlib_version=abi
+@@ -7686,7 +7631,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 			do
+ 				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ 				cat >conftest.$ac_ext <<_ACEOF
+-#line 7689 "configure"
++#line 7634 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -7698,16 +7643,16 @@ printf("Hello\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7701: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7646: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7704: \$? = $ac_status" >&5
++  echo "$as_me:7649: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7707: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7652: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7710: \$? = $ac_status" >&5
++  echo "$as_me:7655: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -7744,22 +7689,63 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ 			;;
+ 		*)
+-			{ echo "$as_me:7747: WARNING: ignored --with-shlib-version" >&5
++			{ echo "$as_me:7692: WARNING: ignored --with-shlib-version" >&5
+ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
+ 			;;
+ 		esac
+ 		;;
+ 	esac
+ 
+-	if test -n "$cf_ld_rpath_opt" ; then
+-		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
++	if test -n "$cf_try_cflags"
++	then
++cat > conftest.$ac_ext <<EOF
++#line 7702 "${as_me:-configure}"
++#include <stdio.h>
++int main(int argc, char *argv[])
++{
++	printf("hello\n");
++	return (argv[argc-1] == 0) ;
++}
++EOF
++		cf_save_CFLAGS="$CFLAGS"
++		for cf_opt in $cf_try_cflags
++		do
++			CFLAGS="$cf_save_CFLAGS -$cf_opt"
++			echo "$as_me:7714: 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:7716: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:7719: \$? = $ac_status" >&5
++  (exit $ac_status); }; then
++				echo "$as_me:7721: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++				cf_save_CFLAGS="$CFLAGS"
++			else
++				echo "$as_me:7725: result: no" >&5
++echo "${ECHO_T}no" >&6
++			fi
++		done
++		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+ 
++	# RPATH_LIST is a colon-separated list of directories
++	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
++	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
++
++	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
++
++echo "${as_me:-configure}:7738: 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}:7742: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
++
+ # The test/sample programs in the original tree link using rpath option.
+ # Make it optional for packagers.
+ if test -n "$LOCAL_LDFLAGS"
+ then
+-	echo "$as_me:7762: checking if you want to link sample programs with rpath option" >&5
++	echo "$as_me:7748: checking if you want to link sample programs with rpath option" >&5
+ echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
+ 
+ # Check whether --enable-rpath-link or --disable-rpath-link was given.
+@@ -7769,7 +7755,7 @@ if test "${enable_rpath_link+set}" = set; then
+ else
+   with_rpath_link=yes
+ fi;
+-	echo "$as_me:7772: result: $with_rpath_link" >&5
++	echo "$as_me:7758: result: $with_rpath_link" >&5
+ echo "${ECHO_T}$with_rpath_link" >&6
+ 	if test "$with_rpath_link" = no
+ 	then
+@@ -7780,13 +7766,8 @@ fi
+ 
+ ###############################################################################
+ 
+-	case $cf_cv_system_name in
+-	os2*)	PATH_SEPARATOR=';'  ;;
+-	*)	PATH_SEPARATOR=':'  ;;
+-	esac
+-
+ ###   use option --enable-broken-linker to force on use of broken-linker support
+-echo "$as_me:7789: checking if you want broken-linker support code" >&5
++echo "$as_me:7770: 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.
+@@ -7796,7 +7777,7 @@ if test "${enable_broken_linker+set}" = set; then
+ else
+   with_broken_linker=${BROKEN_LINKER:-no}
+ fi;
+-echo "$as_me:7799: result: $with_broken_linker" >&5
++echo "$as_me:7780: result: $with_broken_linker" >&5
+ echo "${ECHO_T}$with_broken_linker" >&6
+ 
+ BROKEN_LINKER=0
+@@ -7816,7 +7797,7 @@ EOF
+ 		BROKEN_LINKER=1
+ 		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
+ 
+-echo "${as_me:-configure}:7819: testing cygwin linker is broken anyway ..." 1>&5
++echo "${as_me:-configure}:7800: testing cygwin linker is broken anyway ..." 1>&5
+ 
+ 		;;
+ 	esac
+@@ -7829,7 +7810,7 @@ cf_POSIX_C_SOURCE=199506L
+ cf_xopen_source=
+ 
+ case $host_os in #(vi
+-aix[456]*) #(vi
++aix[4-7]*) #(vi
+ 	cf_xopen_source="-D_ALL_SOURCE"
+ 	;;
+ cygwin) #(vi
+@@ -7840,6 +7821,7 @@ darwin[0-8].*) #(vi
+ 	;;
+ darwin*) #(vi
+ 	cf_xopen_source="-D_DARWIN_C_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ freebsd*|dragonfly*) #(vi
+ 	# 5.x headers associate
+@@ -7857,17 +7839,18 @@ hpux*) #(vi
+ 	;;
+ irix[56].*) #(vi
+ 	cf_xopen_source="-D_SGI_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+ 
+-echo "$as_me:7863: checking if we must define _GNU_SOURCE" >&5
++echo "$as_me:7846: 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 7870 "configure"
++#line 7853 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ int
+@@ -7882,16 +7865,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7885: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7868: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7888: \$? = $ac_status" >&5
++  echo "$as_me:7871: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7891: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7874: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7894: \$? = $ac_status" >&5
++  echo "$as_me:7877: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_gnu_source=no
+ else
+@@ -7900,7 +7883,7 @@ cat conftest.$ac_ext >&5
+ cf_save="$CPPFLAGS"
+ 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ 	 cat >conftest.$ac_ext <<_ACEOF
+-#line 7903 "configure"
++#line 7886 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ int
+@@ -7915,16 +7898,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7918: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7901: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7921: \$? = $ac_status" >&5
++  echo "$as_me:7904: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7924: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7907: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7927: \$? = $ac_status" >&5
++  echo "$as_me:7910: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_gnu_source=no
+ else
+@@ -7939,47 +7922,293 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:7942: result: $cf_cv_gnu_source" >&5
++echo "$as_me:7925: result: $cf_cv_gnu_source" >&5
+ echo "${ECHO_T}$cf_cv_gnu_source" >&6
+ test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ 
+ 	;;
+ mirbsd*) #(vi
+-	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+-	;;
+-netbsd*) #(vi
+-	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+-	;;
+-openbsd*) #(vi
+-	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+-	;;
+-osf[45]*) #(vi
+-	cf_xopen_source="-D_OSF_SOURCE"
+-	;;
+-nto-qnx*) #(vi
+-	cf_xopen_source="-D_QNX_SOURCE"
+-	;;
+-sco*) #(vi
+-	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+-	;;
+-solaris2.1[0-9]) #(vi
+-	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	;;
+-solaris2.[1-9]) #(vi
+-	cf_xopen_source="-D__EXTENSIONS__"
+-	;;
+-*)
+-	echo "$as_me:7972: 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
++	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
++	cf_XOPEN_SOURCE=
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-#line 7979 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-int
++cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
++
++cf_save_CFLAGS="$CFLAGS"
++cf_save_CPPFLAGS="$CPPFLAGS"
++
++cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
++	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
++
++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:7947: 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}:7953: testing if the symbol is already defined go no further ..." 1>&5
++
++	cat >conftest.$ac_ext <<_ACEOF
++#line 7956 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:7971: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:7974: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:7977: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:7980: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  cf_cv_posix_c_source=no
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_want_posix_source=no
++	 case .$cf_POSIX_C_SOURCE in #(vi
++	 .[12]??*) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		;;
++	 .2) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		cf_want_posix_source=yes
++		;;
++	 .*)
++		cf_want_posix_source=yes
++		;;
++	 esac
++	 if test "$cf_want_posix_source" = yes ; then
++		cat >conftest.$ac_ext <<_ACEOF
++#line 8001 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifdef _POSIX_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8016: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8019: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8022: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8025: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 fi
++
++echo "${as_me:-configure}:8036: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
++
++	 CFLAGS="$cf_trim_CFLAGS"
++	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
++
++echo "${as_me:-configure}:8041: testing if the second compile does not leave our definition intact error ..." 1>&5
++
++	 cat >conftest.$ac_ext <<_ACEOF
++#line 8044 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8059: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8062: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8065: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8068: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 CFLAGS="$cf_save_CFLAGS"
++	 CPPFLAGS="$cf_save_CPPFLAGS"
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:8084: 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
++	CFLAGS="$cf_trim_CFLAGS"
++	CPPFLAGS="$cf_trim_CPPFLAGS"
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_cv_posix_c_source
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
++
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
++fi
++
++fi
++
++	;;
++netbsd*) #(vi
++	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]*) #(vi
++	# 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
++	;;
++openbsd*) #(vi
++	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
++	;;
++osf[45]*) #(vi
++	cf_xopen_source="-D_OSF_SOURCE"
++	;;
++nto-qnx*) #(vi
++	cf_xopen_source="-D_QNX_SOURCE"
++	;;
++sco*) #(vi
++	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
++	;;
++solaris2.*) #(vi
++	cf_xopen_source="-D__EXTENSIONS__"
++	;;
++*)
++
++echo "$as_me:8197: 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 8204 "configure"
++#include "confdefs.h"
++
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++int
+ main ()
+ {
+ 
+@@ -7991,16 +8220,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7994: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:8223: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7997: \$? = $ac_status" >&5
++  echo "$as_me:8226: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8000: \"$ac_try\"") >&5
++  { (eval echo "$as_me:8229: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8003: \$? = $ac_status" >&5
++  echo "$as_me:8232: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_xopen_source=no
+ else
+@@ -8009,9 +8238,13 @@ cat conftest.$ac_ext >&5
+ cf_save="$CPPFLAGS"
+ 	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ 	 cat >conftest.$ac_ext <<_ACEOF
+-#line 8012 "configure"
++#line 8241 "configure"
+ #include "confdefs.h"
++
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
++
+ int
+ main ()
+ {
+@@ -8024,16 +8257,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:8260: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8030: \$? = $ac_status" >&5
++  echo "$as_me:8263: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8033: \"$ac_try\"") >&5
++  { (eval echo "$as_me:8266: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8036: \$? = $ac_status" >&5
++  echo "$as_me:8269: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_xopen_source=no
+ else
+@@ -8048,9 +8281,10 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:8051: result: $cf_cv_xopen_source" >&5
++echo "$as_me:8284: result: $cf_cv_xopen_source" >&5
+ echo "${ECHO_T}$cf_cv_xopen_source" >&6
+-	if test "$cf_cv_xopen_source" != no ; then
++
++if test "$cf_cv_xopen_source" != no ; then
+ 
+ CFLAGS=`echo "$CFLAGS" | \
+ 	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
+@@ -8060,7 +8294,7 @@ 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"
++	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ 
+ cf_fix_cppflags=no
+ cf_new_cflags=
+@@ -8140,7 +8374,7 @@ if test -n "$cf_new_extra_cppflags" ; then
+ 	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ fi
+ 
+-	fi
++fi
+ 
+ cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+ 
+@@ -8155,23 +8389,327 @@ 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:8158: checking if we should define _POSIX_C_SOURCE" >&5
++echo "$as_me:8392: 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}:8164: testing if the symbol is already defined go no further ..." 1>&5
++echo "${as_me:-configure}:8398: testing if the symbol is already defined go no further ..." 1>&5
++
++	cat >conftest.$ac_ext <<_ACEOF
++#line 8401 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8416: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8419: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8422: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8425: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  cf_cv_posix_c_source=no
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_want_posix_source=no
++	 case .$cf_POSIX_C_SOURCE in #(vi
++	 .[12]??*) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		;;
++	 .2) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		cf_want_posix_source=yes
++		;;
++	 .*)
++		cf_want_posix_source=yes
++		;;
++	 esac
++	 if test "$cf_want_posix_source" = yes ; then
++		cat >conftest.$ac_ext <<_ACEOF
++#line 8446 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifdef _POSIX_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8461: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8464: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8467: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8470: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 fi
++
++echo "${as_me:-configure}:8481: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
++
++	 CFLAGS="$cf_trim_CFLAGS"
++	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
++
++echo "${as_me:-configure}:8486: testing if the second compile does not leave our definition intact error ..." 1>&5
++
++	 cat >conftest.$ac_ext <<_ACEOF
++#line 8489 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8504: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8507: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8510: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8513: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 CFLAGS="$cf_save_CFLAGS"
++	 CPPFLAGS="$cf_save_CPPFLAGS"
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:8529: 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
++	CFLAGS="$cf_trim_CFLAGS"
++	CPPFLAGS="$cf_trim_CPPFLAGS"
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_cv_posix_c_source
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
++
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
++fi
++
++fi
++
++	;;
++esac
++
++if test -n "$cf_xopen_source" ; then
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_xopen_source
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
++
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
++fi
++
++fi
+ 
++if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
++	echo "$as_me:8702: 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 8167 "configure"
++#line 8705 "configure"
+ #include "confdefs.h"
+-#include <sys/types.h>
++#include <stdlib.h>
+ int
+ main ()
+ {
+ 
+-#ifndef _POSIX_C_SOURCE
++#ifndef _XOPEN_SOURCE
+ make an error
+ #endif
+   ;
+@@ -8179,44 +8717,37 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8182: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:8720: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8185: \$? = $ac_status" >&5
++  echo "$as_me:8723: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8188: \"$ac_try\"") >&5
++  { (eval echo "$as_me:8726: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8191: \$? = $ac_status" >&5
++  echo "$as_me:8729: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  cf_cv_posix_c_source=no
++  cf_XOPEN_SOURCE_set=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-cf_want_posix_source=no
+-	 case .$cf_POSIX_C_SOURCE in #(vi
+-	 .[12]??*) #(vi
+-		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+-		;;
+-	 .2) #(vi
+-		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+-		cf_want_posix_source=yes
+-		;;
+-	 .*)
+-		cf_want_posix_source=yes
+-		;;
+-	 esac
+-	 if test "$cf_want_posix_source" = yes ; then
++cf_XOPEN_SOURCE_set=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	echo "$as_me:8738: 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 8212 "configure"
++#line 8743 "configure"
+ #include "confdefs.h"
+-#include <sys/types.h>
++#include <stdlib.h>
+ int
+ main ()
+ {
+ 
+-#ifdef _POSIX_SOURCE
++#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+ make an error
+ #endif
+   ;
+@@ -8224,42 +8755,87 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:8758: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8230: \$? = $ac_status" >&5
++  echo "$as_me:8761: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8233: \"$ac_try\"") >&5
++  { (eval echo "$as_me:8764: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8236: \$? = $ac_status" >&5
++  echo "$as_me:8767: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  :
++  cf_XOPEN_SOURCE_set_ok=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
++cf_XOPEN_SOURCE_set_ok=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+-	 fi
++		if test $cf_XOPEN_SOURCE_set_ok = no
++		then
++			{ echo "$as_me:8778: WARNING: _XOPEN_SOURCE is lower than requested" >&5
++echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
++		fi
++	else
+ 
+-echo "${as_me:-configure}:8247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
++echo "$as_me:8783: 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
+ 
+-	 CFLAGS="$cf_trim_CFLAGS"
+-	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
++	cat >conftest.$ac_ext <<_ACEOF
++#line 8790 "configure"
++#include "confdefs.h"
+ 
+-echo "${as_me:-configure}:8252: testing if the second compile does not leave our definition intact error ..." 1>&5
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++int
++main ()
++{
+ 
++#ifndef _XOPEN_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:8809: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:8812: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:8815: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:8818: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  cf_cv_xopen_source=no
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_save="$CPPFLAGS"
++	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ 	 cat >conftest.$ac_ext <<_ACEOF
+-#line 8255 "configure"
++#line 8827 "configure"
+ #include "confdefs.h"
++
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
++
+ int
+ main ()
+ {
+ 
+-#ifndef _POSIX_C_SOURCE
++#ifdef _XOPEN_SOURCE
+ make an error
+ #endif
+   ;
+@@ -8267,129 +8843,51 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8270: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:8846: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8273: \$? = $ac_status" >&5
++  echo "$as_me:8849: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8276: \"$ac_try\"") >&5
++  { (eval echo "$as_me:8852: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8279: \$? = $ac_status" >&5
++  echo "$as_me:8855: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  :
++  cf_cv_xopen_source=no
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-cf_cv_posix_c_source=no
++cf_cv_xopen_source=$cf_XOPEN_SOURCE
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+-	 CFLAGS="$cf_save_CFLAGS"
+-	 CPPFLAGS="$cf_save_CPPFLAGS"
++	CPPFLAGS="$cf_save"
+ 
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:8295: 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
+-	CFLAGS="$cf_trim_CFLAGS"
+-	CPPFLAGS="$cf_trim_CPPFLAGS"
+-
+-cf_fix_cppflags=no
+-cf_new_cflags=
+-cf_new_cppflags=
+-cf_new_extra_cppflags=
+-
+-for cf_add_cflags in $cf_cv_posix_c_source
+-do
+-case $cf_fix_cppflags in
+-no)
+-	case $cf_add_cflags in #(vi
+-	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+-		case $cf_add_cflags in
+-		-D*)
+-			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++echo "$as_me:8870: result: $cf_cv_xopen_source" >&5
++echo "${ECHO_T}$cf_cv_xopen_source" >&6
+ 
+-			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-				&& test -z "${cf_tst_cflags}" \
+-				&& cf_fix_cppflags=yes
++if test "$cf_cv_xopen_source" != no ; then
+ 
+-			if test $cf_fix_cppflags = yes ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			elif test "${cf_tst_cflags}" = "\"'" ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			fi
+-			;;
+-		esac
+-		case "$CPPFLAGS" in
+-		*$cf_add_cflags) #(vi
+-			;;
+-		*) #(vi
+-			case $cf_add_cflags in #(vi
+-			-D*)
+-				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++CFLAGS=`echo "$CFLAGS" | \
++	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
+ 
+ CPPFLAGS=`echo "$CPPFLAGS" | \
+-	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
+-		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
+-
+-				;;
+-			esac
+-			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+-			;;
+-		esac
+-		;;
+-	*)
+-		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+-		;;
+-	esac
+-	;;
+-yes)
+-	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-
+-	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+-
+-	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-		&& test -z "${cf_tst_cflags}" \
+-		&& cf_fix_cppflags=no
+-	;;
+-esac
+-done
+-
+-if test -n "$cf_new_cflags" ; then
+-
+-	CFLAGS="$CFLAGS $cf_new_cflags"
+-fi
+-
+-if test -n "$cf_new_cppflags" ; then
+-
+-	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+-fi
+-
+-if test -n "$cf_new_extra_cppflags" ; then
+-
+-	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+-fi
+-
+-fi
+-
+-	;;
+-esac
++	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
+ 
+-if test -n "$cf_xopen_source" ; then
++	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ 
+ 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_temp_xopen_source
+ do
+ case $cf_fix_cppflags in
+ no)
+@@ -8464,6 +8962,9 @@ fi
+ 
+ fi
+ 
++	fi
++fi
++
+ # Check whether --enable-largefile or --disable-largefile was given.
+ if test "${enable_largefile+set}" = set; then
+   enableval="$enable_largefile"
+@@ -8471,7 +8972,7 @@ if test "${enable_largefile+set}" = set; then
+ fi;
+ if test "$enable_largefile" != no; then
+ 
+-  echo "$as_me:8474: checking for special C compiler options needed for large files" >&5
++  echo "$as_me:8975: 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
+@@ -8483,7 +8984,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 8486 "configure"
++#line 8987 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -8503,16 +9004,16 @@ main ()
+ }
+ _ACEOF
+      	 rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9007: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8509: \$? = $ac_status" >&5
++  echo "$as_me:9010: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8512: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9013: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8515: \$? = $ac_status" >&5
++  echo "$as_me:9016: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -8522,16 +9023,16 @@ fi
+ rm -f conftest.$ac_objext
+      	 CC="$CC -n32"
+      	 rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8525: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9026: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8528: \$? = $ac_status" >&5
++  echo "$as_me:9029: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8531: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9032: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8534: \$? = $ac_status" >&5
++  echo "$as_me:9035: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_sys_largefile_CC=' -n32'; break
+ else
+@@ -8545,13 +9046,13 @@ rm -f conftest.$ac_objext
+        rm -f conftest.$ac_ext
+     fi
+ fi
+-echo "$as_me:8548: result: $ac_cv_sys_largefile_CC" >&5
++echo "$as_me:9049: 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:8554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
++  echo "$as_me:9055: 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
+@@ -8559,7 +9060,7 @@ else
+   while :; do
+   ac_cv_sys_file_offset_bits=no
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8562 "configure"
++#line 9063 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -8579,16 +9080,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8582: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9083: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8585: \$? = $ac_status" >&5
++  echo "$as_me:9086: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8588: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9089: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8591: \$? = $ac_status" >&5
++  echo "$as_me:9092: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -8597,7 +9098,7 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8600 "configure"
++#line 9101 "configure"
+ #include "confdefs.h"
+ #define _FILE_OFFSET_BITS 64
+ #include <sys/types.h>
+@@ -8618,16 +9119,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8621: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9122: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8624: \$? = $ac_status" >&5
++  echo "$as_me:9125: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8627: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9128: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8630: \$? = $ac_status" >&5
++  echo "$as_me:9131: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_sys_file_offset_bits=64; break
+ else
+@@ -8638,7 +9139,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+   break
+ done
+ fi
+-echo "$as_me:8641: result: $ac_cv_sys_file_offset_bits" >&5
++echo "$as_me:9142: 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
+ 
+@@ -8648,7 +9149,7 @@ EOF
+ 
+ fi
+ rm -rf conftest*
+-  echo "$as_me:8651: checking for _LARGE_FILES value needed for large files" >&5
++  echo "$as_me:9152: 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
+@@ -8656,7 +9157,7 @@ else
+   while :; do
+   ac_cv_sys_large_files=no
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8659 "configure"
++#line 9160 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -8676,16 +9177,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8679: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9180: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8682: \$? = $ac_status" >&5
++  echo "$as_me:9183: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8685: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9186: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8688: \$? = $ac_status" >&5
++  echo "$as_me:9189: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -8694,7 +9195,7 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8697 "configure"
++#line 9198 "configure"
+ #include "confdefs.h"
+ #define _LARGE_FILES 1
+ #include <sys/types.h>
+@@ -8715,16 +9216,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8718: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9219: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8721: \$? = $ac_status" >&5
++  echo "$as_me:9222: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8724: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9225: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8727: \$? = $ac_status" >&5
++  echo "$as_me:9228: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_sys_large_files=1; break
+ else
+@@ -8735,7 +9236,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+   break
+ done
+ fi
+-echo "$as_me:8738: result: $ac_cv_sys_large_files" >&5
++echo "$as_me:9239: 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
+ 
+@@ -8748,7 +9249,7 @@ rm -rf conftest*
+ fi
+ 
+     if test "$enable_largefile" != no ; then
+-	echo "$as_me:8751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
++	echo "$as_me:9252: 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
+@@ -8756,7 +9257,7 @@ else
+   while :; do
+   ac_cv_sys_largefile_source=no
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8759 "configure"
++#line 9260 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -8768,16 +9269,16 @@ return !fseeko;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9272: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8774: \$? = $ac_status" >&5
++  echo "$as_me:9275: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8777: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9278: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8780: \$? = $ac_status" >&5
++  echo "$as_me:9281: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -8786,7 +9287,7 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 8789 "configure"
++#line 9290 "configure"
+ #include "confdefs.h"
+ #define _LARGEFILE_SOURCE 1
+ #include <stdio.h>
+@@ -8799,16 +9300,16 @@ return !fseeko;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8805: \$? = $ac_status" >&5
++  echo "$as_me:9306: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8808: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9309: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8811: \$? = $ac_status" >&5
++  echo "$as_me:9312: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_sys_largefile_source=1; break
+ else
+@@ -8819,7 +9320,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+   break
+ done
+ fi
+-echo "$as_me:8822: result: $ac_cv_sys_largefile_source" >&5
++echo "$as_me:9323: 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
+ 
+@@ -8833,13 +9334,13 @@ 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:8836: checking for fseeko" >&5
++echo "$as_me:9337: 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 8842 "configure"
++#line 9343 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -8851,16 +9352,16 @@ return fseeko && fseeko (stdin, 0, 0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
++if { (eval echo "$as_me:9355: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:8857: \$? = $ac_status" >&5
++  echo "$as_me:9358: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:8860: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9361: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8863: \$? = $ac_status" >&5
++  echo "$as_me:9364: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func_fseeko=yes
+ else
+@@ -8870,7 +9371,7 @@ ac_cv_func_fseeko=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:8873: result: $ac_cv_func_fseeko" >&5
++echo "$as_me:9374: result: $ac_cv_func_fseeko" >&5
+ echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+ if test $ac_cv_func_fseeko = yes; then
+ 
+@@ -8891,14 +9392,14 @@ fi
+ 	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
+ 	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
+ 
+-	echo "$as_me:8894: checking whether to use struct dirent64" >&5
++	echo "$as_me:9395: 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 8901 "configure"
++#line 9402 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/types.h>
+@@ -8919,16 +9420,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:8922: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9423: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:8925: \$? = $ac_status" >&5
++  echo "$as_me:9426: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:8928: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9429: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:8931: \$? = $ac_status" >&5
++  echo "$as_me:9432: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_struct_dirent64=yes
+ else
+@@ -8939,16 +9440,17 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:8942: result: $cf_cv_struct_dirent64" >&5
++echo "$as_me:9443: result: $cf_cv_struct_dirent64" >&5
+ echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
+-	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
++	test "$cf_cv_struct_dirent64" = yes &&
++cat >>confdefs.h <<\EOF
+ #define HAVE_STRUCT_DIRENT64 1
+ EOF
+ 
+     fi
+ 
+ ### Enable compiling-in rcs id's
+-echo "$as_me:8951: checking if RCS identifiers should be compiled-in" >&5
++echo "$as_me:9453: 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.
+@@ -8958,16 +9460,17 @@ if test "${with_rcs_ids+set}" = set; then
+ else
+   with_rcs_ids=no
+ fi;
+-echo "$as_me:8961: result: $with_rcs_ids" >&5
++echo "$as_me:9463: result: $with_rcs_ids" >&5
+ echo "${ECHO_T}$with_rcs_ids" >&6
+-test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
++test "$with_rcs_ids" = yes &&
++cat >>confdefs.h <<\EOF
+ #define USE_RCS_IDS 1
+ EOF
+ 
+ ###############################################################################
+ 
+ ### Note that some functions (such as const) are normally disabled anyway.
+-echo "$as_me:8970: checking if you want to build with function extensions" >&5
++echo "$as_me:9473: 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.
+@@ -8977,15 +9480,16 @@ if test "${enable_ext_funcs+set}" = set; then
+ else
+   with_ext_funcs=yes
+ fi;
+-echo "$as_me:8980: result: $with_ext_funcs" >&5
++echo "$as_me:9483: result: $with_ext_funcs" >&5
+ echo "${ECHO_T}$with_ext_funcs" >&6
+ if test "$with_ext_funcs" = yes ; then
+ 	NCURSES_EXT_FUNCS=1
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_USE_DEFAULT_COLORS 1
+ EOF
+ 
+-	cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define NCURSES_EXT_FUNCS 1
+ EOF
+ 
+@@ -8994,7 +9498,7 @@ else
+ fi
+ 
+ ###   use option --enable-const to turn on use of const beyond that in XSI.
+-echo "$as_me:8997: checking for extended use of const keyword" >&5
++echo "$as_me:9501: 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.
+@@ -9004,7 +9508,7 @@ if test "${enable_const+set}" = set; then
+ else
+   with_ext_const=no
+ fi;
+-echo "$as_me:9007: result: $with_ext_const" >&5
++echo "$as_me:9511: result: $with_ext_const" >&5
+ echo "${ECHO_T}$with_ext_const" >&6
+ NCURSES_CONST='/*nothing*/'
+ if test "$with_ext_const" = yes ; then
+@@ -9014,7 +9518,7 @@ fi
+ ###############################################################################
+ # These options are relatively safe to experiment with.
+ 
+-echo "$as_me:9017: checking if you want all development code" >&5
++echo "$as_me:9521: 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.
+@@ -9024,7 +9528,7 @@ if test "${with_develop+set}" = set; then
+ else
+   with_develop=no
+ fi;
+-echo "$as_me:9027: result: $with_develop" >&5
++echo "$as_me:9531: result: $with_develop" >&5
+ echo "${ECHO_T}$with_develop" >&6
+ 
+ ###############################################################################
+@@ -9033,7 +9537,7 @@ echo "${ECHO_T}$with_develop" >&6
+ # This is still experimental (20080329), but should ultimately be moved to
+ # the script-block --with-normal, etc.
+ 
+-echo "$as_me:9036: checking if you want to link with the pthread library" >&5
++echo "$as_me:9540: 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.
+@@ -9043,27 +9547,27 @@ if test "${with_pthread+set}" = set; then
+ else
+   with_pthread=no
+ fi;
+-echo "$as_me:9046: result: $with_pthread" >&5
++echo "$as_me:9550: result: $with_pthread" >&5
+ echo "${ECHO_T}$with_pthread" >&6
+ 
+ if test "$with_pthread" != no ; then
+-    echo "$as_me:9050: checking for pthread.h" >&5
++    echo "$as_me:9554: 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 9056 "configure"
++#line 9560 "configure"
+ #include "confdefs.h"
+ #include <pthread.h>
+ _ACEOF
+-if { (eval echo "$as_me:9060: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:9564: \"$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:9066: \$? = $ac_status" >&5
++  echo "$as_me:9570: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -9082,20 +9586,22 @@ else
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ fi
+-echo "$as_me:9085: result: $ac_cv_header_pthread_h" >&5
++echo "$as_me:9589: 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
+ 
+-        cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define HAVE_PTHREADS_H 1
+ EOF
+ 
+-        echo "$as_me:9093: checking if we can link with the pthread library" >&5
+-echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
+-        cf_save_LIBS="$LIBS"
+-        LIBS="-lpthread $LIBS"
+-        cat >conftest.$ac_ext <<_ACEOF
+-#line 9098 "configure"
++	for cf_lib_pthread in pthread c_r
++	do
++	    echo "$as_me:9599: 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"
++	    LIBS="-l$cf_lib_pthread $LIBS"
++	    cat >conftest.$ac_ext <<_ACEOF
++#line 9604 "configure"
+ #include "confdefs.h"
+ 
+ #include <pthread.h>
+@@ -9104,23 +9610,24 @@ int
+ main ()
+ {
+ 
+-        int rc = pthread_create(0,0,0,0);
++		int rc = pthread_create(0,0,0,0);
++		int r2 = pthread_mutexattr_settype(0, 0);
+ 
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:9114: \"$ac_link\"") >&5
++if { (eval echo "$as_me:9621: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:9117: \$? = $ac_status" >&5
++  echo "$as_me:9624: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:9120: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9627: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9123: \$? = $ac_status" >&5
++  echo "$as_me:9630: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   with_pthread=yes
+ else
+@@ -9129,27 +9636,30 @@ cat conftest.$ac_ext >&5
+ with_pthread=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+-        LIBS="$cf_save_LIBS"
+-        echo "$as_me:9133: result: $with_pthread" >&5
++	    LIBS="$cf_save_LIBS"
++	    echo "$as_me:9640: result: $with_pthread" >&5
+ echo "${ECHO_T}$with_pthread" >&6
++	    test "$with_pthread" = yes && break
++	done
++
++	if test "$with_pthread" = yes ; then
++	    LIBS="-l$cf_lib_pthread $LIBS"
+ 
+-        if test "$with_pthread" = yes ; then
+-            LIBS="-lpthread $LIBS"
+-            cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define HAVE_LIBPTHREADS 1
+ EOF
+ 
+-        else
+-            { { echo "$as_me:9143: error: Cannot link with pthread library" >&5
++	else
++	    { { echo "$as_me:9653: error: Cannot link with pthread library" >&5
+ echo "$as_me: error: Cannot link with pthread library" >&2;}
+    { (exit 1); exit 1; }; }
+-        fi
++	fi
+ 
+ fi
+ 
+ fi
+ 
+-echo "$as_me:9152: checking if you want to use weak-symbols for pthreads" >&5
++echo "$as_me:9662: 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.
+@@ -9159,18 +9669,18 @@ if test "${enable_weak_symbols+set}" = set; then
+ else
+   use_weak_symbols=no
+ fi;
+-echo "$as_me:9162: result: $use_weak_symbols" >&5
++echo "$as_me:9672: result: $use_weak_symbols" >&5
+ echo "${ECHO_T}$use_weak_symbols" >&6
+ if test "$use_weak_symbols" = yes ; then
+ 
+-echo "$as_me:9166: checking if $CC supports weak symbols" >&5
++echo "$as_me:9676: 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 9173 "configure"
++#line 9683 "configure"
+ #include "confdefs.h"
+ 
+ #include <stdio.h>
+@@ -9196,16 +9706,16 @@ weak_symbol(fopen);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:9199: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9709: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:9202: \$? = $ac_status" >&5
++  echo "$as_me:9712: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:9205: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9715: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9208: \$? = $ac_status" >&5
++  echo "$as_me:9718: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_weak_symbols=yes
+ else
+@@ -9216,7 +9726,7 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:9219: result: $cf_cv_weak_symbols" >&5
++echo "$as_me:9729: result: $cf_cv_weak_symbols" >&5
+ echo "${ECHO_T}$cf_cv_weak_symbols" >&6
+ 
+ else
+@@ -9224,7 +9734,8 @@ else
+ fi
+ 
+ if test $cf_cv_weak_symbols = yes ; then
+-    cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define USE_WEAK_SYMBOLS 1
+ EOF
+ 
+@@ -9232,7 +9743,8 @@ fi
+ 
+ PTHREAD=
+ if test "$with_pthread" = "yes" ; then
+-    cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define USE_PTHREADS 1
+ EOF
+ 
+@@ -9243,13 +9755,13 @@ EOF
+ fi
+ 
+ # OpenSUSE is installing ncurses6, using reentrant option.
+-echo "$as_me:9246: checking for _nc_TABSIZE" >&5
++echo "$as_me:9758: checking for _nc_TABSIZE" >&5
+ echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
+ if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 9252 "configure"
++#line 9764 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char _nc_TABSIZE (); below.  */
+@@ -9272,7 +9784,7 @@ main ()
+ #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
+ choke me
+ #else
+-f = _nc_TABSIZE;
++f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -9280,16 +9792,16 @@ f = _nc_TABSIZE;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:9283: \"$ac_link\"") >&5
++if { (eval echo "$as_me:9795: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:9286: \$? = $ac_status" >&5
++  echo "$as_me:9798: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:9289: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9801: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9292: \$? = $ac_status" >&5
++  echo "$as_me:9804: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func__nc_TABSIZE=yes
+ else
+@@ -9299,7 +9811,7 @@ ac_cv_func__nc_TABSIZE=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:9302: result: $ac_cv_func__nc_TABSIZE" >&5
++echo "$as_me:9814: result: $ac_cv_func__nc_TABSIZE" >&5
+ echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
+ if test $ac_cv_func__nc_TABSIZE = yes; then
+   assume_reentrant=yes
+@@ -9311,7 +9823,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:9314: checking if you want experimental reentrant code" >&5
++echo "$as_me:9826: checking if you want experimental reentrant code" >&5
+ echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
+ 
+ # Check whether --enable-reentrant or --disable-reentrant was given.
+@@ -9321,7 +9833,7 @@ if test "${enable_reentrant+set}" = set; then
+ else
+   with_reentrant=$assume_reentrant
+ fi;
+-echo "$as_me:9324: result: $with_reentrant" >&5
++echo "$as_me:9836: result: $with_reentrant" >&5
+ echo "${ECHO_T}$with_reentrant" >&6
+ if test "$with_reentrant" = yes ; then
+ 	cf_cv_enable_reentrant=1
+@@ -9333,7 +9845,8 @@ LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
+ 	elif test "$assume_reentrant" = no ; then
+ 		LIB_SUFFIX="t${LIB_SUFFIX}"
+ 	fi
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define USE_REENTRANT 1
+ EOF
+ 
+@@ -9343,7 +9856,7 @@ fi
+ 
+ ### Allow using a different wrap-prefix
+ if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
+-	echo "$as_me:9346: checking for prefix used to wrap public variables" >&5
++	echo "$as_me:9859: 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.
+@@ -9353,7 +9866,7 @@ if test "${with_wrap_prefix+set}" = set; then
+ else
+   NCURSES_WRAP_PREFIX=_nc_
+ fi;
+-	echo "$as_me:9356: result: $NCURSES_WRAP_PREFIX" >&5
++	echo "$as_me:9869: result: $NCURSES_WRAP_PREFIX" >&5
+ echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
+ else
+ 	NCURSES_WRAP_PREFIX=_nc_
+@@ -9366,26 +9879,46 @@ EOF
+ ###############################################################################
+ 
+ ###	use option --disable-echo to suppress full display compiling commands
+-echo "$as_me:9369: checking if you want to display full commands during build" >&5
+-echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
++
++echo "$as_me:9883: 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.
+ if test "${enable_echo+set}" = set; then
+   enableval="$enable_echo"
+-  with_echo=$enableval
++  test "$enableval" != no && enableval=yes
++  if test "$enableval" != "yes" ; then
++
++    ECHO_LT='--silent'
++    ECHO_LD='@echo linking $@;'
++    RULE_CC='@echo compiling $<'
++    SHOW_CC='@echo compiling $@'
++    ECHO_CC='@'
++
++  else
++
++    ECHO_LT=''
++    ECHO_LD=''
++    RULE_CC=''
++    SHOW_CC=''
++    ECHO_CC=''
++
++  fi
+ else
+-  with_echo=yes
++  enableval=yes
++
++    ECHO_LT=''
++    ECHO_LD=''
++    RULE_CC=''
++    SHOW_CC=''
++    ECHO_CC=''
++
+ fi;
+-if test "$with_echo" = yes; then
+-	ECHO_LINK=
+-else
+-	ECHO_LINK='@ echo linking $@ ... ;'
+-fi
+-echo "$as_me:9384: result: $with_echo" >&5
+-echo "${ECHO_T}$with_echo" >&6
++echo "$as_me:9917: result: $enableval" >&5
++echo "${ECHO_T}$enableval" >&6
+ 
+ ###	use option --enable-warnings to turn on all gcc warnings
+-echo "$as_me:9388: checking if you want to see compiler warnings" >&5
++echo "$as_me:9921: checking if you want to see compiler warnings" >&5
+ echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
+ 
+ # Check whether --enable-warnings or --disable-warnings was given.
+@@ -9393,7 +9926,7 @@ if test "${enable_warnings+set}" = set; then
+   enableval="$enable_warnings"
+   with_warnings=$enableval
+ fi;
+-echo "$as_me:9396: result: $with_warnings" >&5
++echo "$as_me:9929: result: $with_warnings" >&5
+ echo "${ECHO_T}$with_warnings" >&6
+ 
+ if test "x$with_warnings" = "xyes"; then
+@@ -9405,12 +9938,12 @@ INTEL_COMPILER=no
+ if test "$GCC" = yes ; then
+ 	case $host_os in
+ 	linux*|gnu*)
+-		echo "$as_me:9408: checking if this is really Intel C compiler" >&5
++		echo "$as_me:9941: 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 9413 "configure"
++#line 9946 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -9427,16 +9960,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:9430: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:9963: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:9433: \$? = $ac_status" >&5
++  echo "$as_me:9966: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:9436: \"$ac_try\"") >&5
++  { (eval echo "$as_me:9969: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9439: \$? = $ac_status" >&5
++  echo "$as_me:9972: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   INTEL_COMPILER=yes
+ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+@@ -9447,14 +9980,63 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 		CFLAGS="$cf_save_CFLAGS"
+-		echo "$as_me:9450: result: $INTEL_COMPILER" >&5
++		echo "$as_me:9983: result: $INTEL_COMPILER" >&5
+ echo "${ECHO_T}$INTEL_COMPILER" >&6
+ 		;;
+ 	esac
+ fi
+ 
++CLANG_COMPILER=no
++
++if test "$GCC" = yes ; then
++	echo "$as_me:9992: 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"
++	CFLAGS="$CFLAGS -Qunused-arguments"
++	cat >conftest.$ac_ext <<_ACEOF
++#line 9997 "configure"
++#include "confdefs.h"
++
++int
++main ()
++{
++
++#ifdef __clang__
++#else
++make an error
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:10014: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:10017: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:10020: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:10023: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  CLANG_COMPILER=yes
++cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
++
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	CFLAGS="$cf_save_CFLAGS"
++	echo "$as_me:10034: result: $CLANG_COMPILER" >&5
++echo "${ECHO_T}$CLANG_COMPILER" >&6
++fi
++
+ cat > conftest.$ac_ext <<EOF
+-#line 9457 "${as_me:-configure}"
++#line 10039 "${as_me:-configure}"
+ int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+ EOF
+ 
+@@ -9471,7 +10053,7 @@ then
+ # remark #981: operands are evaluated in unspecified order
+ # warning #279: controlling expression is constant
+ 
+-	{ echo "$as_me:9474: checking for $CC warning options..." >&5
++	{ echo "$as_me:10056: checking for $CC warning options..." >&5
+ echo "$as_me: checking for $CC warning options..." >&6;}
+ 	cf_save_CFLAGS="$CFLAGS"
+ 	EXTRA_CFLAGS="-Wall"
+@@ -9487,12 +10069,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:9490: \"$ac_compile\"") >&5
++		if { (eval echo "$as_me:10072: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:9493: \$? = $ac_status" >&5
++  echo "$as_me:10075: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+-			test -n "$verbose" && echo "$as_me:9495: result: ... -$cf_opt" >&5
++			test -n "$verbose" && echo "$as_me:10077: result: ... -$cf_opt" >&5
+ echo "${ECHO_T}... -$cf_opt" >&6
+ 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ 		fi
+@@ -9501,7 +10083,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
+ 
+ elif test "$GCC" = yes
+ then
+-	{ echo "$as_me:9504: checking for $CC warning options..." >&5
++	{ echo "$as_me:10086: checking for $CC warning options..." >&5
+ echo "$as_me: checking for $CC warning options..." >&6;}
+ 	cf_save_CFLAGS="$CFLAGS"
+ 	EXTRA_CFLAGS=
+@@ -9521,12 +10103,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
+ 		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
+ 	do
+ 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+-		if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
++		if { (eval echo "$as_me:10106: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:9527: \$? = $ac_status" >&5
++  echo "$as_me:10109: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+-			test -n "$verbose" && echo "$as_me:9529: result: ... -$cf_opt" >&5
++			test -n "$verbose" && echo "$as_me:10111: result: ... -$cf_opt" >&5
+ echo "${ECHO_T}... -$cf_opt" >&6
+ 			case $cf_opt in #(vi
+ 			Wcast-qual) #(vi
+@@ -9537,7 +10119,17 @@ echo "${ECHO_T}... -$cf_opt" >&6
+ 				[34].*)
+ 					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
+ 
+-echo "${as_me:-configure}:9540: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
++echo "${as_me:-configure}:10122: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
++
++					continue;;
++				esac
++				;;
++			Wpointer-arith) #(vi
++				case $GCC_VERSION in
++				[12].*)
++					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
++
++echo "${as_me:-configure}:10132: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+ 
+ 					continue;;
+ 				esac
+@@ -9570,10 +10162,10 @@ cat > conftest.i <<EOF
+ EOF
+ if test "$GCC" = yes
+ then
+-	{ echo "$as_me:9573: checking for $CC __attribute__ directives..." >&5
++	{ echo "$as_me:10165: checking for $CC __attribute__ directives..." >&5
+ echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
+ cat > conftest.$ac_ext <<EOF
+-#line 9576 "${as_me:-configure}"
++#line 10168 "${as_me:-configure}"
+ #include "confdefs.h"
+ #include "conftest.h"
+ #include "conftest.i"
+@@ -9622,36 +10214,60 @@ EOF
+ 			;;
+ 		esac
+ 
+-		if { (eval echo "$as_me:9625: \"$ac_compile\"") >&5
++		if { (eval echo "$as_me:10217: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:9628: \$? = $ac_status" >&5
++  echo "$as_me:10220: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+-			test -n "$verbose" && echo "$as_me:9630: result: ... $cf_attribute" >&5
++			test -n "$verbose" && echo "$as_me:10222: result: ... $cf_attribute" >&5
+ echo "${ECHO_T}... $cf_attribute" >&6
+ 			cat conftest.h >>confdefs.h
+ 			case $cf_attribute in #(vi
+-			printf) #(vi
+-				if test "$cf_printf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
++			noreturn) #(vi
++
++cat >>confdefs.h <<EOF
++#define GCC_NORETURN $cf_directive
+ EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
++
++				;;
++			printf) #(vi
++				cf_value='/* nothing */'
++				if test "$cf_printf_attribute" != no ; then
++					cf_value='__attribute__((format(printf,fmt,var)))'
++
++cat >>confdefs.h <<\EOF
++#define GCC_PRINTF 1
+ EOF
++
+ 				fi
++
++cat >>confdefs.h <<EOF
++#define GCC_PRINTFLIKE(fmt,var) $cf_value
++EOF
++
+ 				;;
+ 			scanf) #(vi
+-				if test "$cf_scanf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var) /* nothing */
+-EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
++				cf_value='/* nothing */'
++				if test "$cf_scanf_attribute" != no ; then
++					cf_value='__attribute__((format(scanf,fmt,var)))'
++
++cat >>confdefs.h <<\EOF
++#define GCC_SCANF 1
+ EOF
++
+ 				fi
++
++cat >>confdefs.h <<EOF
++#define GCC_SCANFLIKE(fmt,var) $cf_value
++EOF
++
++				;;
++			unused) #(vi
++
++cat >>confdefs.h <<EOF
++#define GCC_UNUSED $cf_directive
++EOF
++
+ 				;;
+ 			esac
+ 		fi
+@@ -9663,7 +10279,7 @@ rm -rf conftest*
+ fi
+ 
+ ###	use option --enable-assertions to turn on generation of assertion code
+-echo "$as_me:9666: checking if you want to enable runtime assertions" >&5
++echo "$as_me:10282: 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.
+@@ -9673,16 +10289,12 @@ if test "${enable_assertions+set}" = set; then
+ else
+   with_assertions=no
+ fi;
+-echo "$as_me:9676: result: $with_assertions" >&5
++echo "$as_me:10292: result: $with_assertions" >&5
+ echo "${ECHO_T}$with_assertions" >&6
+ if test -n "$GCC"
+ then
+ 	if test "$with_assertions" = no
+ 	then
+-		cat >>confdefs.h <<\EOF
+-#define NDEBUG 1
+-EOF
+-
+ 		CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ 	else
+ 
+@@ -9692,6 +10304,7 @@ EOF
+ fi
+ 
+ ###	use option --disable-leaks to suppress "permanent" leaks, for testing
++
+ cat >>confdefs.h <<\EOF
+ #define HAVE_NC_ALLOC_H 1
+ EOF
+@@ -9701,7 +10314,8 @@ EOF
+ # Check whether --enable-expanded or --disable-expanded was given.
+ if test "${enable_expanded+set}" = set; then
+   enableval="$enable_expanded"
+-  test "$enableval" = yes && cat >>confdefs.h <<\EOF
++  test "$enableval" = yes &&
++cat >>confdefs.h <<\EOF
+ #define NCURSES_EXPANDED 1
+ EOF
+ 
+@@ -9712,7 +10326,8 @@ fi;
+ # Check whether --enable-macros or --disable-macros was given.
+ if test "${enable_macros+set}" = set; then
+   enableval="$enable_macros"
+-  test "$enableval" = no && cat >>confdefs.h <<\EOF
++  test "$enableval" = no &&
++cat >>confdefs.h <<\EOF
+ #define NCURSES_NOMACROS 1
+ EOF
+ 
+@@ -9727,7 +10342,7 @@ case "$CFLAGS $CPPFLAGS" in
+ 	;;
+ esac
+ 
+-echo "$as_me:9730: checking whether to add trace feature to all models" >&5
++echo "$as_me:10345: 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.
+@@ -9737,7 +10352,7 @@ if test "${with_trace+set}" = set; then
+ else
+   cf_with_trace=$cf_all_traces
+ fi;
+-echo "$as_me:9740: result: $cf_with_trace" >&5
++echo "$as_me:10355: result: $cf_with_trace" >&5
+ echo "${ECHO_T}$cf_with_trace" >&6
+ 
+ if test "$cf_with_trace" = yes ; then
+@@ -9830,13 +10445,13 @@ case $cf_cv_system_name in #(vi
+ *mingw32*) #(vi
+ 	;;
+ *)
+-echo "$as_me:9833: checking for gettimeofday" >&5
++echo "$as_me:10448: 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 9839 "configure"
++#line 10454 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char gettimeofday (); below.  */
+@@ -9859,7 +10474,7 @@ main ()
+ #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
+ choke me
+ #else
+-f = gettimeofday;
++f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -9867,16 +10482,16 @@ f = gettimeofday;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:9870: \"$ac_link\"") >&5
++if { (eval echo "$as_me:10485: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:9873: \$? = $ac_status" >&5
++  echo "$as_me:10488: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:9876: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10491: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9879: \$? = $ac_status" >&5
++  echo "$as_me:10494: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func_gettimeofday=yes
+ else
+@@ -9886,7 +10501,7 @@ ac_cv_func_gettimeofday=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:9889: result: $ac_cv_func_gettimeofday" >&5
++echo "$as_me:10504: 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
+@@ -9895,7 +10510,7 @@ EOF
+ 
+ else
+ 
+-echo "$as_me:9898: checking for gettimeofday in -lbsd" >&5
++echo "$as_me:10513: 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
+@@ -9903,7 +10518,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lbsd  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 9906 "configure"
++#line 10521 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -9922,16 +10537,16 @@ gettimeofday ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:9925: \"$ac_link\"") >&5
++if { (eval echo "$as_me:10540: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:9928: \$? = $ac_status" >&5
++  echo "$as_me:10543: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:9931: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10546: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:9934: \$? = $ac_status" >&5
++  echo "$as_me:10549: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_bsd_gettimeofday=yes
+ else
+@@ -9942,10 +10557,11 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:9945: result: $ac_cv_lib_bsd_gettimeofday" >&5
++echo "$as_me:10560: 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
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_GETTIMEOFDAY 1
+ EOF
+ 
+@@ -9957,13 +10573,13 @@ fi
+ esac
+ 
+ ###	Checks for header files.
+-echo "$as_me:9960: checking for ANSI C header files" >&5
++echo "$as_me:10576: 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 9966 "configure"
++#line 10582 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -9971,13 +10587,13 @@ else
+ #include <float.h>
+ 
+ _ACEOF
+-if { (eval echo "$as_me:9974: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:10590: \"$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:9980: \$? = $ac_status" >&5
++  echo "$as_me:10596: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -9999,7 +10615,7 @@ 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 10002 "configure"
++#line 10618 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+ 
+@@ -10017,7 +10633,7 @@ 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 10020 "configure"
++#line 10636 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ 
+@@ -10038,7 +10654,7 @@ if test $ac_cv_header_stdc = yes; then
+   :
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 10041 "configure"
++#line 10657 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #if ((' ' & 0x0FF) == 0x020)
+@@ -10064,15 +10680,15 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:10067: \"$ac_link\"") >&5
++if { (eval echo "$as_me:10683: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10070: \$? = $ac_status" >&5
++  echo "$as_me:10686: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:10072: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10688: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10075: \$? = $ac_status" >&5
++  echo "$as_me:10691: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -10085,7 +10701,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ fi
+-echo "$as_me:10088: result: $ac_cv_header_stdc" >&5
++echo "$as_me:10704: result: $ac_cv_header_stdc" >&5
+ echo "${ECHO_T}$ac_cv_header_stdc" >&6
+ if test $ac_cv_header_stdc = yes; then
+ 
+@@ -10098,13 +10714,13 @@ 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:10101: checking for $ac_hdr that defines DIR" >&5
++echo "$as_me:10717: 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 10107 "configure"
++#line 10723 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <$ac_hdr>
+@@ -10119,16 +10735,16 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:10122: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:10125: \$? = $ac_status" >&5
++  echo "$as_me:10741: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:10128: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10744: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10131: \$? = $ac_status" >&5
++  echo "$as_me:10747: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   eval "$as_ac_Header=yes"
+ else
+@@ -10138,7 +10754,7 @@ eval "$as_ac_Header=no"
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:10141: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:10757: 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
+@@ -10151,7 +10767,7 @@ 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:10154: checking for opendir in -ldir" >&5
++  echo "$as_me:10770: 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
+@@ -10159,7 +10775,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldir  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 10162 "configure"
++#line 10778 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -10178,16 +10794,16 @@ opendir ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:10181: \"$ac_link\"") >&5
++if { (eval echo "$as_me:10797: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10184: \$? = $ac_status" >&5
++  echo "$as_me:10800: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:10187: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10803: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10190: \$? = $ac_status" >&5
++  echo "$as_me:10806: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_dir_opendir=yes
+ else
+@@ -10198,14 +10814,14 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:10201: result: $ac_cv_lib_dir_opendir" >&5
++echo "$as_me:10817: 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:10208: checking for opendir in -lx" >&5
++  echo "$as_me:10824: 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
+@@ -10213,7 +10829,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lx  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 10216 "configure"
++#line 10832 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -10232,16 +10848,16 @@ opendir ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:10235: \"$ac_link\"") >&5
++if { (eval echo "$as_me:10851: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10238: \$? = $ac_status" >&5
++  echo "$as_me:10854: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:10241: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10857: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10244: \$? = $ac_status" >&5
++  echo "$as_me:10860: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_x_opendir=yes
+ else
+@@ -10252,7 +10868,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:10255: result: $ac_cv_lib_x_opendir" >&5
++echo "$as_me:10871: 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"
+@@ -10260,13 +10876,13 @@ fi
+ 
+ fi
+ 
+-echo "$as_me:10263: checking whether time.h and sys/time.h may both be included" >&5
++echo "$as_me:10879: 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 10269 "configure"
++#line 10885 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/time.h>
+@@ -10282,16 +10898,16 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:10901: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:10288: \$? = $ac_status" >&5
++  echo "$as_me:10904: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:10291: \"$ac_try\"") >&5
++  { (eval echo "$as_me:10907: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10294: \$? = $ac_status" >&5
++  echo "$as_me:10910: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_header_time=yes
+ else
+@@ -10301,7 +10917,7 @@ ac_cv_header_time=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:10304: result: $ac_cv_header_time" >&5
++echo "$as_me:10920: result: $ac_cv_header_time" >&5
+ echo "${ECHO_T}$ac_cv_header_time" >&6
+ if test $ac_cv_header_time = yes; then
+ 
+@@ -10319,104 +10935,13 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_main_return=return
+ 
+-echo "$as_me:10322: 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
+-else
+-  ac_cv_prog_cc_stdc=no
+-ac_save_CC=$CC
+-cat >conftest.$ac_ext <<_ACEOF
+-#line 10330 "configure"
+-#include "confdefs.h"
+-#include <stdarg.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-/* 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;
+-{
+-  return p[i];
+-}
+-static char *f (char * (*g) (char **, int), char **p, ...)
+-{
+-  char *s;
+-  va_list v;
+-  va_start (v,p);
+-  s = g (p, va_arg (v,int));
+-  va_end (v);
+-  return s;
+-}
+-int test (int i, double x);
+-struct s1 {int (*f) (int a);};
+-struct s2 {int (*f) (double a);};
+-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+-int argc;
+-char **argv;
+-int
+-main ()
+-{
+-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX 10.20 and later	-Ae
+-# HP-UX older versions	-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+-do
+-  CC="$ac_save_CC $ac_arg"
+-  rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:10379: \"$ac_compile\"") >&5
+-  (eval $ac_compile) 2>&5
+-  ac_status=$?
+-  echo "$as_me:10382: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-         { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:10385: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:10388: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_prog_cc_stdc=$ac_arg
+-break
+-else
+-  echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest.$ac_objext
+-done
+-rm -f conftest.$ac_ext conftest.$ac_objext
+-CC=$ac_save_CC
+-
+-fi
+-
+-case "x$ac_cv_prog_cc_stdc" in
+-  x|xno)
+-    echo "$as_me:10405: result: none needed" >&5
+-echo "${ECHO_T}none needed" >&6 ;;
+-  *)
+-    echo "$as_me:10408: result: $ac_cv_prog_cc_stdc" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+-esac
+-
+-echo "$as_me:10413: checking for an ANSI C-conforming const" >&5
++echo "$as_me:10938: 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 10419 "configure"
++#line 10944 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -10474,16 +10999,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:11002: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:10480: \$? = $ac_status" >&5
++  echo "$as_me:11005: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:10483: \"$ac_try\"") >&5
++  { (eval echo "$as_me:11008: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10486: \$? = $ac_status" >&5
++  echo "$as_me:11011: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_c_const=yes
+ else
+@@ -10493,7 +11018,7 @@ ac_cv_c_const=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:10496: result: $ac_cv_c_const" >&5
++echo "$as_me:11021: result: $ac_cv_c_const" >&5
+ echo "${ECHO_T}$ac_cv_c_const" >&6
+ if test $ac_cv_c_const = no; then
+ 
+@@ -10505,7 +11030,7 @@ fi
+ 
+ ###	Checks for external-data
+ 
+-echo "$as_me:10508: checking if data-only library module links" >&5
++echo "$as_me:11033: 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
+@@ -10513,20 +11038,20 @@ else
+ 
+ 	rm -f conftest.a
+ 	cat >conftest.$ac_ext <<EOF
+-#line 10516 "configure"
++#line 11041 "configure"
+ int	testdata[3] = { 123, 456, 789 };
+ EOF
+-	if { (eval echo "$as_me:10519: \"$ac_compile\"") >&5
++	if { (eval echo "$as_me:11044: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:10522: \$? = $ac_status" >&5
++  echo "$as_me:11047: \$? = $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 10529 "configure"
++#line 11054 "configure"
+ int	testfunc()
+ {
+ #if defined(NeXT)
+@@ -10539,10 +11064,10 @@ int	testfunc()
+ #endif
+ }
+ EOF
+-	if { (eval echo "$as_me:10542: \"$ac_compile\"") >&5
++	if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:10545: \$? = $ac_status" >&5
++  echo "$as_me:11070: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+ 		mv conftest.o func.o && \
+ 		( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
+@@ -10555,7 +11080,7 @@ EOF
+   cf_cv_link_dataonly=unknown
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 10558 "configure"
++#line 11083 "configure"
+ #include "confdefs.h"
+ 
+ 	int main()
+@@ -10566,15 +11091,15 @@ else
+ 
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:10569: \"$ac_link\"") >&5
++if { (eval echo "$as_me:11094: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10572: \$? = $ac_status" >&5
++  echo "$as_me:11097: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:10574: \"$ac_try\"") >&5
++  { (eval echo "$as_me:11099: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10577: \$? = $ac_status" >&5
++  echo "$as_me:11102: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_link_dataonly=yes
+ else
+@@ -10589,11 +11114,12 @@ fi
+ 
+ fi
+ 
+-echo "$as_me:10592: result: $cf_cv_link_dataonly" >&5
++echo "$as_me:11117: 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
++
++cat >>confdefs.h <<\EOF
+ #define BROKEN_LINKER 1
+ EOF
+ 
+@@ -10602,7 +11128,7 @@ fi
+ 
+ ###	Checks for library functions.
+ 
+-echo "$as_me:10605: checking for working mkstemp" >&5
++echo "$as_me:11131: 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
+@@ -10610,68 +11136,10 @@ else
+ 
+ rm -rf conftest*
+ if test "$cross_compiling" = yes; then
+-  echo "$as_me:10613: 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 10619 "configure"
+-#include "confdefs.h"
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char mkstemp (); below.  */
+-#include <assert.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 mkstemp ();
+-char (*f) ();
+-
+-int
+-main ()
+-{
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
+-choke me
+-#else
+-f = mkstemp;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:10650: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>&5
+-  ac_status=$?
+-  echo "$as_me:10653: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-         { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:10656: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:10659: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_mkstemp=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-ac_cv_func_mkstemp=no
+-fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:10669: result: $ac_cv_func_mkstemp" >&5
+-echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
+-
++  cf_cv_func_mkstemp=maybe
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 10674 "configure"
++#line 11142 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/types.h>
+@@ -10709,15 +11177,15 @@ int main()
+ 
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:10712: \"$ac_link\"") >&5
++if { (eval echo "$as_me:11180: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10715: \$? = $ac_status" >&5
++  echo "$as_me:11183: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:10717: \"$ac_try\"") >&5
++  { (eval echo "$as_me:11185: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10720: \$? = $ac_status" >&5
++  echo "$as_me:11188: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_func_mkstemp=yes
+ 
+@@ -10732,80 +11200,89 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ 
+ fi
+-echo "$as_me:10735: result: $cf_cv_func_mkstemp" >&5
++echo "$as_me:11203: result: $cf_cv_func_mkstemp" >&5
+ echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
+-if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+-	cat >>confdefs.h <<\EOF
+-#define HAVE_MKSTEMP 1
+-EOF
+-
+-fi
+-
+-echo "$as_me:10744: checking return type of signal handlers" >&5
+-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+-if test "${ac_cv_type_signal+set}" = set; then
++if test "x$cf_cv_func_mkstemp" = xmaybe ; then
++	echo "$as_me:11206: 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 10750 "configure"
++#line 11212 "configure"
+ #include "confdefs.h"
+-#include <sys/types.h>
+-#include <signal.h>
+-#ifdef signal
+-# undef signal
+-#endif
++/* System header to define __stub macros and hopefully few prototypes,
++    which can conflict with char mkstemp (); below.  */
++#include <assert.h>
++/* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+-extern "C" void (*signal (int, void (*)(int)))(int);
+-#else
+-void (*signal ()) ();
++extern "C"
+ #endif
++/* We use char because int might match the return type of a gcc2
++   builtin and then its argument prototype would still apply.  */
++char mkstemp ();
++char (*f) ();
+ 
+ int
+ main ()
+ {
+-int i;
++/* The GNU C library defines this for functions which it implements
++    to always fail with ENOSYS.  Some functions are actually named
++    something starting with __ and the normal name is an alias.  */
++#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
++choke me
++#else
++f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
++#endif
++
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5
+-  (eval $ac_compile) 2>&5
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:11243: \"$ac_link\"") >&5
++  (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:10775: \$? = $ac_status" >&5
++  echo "$as_me:11246: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-         { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:10778: \"$ac_try\"") >&5
++         { ac_try='test -s conftest$ac_exeext'
++  { (eval echo "$as_me:11249: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:10781: \$? = $ac_status" >&5
++  echo "$as_me:11252: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_type_signal=void
++  ac_cv_func_mkstemp=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_cv_type_signal=int
++ac_cv_func_mkstemp=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:10791: result: $ac_cv_type_signal" >&5
+-echo "${ECHO_T}$ac_cv_type_signal" >&6
++echo "$as_me:11262: result: $ac_cv_func_mkstemp" >&5
++echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
+ 
+-cat >>confdefs.h <<EOF
+-#define RETSIGTYPE $ac_cv_type_signal
++fi
++if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
++
++cat >>confdefs.h <<\EOF
++#define HAVE_MKSTEMP 1
+ EOF
+ 
++fi
++
+ if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
+ 	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
+ 	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
+ fi
+ 
++cf_with_ada=yes
+ if test "$cf_with_ada" != "no" ; then
+ 
+ cf_ada_make=gnatmake
+ # Extract the first word of "$cf_ada_make", so it can be a program name with args.
+ set dummy $cf_ada_make; ac_word=$2
+-echo "$as_me:10808: checking for $ac_word" >&5
++echo "$as_me:11285: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+ if test "${ac_cv_prog_gnat_exists+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -10820,7 +11297,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_gnat_exists="yes"
+-echo "$as_me:10823: found $ac_dir/$ac_word" >&5
++echo "$as_me:11300: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -10829,31 +11306,32 @@ fi
+ fi
+ gnat_exists=$ac_cv_prog_gnat_exists
+ if test -n "$gnat_exists"; then
+-  echo "$as_me:10832: result: $gnat_exists" >&5
++  echo "$as_me:11309: result: $gnat_exists" >&5
+ echo "${ECHO_T}$gnat_exists" >&6
+ else
+-  echo "$as_me:10835: result: no" >&5
++  echo "$as_me:11312: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+ if test "$ac_cv_prog_gnat_exists" = no; then
+    cf_ada_make=
++   cf_cv_prog_gnat_correct=no
+ else
+ 
+-echo "$as_me:10843: checking for gnat version" >&5
++echo "$as_me:11321: checking for gnat version" >&5
+ echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
+ cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
+ 	grep '[0-9].[0-9][0-9]*' |\
+     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
+-echo "$as_me:10848: result: $cf_gnat_version" >&5
++echo "$as_me:11326: result: $cf_gnat_version" >&5
+ echo "${ECHO_T}$cf_gnat_version" >&6
+ 
+ case $cf_gnat_version in #(vi
+-3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
++3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
+ 	cf_cv_prog_gnat_correct=yes
+ 	;;
+ *)
+-	{ echo "$as_me:10856: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
++	{ echo "$as_me:11334: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
+ echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
+ 	cf_cv_prog_gnat_correct=no
+ 	;;
+@@ -10861,7 +11339,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:10864: checking for $ac_word" >&5
++echo "$as_me:11342: 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
+@@ -10876,7 +11354,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:10879: found $ac_dir/$ac_word" >&5
++echo "$as_me:11357: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -10885,10 +11363,10 @@ fi
+ fi
+ M4_exists=$ac_cv_prog_M4_exists
+ if test -n "$M4_exists"; then
+-  echo "$as_me:10888: result: $M4_exists" >&5
++  echo "$as_me:11366: result: $M4_exists" >&5
+ echo "${ECHO_T}$M4_exists" >&6
+ else
+-  echo "$as_me:10891: result: no" >&5
++  echo "$as_me:11369: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -10897,7 +11375,7 @@ fi
+       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
+    fi
+    if test "$cf_cv_prog_gnat_correct" = yes; then
+-      echo "$as_me:10900: checking if GNAT works" >&5
++      echo "$as_me:11378: checking if GNAT works" >&5
+ echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
+ 
+ rm -rf conftest* *~conftest*
+@@ -10925,30 +11403,34 @@ else
+ fi
+ rm -rf conftest* *~conftest*
+ 
+-      echo "$as_me:10928: result: $cf_cv_prog_gnat_correct" >&5
++      echo "$as_me:11406: result: $cf_cv_prog_gnat_correct" >&5
+ echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
+    fi
+ fi
+ 
+ 	if test	"$cf_cv_prog_gnat_correct" = yes; then
+ 
+-		# make ADAFLAGS consistent with CFLAGS
+-		case "$CFLAGS" in
+-		*-g*)
++	echo "$as_me:11413: checking optimization options for ADAFLAGS" >&5
++echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
++	case "$CFLAGS" in
++	*-g*)
+ 
+  	ADAFLAGS="$ADAFLAGS -g"
+ 
+-			;;
+-		esac
+-		case "$CFLAGS" in
+-		*-O*)
++		;;
++	esac
++	case "$CFLAGS" in
++	*-O*)
++		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ 	].*//'`
+ 
+- 	ADAFLAGS="$ADAFLAGS -O3"
++ 	ADAFLAGS="$ADAFLAGS $cf_O_flag"
+ 
+-			;;
+-		esac
++		;;
++	esac
++	echo "$as_me:11430: result: $ADAFLAGS" >&5
++echo "${ECHO_T}$ADAFLAGS" >&6
+ 
+-echo "$as_me:10951: checking if GNAT supports generics" >&5
++echo "$as_me:11433: checking if GNAT supports generics" >&5
+ echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
+ case $cf_gnat_version in #(vi
+ 3.[1-9]*|[4-9].*) #(vi
+@@ -10958,7 +11440,7 @@ case $cf_gnat_version in #(vi
+ 	cf_gnat_generics=no
+ 	;;
+ esac
+-echo "$as_me:10961: result: $cf_gnat_generics" >&5
++echo "$as_me:11443: result: $cf_gnat_generics" >&5
+ echo "${ECHO_T}$cf_gnat_generics" >&6
+ 
+ if test "$cf_gnat_generics" = yes
+@@ -10970,7 +11452,7 @@ else
+ 	cf_generic_objects=
+ fi
+ 
+-echo "$as_me:10973: checking if GNAT supports SIGINT" >&5
++echo "$as_me:11455: 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
+@@ -11018,7 +11500,7 @@ fi
+ rm -rf conftest* *~conftest*
+ 
+ fi
+-echo "$as_me:11021: result: $cf_cv_gnat_sigint" >&5
++echo "$as_me:11503: result: $cf_cv_gnat_sigint" >&5
+ echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
+ 
+ if test $cf_cv_gnat_sigint = yes ; then
+@@ -11027,7 +11509,7 @@ else
+ 	USE_GNAT_SIGINT="#"
+ fi
+ 
+-echo "$as_me:11030: checking if GNAT pragma Unreferenced works" >&5
++echo "$as_me:11512: checking if GNAT pragma Unreferenced works" >&5
+ echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
+ if test "${cf_cv_pragma_unreferenced+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -11058,7 +11540,7 @@ fi
+ rm -rf conftest* *~conftest*
+ 
+ fi
+-echo "$as_me:11061: result: $cf_cv_pragma_unreferenced" >&5
++echo "$as_me:11543: result: $cf_cv_pragma_unreferenced" >&5
+ echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
+ 
+ # if the pragma is supported, use it (needed in the Trace code).
+@@ -11071,7 +11553,7 @@ fi
+ cf_gnat_libraries=no
+ cf_gnat_projects=no
+ 
+-echo "$as_me:11074: checking if GNAT supports project files" >&5
++echo "$as_me:11556: checking if GNAT supports project files" >&5
+ echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
+ case $cf_gnat_version in #(vi
+ 3.[0-9]*) #(vi
+@@ -11139,14 +11621,14 @@ CF_EOF
+ 	esac
+ 	;;
+ esac
+-echo "$as_me:11142: result: $cf_gnat_projects" >&5
++echo "$as_me:11624: result: $cf_gnat_projects" >&5
+ echo "${ECHO_T}$cf_gnat_projects" >&6
+ 
+ if test $cf_gnat_projects = yes
+ then
+-	echo "$as_me:11147: checking if GNAT supports libraries" >&5
++	echo "$as_me:11629: checking if GNAT supports libraries" >&5
+ echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
+-	echo "$as_me:11149: result: $cf_gnat_libraries" >&5
++	echo "$as_me:11631: result: $cf_gnat_libraries" >&5
+ echo "${ECHO_T}$cf_gnat_libraries" >&6
+ fi
+ 
+@@ -11166,7 +11648,7 @@ else
+ 	USE_GNAT_LIBRARIES="#"
+ fi
+ 
+-echo "$as_me:11169: checking for ada-compiler" >&5
++echo "$as_me:11651: checking for ada-compiler" >&5
+ echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
+ 
+ # Check whether --with-ada-compiler or --without-ada-compiler was given.
+@@ -11177,12 +11659,12 @@ else
+   cf_ada_compiler=gnatmake
+ fi;
+ 
+-echo "$as_me:11180: result: $cf_ada_compiler" >&5
++echo "$as_me:11662: result: $cf_ada_compiler" >&5
+ echo "${ECHO_T}$cf_ada_compiler" >&6
+ 
+ 		cf_ada_package=terminal_interface
+ 
+-echo "$as_me:11185: checking for ada-include" >&5
++echo "$as_me:11667: checking for ada-include" >&5
+ echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
+ 
+ # Check whether --with-ada-include or --without-ada-include was given.
+@@ -11206,7 +11688,7 @@ case ".$withval" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval withval="$withval"
+   case ".$withval" in #(vi
+   .NONE/*)
+@@ -11218,19 +11700,19 @@ case ".$withval" in #(vi
+   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:11221: error: expected a pathname, not \"$withval\"" >&5
++  { { echo "$as_me:11703: error: expected a pathname, not \"$withval\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+ esac
+ 
+ fi
+-ADA_INCLUDE="$withval"
++eval ADA_INCLUDE="$withval"
+ 
+-echo "$as_me:11230: result: $ADA_INCLUDE" >&5
++echo "$as_me:11712: result: $ADA_INCLUDE" >&5
+ echo "${ECHO_T}$ADA_INCLUDE" >&6
+ 
+-echo "$as_me:11233: checking for ada-objects" >&5
++echo "$as_me:11715: checking for ada-objects" >&5
+ echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
+ 
+ # Check whether --with-ada-objects or --without-ada-objects was given.
+@@ -11254,7 +11736,7 @@ case ".$withval" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval withval="$withval"
+   case ".$withval" in #(vi
+   .NONE/*)
+@@ -11266,19 +11748,19 @@ case ".$withval" in #(vi
+   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:11269: error: expected a pathname, not \"$withval\"" >&5
++  { { echo "$as_me:11751: error: expected a pathname, not \"$withval\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+ esac
+ 
+ fi
+-ADA_OBJECTS="$withval"
++eval ADA_OBJECTS="$withval"
+ 
+-echo "$as_me:11278: result: $ADA_OBJECTS" >&5
++echo "$as_me:11760: result: $ADA_OBJECTS" >&5
+ echo "${ECHO_T}$ADA_OBJECTS" >&6
+ 
+-echo "$as_me:11281: checking if an Ada95 shared-library should be built" >&5
++echo "$as_me:11763: 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
+ 
+ # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
+@@ -11288,7 +11770,7 @@ if test "${with_ada_sharedlib+set}" = set; then
+ else
+   with_ada_sharedlib=no
+ fi;
+-echo "$as_me:11291: result: $with_ada_sharedlib" >&5
++echo "$as_me:11773: result: $with_ada_sharedlib" >&5
+ echo "${ECHO_T}$with_ada_sharedlib" >&6
+ 
+ ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
+@@ -11304,12 +11786,12 @@ then
+ fi
+ 
+ 	else
+-		{ { echo "$as_me:11307: error: No usable Ada compiler found" >&5
++		{ { echo "$as_me:11789: error: No usable Ada compiler found" >&5
+ echo "$as_me: error: No usable Ada compiler found" >&2;}
+    { (exit 1); exit 1; }; }
+ 	fi
+ else
+-	{ { echo "$as_me:11312: error: The Ada compiler is needed for this package" >&5
++	{ { echo "$as_me:11794: error: The Ada compiler is needed for this package" >&5
+ echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -11317,25 +11799,27 @@ fi
+ ################################################################################
+ 
+ # not needed
+-TINFO_ARGS2=
++TINFO_LDFLAGS2=
++
++TINFO_LIBS=
+ 
+ ### Construct the list of include-directories to be generated
+ 
+-CPPFLAGS="$CPPFLAGS -I. -I../include"
+-if test "$srcdir" != "."; then
+-	CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
+-fi
+ if test "$GCC" != yes; then
+-	CPPFLAGS="$CPPFLAGS -I\${includedir}"
++	CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ elif test "$includedir" != "/usr/include"; then
+ 	if test "$includedir" = '${prefix}/include' ; then
+ 		if test $prefix != /usr ; then
+-			CPPFLAGS="$CPPFLAGS -I\${includedir}"
++			CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 		fi
+ 	else
+-		CPPFLAGS="$CPPFLAGS -I\${includedir}"
++		CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 	fi
+ fi
++if test "$srcdir" != "."; then
++	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
++fi
++CPPFLAGS="-I. -I../include $CPPFLAGS"
+ 
+ ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
+ if test "$srcdir" != "."; then
+@@ -11354,7 +11838,7 @@ elif test "$includedir" != "/usr/include"; then
+ fi
+ 
+ ### Build up pieces for makefile rules
+-echo "$as_me:11357: checking default library suffix" >&5
++echo "$as_me:11841: checking default library suffix" >&5
+ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
+ 
+ 	case $DFT_LWR_MODEL in
+@@ -11365,10 +11849,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:11368: result: $DFT_ARG_SUFFIX" >&5
++echo "$as_me:11852: result: $DFT_ARG_SUFFIX" >&5
+ echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
+ 
+-echo "$as_me:11371: checking default library-dependency suffix" >&5
++echo "$as_me:11855: checking default library-dependency suffix" >&5
+ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
+ 
+ 	case $DFT_LWR_MODEL in #(vi
+@@ -11390,11 +11874,11 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
+ 		;;
+ 	shared) #(vi
+ 		case $cf_cv_system_name in
+-		aix[56]*) #(vi
++		aix[5-7]*) #(vi
+ 			DFT_LIB_SUFFIX='.a'
+ 			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ 			;;
+-		cygwin*) #(vi
++		cygwin*|mingw*) #(vi
+ 			DFT_LIB_SUFFIX='.dll'
+ 			DFT_DEP_SUFFIX='.dll.a'
+ 			;;
+@@ -11421,10 +11905,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
+ 	esac
+ 	test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
+ 	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
+-echo "$as_me:11424: result: $DFT_DEP_SUFFIX" >&5
++echo "$as_me:11908: result: $DFT_DEP_SUFFIX" >&5
+ echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
+ 
+-echo "$as_me:11427: checking default object directory" >&5
++echo "$as_me:11911: checking default object directory" >&5
+ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
+ 
+ 	case $DFT_LWR_MODEL in
+@@ -11440,7 +11924,7 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
+ 			DFT_OBJ_SUBDIR='obj_s' ;;
+ 		esac
+ 	esac
+-echo "$as_me:11443: result: $DFT_OBJ_SUBDIR" >&5
++echo "$as_me:11927: result: $DFT_OBJ_SUBDIR" >&5
+ echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
+ 
+ ### Set up low-level terminfo dependencies for makefiles.
+@@ -11656,7 +12140,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:11659: creating $CONFIG_STATUS" >&5
++{ echo "$as_me:12143: creating $CONFIG_STATUS" >&5
+ echo "$as_me: creating $CONFIG_STATUS" >&6;}
+ cat >$CONFIG_STATUS <<_ACEOF
+ #! $SHELL
+@@ -11788,7 +12272,7 @@ EOF
+ cat >>$CONFIG_STATUS <<EOF
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.52.20101002,
++configured by $0, generated by GNU Autoconf 2.52.20121002,
+   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+ 
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+@@ -11832,7 +12316,7 @@ cat >>$CONFIG_STATUS <<\EOF
+     echo "$ac_cs_version"; exit 0 ;;
+   --he | --h)
+     # Conflict between --help and --header
+-    { { echo "$as_me:11835: error: ambiguous option: $1
++    { { echo "$as_me:12319: 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;}
+@@ -11851,7 +12335,7 @@ Try \`$0 --help' for more information." >&2;}
+     ac_need_defaults=false;;
+ 
+   # This is an error.
+-  -*) { { echo "$as_me:11854: error: unrecognized option: $1
++  -*) { { echo "$as_me:12338: 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;}
+@@ -11870,7 +12354,7 @@ cat >&5 << _ACEOF
+ ## Running config.status.  ##
+ ## ----------------------- ##
+ 
+-This file was extended by $as_me 2.52.20101002, executed with
++This file was extended by $as_me 2.52.20121002, executed with
+   CONFIG_FILES    = $CONFIG_FILES
+   CONFIG_HEADERS  = $CONFIG_HEADERS
+   CONFIG_LINKS    = $CONFIG_LINKS
+@@ -11892,8 +12376,8 @@ cat >>$CONFIG_STATUS <<EOF
+ AWK="$AWK"
+ DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+ DFT_LWR_MODEL="$DFT_LWR_MODEL"
+-ECHO_LINK="$ECHO_LINK"
+ LIB_NAME="$LIB_NAME"
++LIB_PREFIX="$LIB_PREFIX"
+ LIB_SUFFIX="$LIB_SUFFIX"
+ LN_S="$LN_S"
+ NCURSES_MAJOR="$NCURSES_MAJOR"
+@@ -11922,7 +12406,7 @@ do
+   "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:11925: error: invalid argument: $ac_config_target" >&5
++  *) { { echo "$as_me:12409: error: invalid argument: $ac_config_target" >&5
+ echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+    { (exit 1); exit 1; }; };;
+   esac
+@@ -11981,6 +12465,7 @@ s, at program_transform_name@,$program_transform_name,;t t
+ s, at bindir@,$bindir,;t t
+ s, at sbindir@,$sbindir,;t t
+ s, at libexecdir@,$libexecdir,;t t
++s, at datarootdir@,$datarootdir,;t t
+ s, at datadir@,$datadir,;t t
+ s, at sysconfdir@,$sysconfdir,;t t
+ s, at sharedstatedir@,$sharedstatedir,;t t
+@@ -12024,9 +12509,8 @@ s, at CPPFLAGS@,$CPPFLAGS,;t t
+ s, at ac_ct_CC@,$ac_ct_CC,;t t
+ s, at EXEEXT@,$EXEEXT,;t t
+ s, at OBJEXT@,$OBJEXT,;t t
+-s, at CPP@,$CPP,;t t
+ s, at EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
+-s, at PROG_EXT@,$PROG_EXT,;t t
++s, at CPP@,$CPP,;t t
+ s, at AWK@,$AWK,;t t
+ s, at EGREP@,$EGREP,;t t
+ s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+@@ -12061,6 +12545,7 @@ s, at BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
+ s, at DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
+ s, at DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
+ s, at NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
++s, at ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
+ s, at NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
+ s, at NCURSES_MINOR@,$NCURSES_MINOR,;t t
+ s, at NCURSES_PATCH@,$NCURSES_PATCH,;t t
+@@ -12083,13 +12568,18 @@ s, at EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
+ s, at LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
+ s, at LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
+ s, at INSTALL_LIB@,$INSTALL_LIB,;t t
++s, at RPATH_LIST@,$RPATH_LIST,;t t
+ s, at BROKEN_LINKER@,$BROKEN_LINKER,;t t
+ s, at NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
+ s, at NCURSES_CONST@,$NCURSES_CONST,;t t
+ s, at PTHREAD@,$PTHREAD,;t t
+ s, at cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
+ s, at NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
+-s, at ECHO_LINK@,$ECHO_LINK,;t t
++s, at ECHO_LT@,$ECHO_LT,;t t
++s, at ECHO_LD@,$ECHO_LD,;t t
++s, at RULE_CC@,$RULE_CC,;t t
++s, at SHOW_CC@,$SHOW_CC,;t t
++s, at ECHO_CC@,$ECHO_CC,;t t
+ s, at ADAFLAGS@,$ADAFLAGS,;t t
+ s, at EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+ s, at ADA_TRACE@,$ADA_TRACE,;t t
+@@ -12109,7 +12599,8 @@ s, at ADA_INCLUDE@,$ADA_INCLUDE,;t t
+ s, at ADA_OBJECTS@,$ADA_OBJECTS,;t t
+ s, at ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
+ s, at MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
+-s, at TINFO_ARGS2@,$TINFO_ARGS2,;t t
++s, at TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
++s, at TINFO_LIBS@,$TINFO_LIBS,;t t
+ s, at ACPPFLAGS@,$ACPPFLAGS,;t t
+ s, at DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
+ s, at DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
+@@ -12237,7 +12728,7 @@ done; }
+   esac
+ 
+   if test x"$ac_file" != x-; then
+-    { echo "$as_me:12240: creating $ac_file" >&5
++    { echo "$as_me:12731: creating $ac_file" >&5
+ echo "$as_me: creating $ac_file" >&6;}
+     rm -f "$ac_file"
+   fi
+@@ -12255,7 +12746,7 @@ echo "$as_me: creating $ac_file" >&6;}
+       -) echo $tmp/stdin ;;
+       [\\/$]*)
+          # Absolute (can't be DOS-style, as IFS=:)
+-         test -f "$f" || { { echo "$as_me:12258: error: cannot find input file: $f" >&5
++         test -f "$f" || { { echo "$as_me:12749: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+    { (exit 1); exit 1; }; }
+          echo $f;;
+@@ -12268,13 +12759,45 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
+            echo $srcdir/$f
+          else
+            # /dev/null tree
+-           { { echo "$as_me:12271: error: cannot find input file: $f" >&5
++           { { echo "$as_me:12762: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+    { (exit 1); exit 1; }; }
+          fi;;
+       esac
+     done` || { (exit 1); exit 1; }
+ EOF
++cat >>$CONFIG_STATUS <<\EOF
++  ac_warn_datarootdir=no
++  if test x"$ac_file" != x-; then
++    for ac_item in $ac_file_inputs
++    do
++      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
++      if test -n "$ac_seen"; then
++        ac_used=`grep '@datarootdir@' $ac_item`
++        if test -z "$ac_used"; then
++          { echo "$as_me:12778: 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;}
++          ac_warn_datarootdir=yes
++        fi
++      fi
++      ac_seen=`grep '${datarootdir}' $ac_item`
++      if test -n "$ac_seen"; then
++        { echo "$as_me:12787: 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;}
++        ac_warn_datarootdir=yes
++      fi
++    done
++  fi
++
++if test "x$ac_warn_datarootdir" = xyes; then
++  ac_sed_cmds="$ac_sed_cmds | sed -e 's, at datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
++fi
++
++EOF
+ cat >>$CONFIG_STATUS <<EOF
+   sed "$ac_vpsub
+ $extrasub
+@@ -12289,11 +12812,35 @@ s, at INSTALL@,$ac_INSTALL,;t t
+ " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+   rm -f $tmp/stdin
+   if test x"$ac_file" != x-; then
+-    mv $tmp/out $ac_file
++    cp $tmp/out $ac_file
++
++    for ac_name in prefix exec_prefix datarootdir
++    do
++        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
++        if test -n "$ac_seen"; then
++            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:12824: 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 -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:12835: 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
+-    rm -f $tmp/out
+   fi
++  rm -f $tmp/out
+ 
+ done
+ EOF
+@@ -12334,7 +12881,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:12337: creating $ac_file" >&5
++  test x"$ac_file" != x- && { echo "$as_me:12884: creating $ac_file" >&5
+ echo "$as_me: creating $ac_file" >&6;}
+ 
+   # First look for the input files in the build tree, otherwise in the
+@@ -12345,7 +12892,7 @@ echo "$as_me: creating $ac_file" >&6;}
+       -) echo $tmp/stdin ;;
+       [\\/$]*)
+          # Absolute (can't be DOS-style, as IFS=:)
+-         test -f "$f" || { { echo "$as_me:12348: error: cannot find input file: $f" >&5
++         test -f "$f" || { { echo "$as_me:12895: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+    { (exit 1); exit 1; }; }
+          echo $f;;
+@@ -12358,7 +12905,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
+            echo $srcdir/$f
+          else
+            # /dev/null tree
+-           { { echo "$as_me:12361: error: cannot find input file: $f" >&5
++           { { echo "$as_me:12908: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+    { (exit 1); exit 1; }; }
+          fi;;
+@@ -12416,7 +12963,7 @@ cat >>$CONFIG_STATUS <<\EOF
+   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:12419: $ac_file is unchanged" >&5
++      { echo "$as_me:12966: $ac_file is unchanged" >&5
+ echo "$as_me: $ac_file is unchanged" >&6;}
+     else
+       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+diff --git a/Ada95/configure.in b/Ada95/configure.in
+index 2b89fd4..cd1f321 100644
+--- a/Ada95/configure.in
++++ b/Ada95/configure.in
+@@ -1,5 +1,5 @@
+ dnl***************************************************************************
+-dnl Copyright (c) 2010,2011 Free Software Foundation, Inc.                   *
++dnl Copyright (c) 2010-2012,2013 Free Software Foundation, Inc.              *
+ dnl                                                                          *
+ dnl Permission is hereby granted, free of charge, to any person obtaining a  *
+ dnl copy of this software and associated documentation files (the            *
+@@ -28,24 +28,20 @@ dnl***************************************************************************
+ dnl
+ dnl Author: Thomas E. Dickey
+ dnl
+-dnl $Id: configure.in,v 1.30 2011/03/31 22:49:22 tom Exp $
++dnl $Id: configure.in,v 1.47 2013/04/27 19:50:17 tom Exp $
+ dnl Process this file with autoconf to produce a configure script.
+ dnl
+ dnl See http://invisible-island.net/autoconf/ for additional information.
+ dnl
+ dnl ---------------------------------------------------------------------------
+-AC_PREREQ(2.13.20020210)
+-AC_REVISION($Revision: 1.30 $)
++AC_PREREQ(2.52.20030208)
++AC_REVISION($Revision: 1.47 $)
+ AC_INIT(gen/gen.c)
+ AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
+ 
+ CF_TOP_BUILDDIR
+ 
+-CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
+-AC_ARG_WITH(system-type,
+-[  --with-system-type=XXX  test: override derived host system-type],
+-[AC_MSG_WARN(overriding system type to $withval)
+- cf_cv_system_name=$withval])
++CF_WITH_SYSTYPE
+ 
+ ###	Save the given $CFLAGS to allow user-override.
+ cf_user_CFLAGS="$CFLAGS"
+@@ -54,15 +50,10 @@ cf_user_CFLAGS="$CFLAGS"
+ CF_CFG_DEFAULTS
+ 
+ ###	Checks for programs.
+-AC_PROG_CC
+-CF_GCC_VERSION
+-
++CF_PROG_CC(gnatgcc gcc cc)
+ AC_PROG_CPP
+ AC_PROG_GCC_TRADITIONAL
+ CF_PROG_CC_C_O(CC)
+-AC_ISC_POSIX
+-CF_ANSI_CC_REQD
+-CF_PROG_EXT
+ 
+ AC_ARG_PROGRAM
+ 
+@@ -75,28 +66,8 @@ AC_SYS_LONG_FILE_NAMES
+ 
+ # if we find pkg-config, check if we should install the ".pc" files.
+ CF_PKG_CONFIG
+-
+-if test "$PKG_CONFIG" != none ; then
+-	AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
+-
+-	# Leave this as something that can be overridden in the environment.
+-	if test -z "$PKG_CONFIG_LIBDIR" ; then
+-		PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
+-	fi
+-	PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
+-	if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
+-		AC_ARG_ENABLE(pc-files,
+-			[  --enable-pc-files       generate and install .pc files for pkg-config],
+-			[enable_pc_files=$enableval],
+-			[enable_pc_files=no])
+-		AC_MSG_RESULT($enable_pc_files)
+-	else
+-		AC_MSG_RESULT(no)
+-		AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
+-		enable_pc_files=no
+-	fi
+-fi
+-AC_SUBST(PKG_CONFIG_LIBDIR)
++CF_WITH_PKG_CONFIG_LIBDIR
++CF_ENABLE_PC_FILES
+ 
+ AC_MSG_CHECKING(if you want to build test-programs)
+ AC_ARG_WITH(tests,
+@@ -130,6 +101,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, ':')
+ AC_CHECK_TOOL(LD, ld, ld)
+ AC_CHECK_TOOL(AR, ar, ar)
+ CF_AR_FLAGS
++CF_PATHSEP
+ 
+ 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
+@@ -186,9 +158,7 @@ AC_SUBST(DFT_UPR_MODEL)dnl	the default model ("NORMAL")
+ 
+ CF_NCURSES_ADDON
+ 
+-CF_LIB_PREFIX(cf_prefix)
+-LIB_PREFIX=$cf_prefix
+-AC_SUBST(LIB_PREFIX)
++CF_WITH_LIB_PREFIX(cf_prefix)
+ 
+ LIB_SUFFIX=
+ AC_SUBST(LIB_SUFFIX)
+@@ -235,8 +205,6 @@ fi
+ ###############################################################################
+ CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
+ 
+-CF_PATHSEP
+-
+ ###   use option --enable-broken-linker to force on use of broken-linker support
+ AC_MSG_CHECKING(if you want broken-linker support code)
+ AC_ARG_ENABLE(broken_linker,
+@@ -272,7 +240,7 @@ AC_ARG_WITH(rcs-ids,
+ 	[with_rcs_ids=$withval],
+ 	[with_rcs_ids=no])
+ AC_MSG_RESULT($with_rcs_ids)
+-test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
++test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 if RCS identifiers should be compiled-in)])
+ 
+ ###############################################################################
+ CF_HELP_MESSAGE(Extensions:)
+@@ -286,8 +254,8 @@ AC_ARG_ENABLE(ext-funcs,
+ AC_MSG_RESULT($with_ext_funcs)
+ if test "$with_ext_funcs" = yes ; then
+ 	NCURSES_EXT_FUNCS=1
+-	AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
+-	AC_DEFINE(NCURSES_EXT_FUNCS)
++	AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 if we have use_default_colors function])
++	AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 if we have ncurses extended functions])
+ else
+ 	NCURSES_EXT_FUNCS=0
+ fi
+@@ -337,12 +305,12 @@ else
+ fi
+ 
+ if test $cf_cv_weak_symbols = yes ; then
+-    AC_DEFINE(USE_WEAK_SYMBOLS)
++    AC_DEFINE(USE_WEAK_SYMBOLS,1,[Define to 1 to enable weak-symbols for pthreads])
+ fi
+ 
+ PTHREAD=
+ if test "$with_pthread" = "yes" ; then
+-    AC_DEFINE(USE_PTHREADS)
++    AC_DEFINE(USE_PTHREADS,1,[Define to 1 to use the pthreads library])
+     enable_reentrant=yes
+     if test $cf_cv_weak_symbols = yes ; then
+         PTHREAD=-lpthread
+@@ -370,7 +338,7 @@ if test "$with_reentrant" = yes ; then
+ 	elif test "$assume_reentrant" = no ; then
+ 		LIB_SUFFIX="t${LIB_SUFFIX}"
+ 	fi
+-	AC_DEFINE(USE_REENTRANT)
++	AC_DEFINE(USE_REENTRANT,1,[Define to 1 to compile with experimental reentrant code])
+ else
+ 	cf_cv_enable_reentrant=0
+ fi
+@@ -388,24 +356,13 @@ else
+ 	NCURSES_WRAP_PREFIX=_nc_
+ fi
+ AC_SUBST(NCURSES_WRAP_PREFIX)
+-AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
++AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX",[Define to override _nc_ ncurses internal prefix])
+ 
+ ###############################################################################
+ CF_HELP_MESSAGE(Testing/development Options:)
+ 
+ ###	use option --disable-echo to suppress full display compiling commands
+-AC_MSG_CHECKING(if you want to display full commands during build)
+-AC_ARG_ENABLE(echo,
+-	[  --enable-echo           build: display "compiling" commands (default)],
+-	[with_echo=$enableval],
+-	[with_echo=yes])
+-if test "$with_echo" = yes; then
+-	ECHO_LINK=
+-else
+-	ECHO_LINK='@ echo linking $@ ... ;'
+-fi
+-AC_MSG_RESULT($with_echo)
+-AC_SUBST(ECHO_LINK)
++CF_DISABLE_ECHO
+ 
+ ###	use option --enable-warnings to turn on all gcc warnings
+ AC_MSG_CHECKING(if you want to see compiler warnings)
+@@ -431,7 +388,6 @@ if test -n "$GCC"
+ then
+ 	if test "$with_assertions" = no
+ 	then
+-		AC_DEFINE(NDEBUG)
+ 		CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ 	else
+ 		CF_ADD_ADAFLAGS(-gnata)
+@@ -439,17 +395,17 @@ then
+ fi
+ 
+ ###	use option --disable-leaks to suppress "permanent" leaks, for testing
+-AC_DEFINE(HAVE_NC_ALLOC_H)
++AC_DEFINE(HAVE_NC_ALLOC_H,1,[Define to 1 if we have nc_alloc.h header])
+ 
+ ###	use option --enable-expanded to generate certain macros as functions
+ AC_ARG_ENABLE(expanded,
+ 	[  --enable-expanded       test: generate functions for certain macros],
+-	[test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
++	[test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED,1,[Define to 1 if ncurses macros should be expanded as functions])])
+ 
+ ###	use option --disable-macros to suppress macros in favor of functions
+ AC_ARG_ENABLE(macros,
+ 	[  --disable-macros        test: use functions rather than macros],
+-	[test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
++	[test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS,1,[Define to 1 if ncurses macros should be expanded as functions])])
+ 
+ # Normally we only add trace() to the debug-library.  Allow this to be
+ # extended to all models of the ncurses library:
+@@ -485,7 +441,7 @@ AC_CHECK_FUNC(gettimeofday,
+ 	AC_DEFINE(HAVE_GETTIMEOFDAY),[
+ 
+ AC_CHECK_LIB(bsd, gettimeofday,
+-	AC_DEFINE(HAVE_GETTIMEOFDAY)
++	AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday])
+ 	LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
+ 	;;
+ esac
+@@ -505,8 +461,6 @@ CF_LINK_DATAONLY
+ ###	Checks for library functions.
+ CF_MKSTEMP
+ 
+-AC_TYPE_SIGNAL
+-
+ dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
+ if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
+ 	CF_STRIP_G_OPT(CFLAGS)
+@@ -514,24 +468,13 @@ if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
+ fi
+ 
+ CF_HELP_MESSAGE(Ada95 Binding Options:)
+-
++cf_with_ada=yes
+ dnl Check for availability of GNU Ada Translator (GNAT).
+ dnl At the moment we support no other Ada95 compiler.
+ if test "$cf_with_ada" != "no" ; then
+ 	CF_PROG_GNAT
+ 	if test	"$cf_cv_prog_gnat_correct" = yes; then
+-
+-		# make ADAFLAGS consistent with CFLAGS
+-		case "$CFLAGS" in
+-		*-g*)
+-			CF_ADD_ADAFLAGS(-g)
+-			;;
+-		esac
+-		case "$CFLAGS" in
+-		*-O*)
+-			CF_ADD_ADAFLAGS(-O3)
+-			;;
+-		esac
++		CF_FIXUP_ADAFLAGS
+ 
+ 		CF_GNAT_GENERICS
+ 		CF_GNAT_SIGINT
+@@ -556,8 +499,10 @@ fi
+ ################################################################################
+ 
+ # not needed
+-TINFO_ARGS2=
+-AC_SUBST(TINFO_ARGS2)
++TINFO_LDFLAGS2=
++AC_SUBST(TINFO_LDFLAGS2)
++TINFO_LIBS=
++AC_SUBST(TINFO_LIBS)
+ 
+ ### Construct the list of include-directories to be generated
+ CF_INCLUDE_DIRS
+@@ -594,7 +539,7 @@ fi
+ 
+ SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
+ 
+-AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
++AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as the library path-separator])
+ 
+ ### Now that we're done running tests, add the compiler-warnings, if any
+ CF_ADD_CFLAGS($EXTRA_CFLAGS)
+@@ -656,8 +601,8 @@ fi
+ AWK="$AWK"
+ DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+ DFT_LWR_MODEL="$DFT_LWR_MODEL"
+-ECHO_LINK="$ECHO_LINK"
+ LIB_NAME="$LIB_NAME"
++LIB_PREFIX="$LIB_PREFIX"
+ LIB_SUFFIX="$LIB_SUFFIX"
+ LN_S="$LN_S"
+ NCURSES_MAJOR="$NCURSES_MAJOR"
+diff --git a/Ada95/doc/Makefile.in b/Ada95/doc/Makefile.in
+index 8f33c93..9a74489 100644
+--- a/Ada95/doc/Makefile.in
++++ b/Ada95/doc/Makefile.in
+@@ -1,4 +1,4 @@
+-# $Id: Makefile.in,v 1.2 2011/03/26 19:26:17 tom Exp $
++# $Id: Makefile.in,v 1.3 2012/08/11 21:31:56 tom Exp $
+ ##############################################################################
+ # Copyright (c) 2011 Free Software Foundation, Inc.                          #
+ #                                                                            #
+@@ -38,6 +38,7 @@ DESTDIR		= @DESTDIR@
+ srcdir		= @srcdir@
+ prefix		= @prefix@
+ exec_prefix	= @exec_prefix@
++datarootdir	= @datarootdir@
+ datadir		= @datadir@
+ mandir		= @mandir@
+ 
+diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in
+index 10fd635..302ad94 100644
+--- a/Ada95/gen/Makefile.in
++++ b/Ada95/gen/Makefile.in
+@@ -1,5 +1,5 @@
+ ##############################################################################
+-# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.                #
++# Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -28,7 +28,7 @@
+ #
+ #  Author:  Juergen Pfeifer, 1996
+ #
+-#  $Id: Makefile.in,v 1.74 2011/03/26 23:36:30 tom Exp $
++#  $Id: Makefile.in,v 1.77 2012/10/06 18:58:48 tom Exp $
+ #
+ .SUFFIXES:
+ 
+@@ -36,7 +36,7 @@ SHELL		= /bin/sh
+ VPATH		= @srcdir@
+ THIS		= Makefile
+ 
+-x		= @PROG_EXT@
++x		= @EXEEXT@
+ 
+ top_srcdir	= @top_srcdir@
+ DESTDIR		= @DESTDIR@
+@@ -73,7 +73,7 @@ ABI_VERSION	= @cf_cv_abi_version@
+ LOCAL_LIBDIR	= @top_builddir@/lib
+ 
+ LINK		= $(HOST_CC)
+-LD_FLAGS	= @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_ARGS2@
++LD_FLAGS	= @LD_MODEL@ $(LOCAL_LIBS) @TINFO_LDFLAGS2@ @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_LIBS@
+ 
+ RANLIB		= @RANLIB@
+ 
+@@ -179,7 +179,7 @@ uninstall.libs ::
+ 	-rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
+ 
+ $(PROG_GENERATE):  gen.o
+-	@ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
++	@ECHO_LD@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
+ 
+ gen.o:	$(srcdir)/gen.c
+ 	$(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
+@@ -411,7 +411,7 @@ adahtml:
+ 	@mkdir -p $(HTML_DIR)
+ 	cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb]
+ @USE_OLD_MAKERULES@	ln -sf ../src/*.ali .
+- at USE_GNAT_PROJECTS@	ln -sf ../static-ali/*.ali .	
++ at USE_GNAT_PROJECTS@	ln -sf ../static-ali/*.ali .
+ 	@echo "Filtering generated files"
+ 	@for f in $(GEN_SRC); do \
+ 	   h=`basename $$f` ;\
+diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c
+index 30772b0..682f710 100644
+--- a/Ada95/gen/gen.c
++++ b/Ada95/gen/gen.c
+@@ -32,7 +32,7 @@
+ 
+ /*
+     Version Control
+-    $Id: gen.c,v 1.59 2011/03/31 23:50:24 tom Exp $
++    $Id: gen.c,v 1.60 2011/04/30 19:47:19 Nicolas.Boulenguez Exp $
+   --------------------------------------------------------------------------*/
+ /*
+   This program generates various record structures and constants from the
+@@ -124,19 +124,15 @@ gen_reps(
+ 	  int len,		/* size of the record in bytes          */
+ 	  int bias)
+ {
+-  const char *unused_name = "Unused";
+-  int long_bits = (8 * (int)sizeof(unsigned long));
+-  int len_bits = (8 * len);
+-  int i, j, n, l, cnt = 0, low, high;
++  const int len_bits = (8 * len);
++  int i, l, low, high;
+   int width = strlen(RES_NAME) + 3;
+   unsigned long a;
+-  unsigned long mask = 0;
+ 
+   assert(nap != NULL);
+ 
+   for (i = 0; nap[i].name != (char *)0; i++)
+     {
+-      cnt++;
+       l = (int)strlen(nap[i].name);
+       if (l > width)
+ 	width = l;
+@@ -147,32 +143,8 @@ gen_reps(
+   printf("      record\n");
+   for (i = 0; nap[i].name != (char *)0; i++)
+     {
+-      mask |= nap[i].attr;
+       printf("         %-*s : Boolean;\n", width, nap[i].name);
+     }
+-
+-  /*
+-   * Compute a mask for the unused bits in this target.
+-   */
+-  mask = ~mask;
+-  /*
+-   * Bits in the biased area are unused by the target.
+-   */
+-  for (j = 0; j < bias; ++j)
+-    {
+-      mask &= (unsigned long)(~(1L << j));
+-    }
+-  /*
+-   * Bits past the target's size are really unused.
+-   */
+-  for (j = len_bits + bias; j < long_bits; ++j)
+-    {
+-      mask &= (unsigned long)(~(1L << j));
+-    }
+-  if (mask != 0)
+-    {
+-      printf("         %-*s : Boolean;\n", width, unused_name);
+-    }
+   printf("      end record;\n");
+   printf("   pragma Convention (C, %s);\n\n", name);
+ 
+@@ -187,17 +159,10 @@ gen_reps(
+ 	printf("         %-*s at 0 range %2d .. %2d;\n", width, nap[i].name,
+ 	       low - bias, high - bias);
+     }
+-  if (mask != 0)
+-    {
+-      l = find_pos((char *)&mask, sizeof(mask), &low, &high);
+-      if (l >= 0)
+-	printf("         %-*s at 0 range %2d .. %2d;\n", width, unused_name,
+-	       low - bias, high - bias);
+-    }
+-  i = 1;
+-  n = cnt;
+   printf("      end record;\n");
++  printf("   pragma Warnings (Off);");
+   printf("   for %s'Size use %d;\n", name, len_bits);
++  printf("   pragma Warnings (On);\n");
+   printf("   --  Please note: this rep. clause is generated and may be\n");
+   printf("   --               different on your system.");
+ }
+diff --git a/Ada95/include/ncurses_defs b/Ada95/include/ncurses_defs
+index b07f5f1..3174620 100644
+--- a/Ada95/include/ncurses_defs
++++ b/Ada95/include/ncurses_defs
+@@ -1,6 +1,6 @@
+-# $Id: ncurses_defs,v 1.41 2008/11/16 00:19:59 juergen Exp $
++# $Id: ncurses_defs,v 1.44 2013/04/27 19:50:17 tom Exp $
+ ##############################################################################
+-# Copyright (c) 2000-2007,2008 Free Software Foundation, Inc.                #
++# Copyright (c) 2000-2012,2013 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -33,7 +33,6 @@
+ 
+ BROKEN_LINKER
+ BSD_TPUTS
+-CC_HAS_PROTOS
+ CPP_HAS_PARAM_INIT
+ CURSES_ACS_ARRAY	acs_map
+ CURSES_WACS_ARRAY	_nc_wacs
+@@ -120,7 +119,6 @@ HAVE_SIGVEC
+ HAVE_SIZECHANGE
+ HAVE_SLK_COLOR
+ HAVE_SLK_INIT	1
+-HAVE_STRDUP
+ HAVE_STRSTR
+ HAVE_SYMLINK
+ HAVE_SYS_BSDTYPES_H
+@@ -174,7 +172,6 @@ NCURSES_PATHSEP	':'
+ NEED_PTEM_H
+ NO_LEAKS
+ PURE_TERMINFO
+-RETSIGTYPE
+ STDC_HEADERS
+ SVR4_ACTION
+ SVR4_TERMIO
+diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in
+index aa839ff..8949862 100644
+--- a/Ada95/samples/Makefile.in
++++ b/Ada95/samples/Makefile.in
+@@ -1,5 +1,5 @@
+ ##############################################################################
+-# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.                #
++# Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -28,7 +28,7 @@
+ #
+ #  Author:  Juergen Pfeifer, 1996
+ #
+-#  $Id: Makefile.in,v 1.46 2011/03/28 23:45:08 tom Exp $
++#  $Id: Makefile.in,v 1.48 2012/10/06 19:00:42 tom Exp $
+ #
+ .SUFFIXES:
+ 
+@@ -36,12 +36,13 @@ SHELL		= /bin/sh
+ VPATH		= @srcdir@
+ THIS		= Makefile
+ 
+-x		= @PROG_EXT@
++x		= @EXEEXT@
+ 
+ srcdir		= @srcdir@
+ prefix		= @prefix@
+ exec_prefix	= @exec_prefix@
+ bindir		= @bindir@
++datarootdir	= @datarootdir@
+ datadir		= @datadir@
+ libdir		= @libdir@
+ includedir	= @includedir@
+diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in
+index f6c3e75..9962859 100644
+--- a/Ada95/src/Makefile.in
++++ b/Ada95/src/Makefile.in
+@@ -28,7 +28,7 @@
+ #
+ #  Author:  Juergen Pfeifer, 1996
+ #
+-#  $Id: Makefile.in,v 1.60 2011/03/31 09:46:16 tom Exp $
++#  $Id: Makefile.in,v 1.62 2011/04/30 22:24:45 tom Exp $
+ #
+ .SUFFIXES:
+ 
+@@ -218,7 +218,9 @@ $(ABASE)-trace.adb : $(srcdir)/$(ABASE)-trace.adb_p
+ 	$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ -DPRAGMA_UNREF=@PRAGMA_UNREF@ $(srcdir)/$(ABASE)-trace.adb_p $@
+ 
+ ###############################################################################
+-C_OBJS	= c_varargs_to_ada.o ncurses_compat.o
++# Use these definitions when building a shared library.
++SHARED_C_OBJS	= c_varargs_to_ada.o ncurses_compat.o
++SHARED_OBJS 	= $(SHARED_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
+ 
+ c_varargs_to_ada.o :	$(srcdir)/c_varargs_to_ada.c
+ 	$(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/c_varargs_to_ada.c
+@@ -227,13 +229,22 @@ ncurses_compat.o :	$(srcdir)/ncurses_compat.c
+ 	$(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/ncurses_compat.c
+ 
+ ###############################################################################
++# Use these definitions when building a static library.
++STATIC_C_OBJS	= static_c_varargs_to_ada.o static_ncurses_compat.o
++STATIC_OBJS 	= $(STATIC_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
+ 
+-MIXED_OBJS = $(C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
++static_c_varargs_to_ada.o :	$(srcdir)/c_varargs_to_ada.c
++	$(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/c_varargs_to_ada.c
++
++static_ncurses_compat.o :	$(srcdir)/ncurses_compat.c
++	$(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/ncurses_compat.c
++
++###############################################################################
+ 
+ @USE_OLD_MAKERULES@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
+ @USE_OLD_MAKERULES@		$(BUILD_DIR_LIB) \
+- at USE_OLD_MAKERULES@		$(MIXED_OBJS)
+- at USE_OLD_MAKERULES@	$(AR) $(ARFLAGS) $@ $(MIXED_OBJS)
++ at USE_OLD_MAKERULES@		$(STATIC_OBJS)
++ at USE_OLD_MAKERULES@	$(AR) $(ARFLAGS) $@ $(STATIC_OBJS)
+ 
+ $(BUILD_DIR)/static-ali : ; mkdir -p $@
+ $(BUILD_DIR)/static-obj : ; mkdir -p $@
+@@ -245,10 +256,10 @@ STATIC_DIRS = \
+ 
+ @USE_GNAT_PROJECTS@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
+ @USE_GNAT_PROJECTS@		$(ABASE)-trace.adb \
+- at USE_GNAT_PROJECTS@		$(C_OBJS) \
++ at USE_GNAT_PROJECTS@		$(STATIC_C_OBJS) \
+ @USE_GNAT_PROJECTS@		$(STATIC_DIRS)
+ @USE_GNAT_PROJECTS@	$(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
+- at USE_GNAT_PROJECTS@	$(AR) $(ARFLAGS) $@ $(C_OBJS)
++ at USE_GNAT_PROJECTS@	$(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
+ @USE_GNAT_PROJECTS@
+ @USE_GNAT_LIBRARIES at install \
+ @USE_GNAT_LIBRARIES at install.libs :: \
+@@ -274,8 +285,11 @@ SHARED_DIRS = \
+ 	$(BUILD_DIR)/dynamic-obj
+ 
+ @MAKE_ADA_SHAREDLIB at all :: $(BUILD_DIR_LIB)/$(SHARED_LIBNAME)
+- at MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: $(ABASE)-trace.adb $(SHARED_DIRS)
+- at MAKE_ADA_SHAREDLIB@	cp $(MIXED_OBJS) $(BUILD_DIR)/dynamic-obj/
++ at MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: \
++ at MAKE_ADA_SHAREDLIB@		$(ABASE)-trace.adb \
++ at MAKE_ADA_SHAREDLIB@		$(SHARED_DIRS) \
++ at MAKE_ADA_SHAREDLIB@		$(SHARED_OBJS)
++ at MAKE_ADA_SHAREDLIB@	cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/
+ @MAKE_ADA_SHAREDLIB@	$(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
+ 
+ install \
+diff --git a/INSTALL b/INSTALL
+index eb26ab1..c015b43 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -1,5 +1,5 @@
+ -------------------------------------------------------------------------------
+--- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.               --
++-- Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.               --
+ --                                                                           --
+ -- Permission is hereby granted, free of charge, to any person obtaining a   --
+ -- copy of this software and associated documentation files (the             --
+@@ -25,7 +25,7 @@
+ -- sale, use or other dealings in this Software without prior written        --
+ -- authorization.                                                            --
+ -------------------------------------------------------------------------------
+--- $Id: INSTALL,v 1.155 2011/03/31 08:27:24 tom Exp $
++-- $Id: INSTALL,v 1.167 2013/03/09 21:22:04 tom Exp $
+ ---------------------------------------------------------------------
+              How to install Ncurses/Terminfo on your system
+ ---------------------------------------------------------------------
+@@ -407,13 +407,14 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 
+     --disable-tic-depends
+ 	When building shared libraries, normally the tic library is linked to
+-	depend upon the ncurses library (and in turn, on the term-library if
+-	the --with-termlib option was given).  The tic- and term-libraries
+-	ABI does not depend on the --enable-widec option. Some packagers have
+-	used this to reduce the number of library files which are packaged
+-	by using only one copy of those libraries.  To make this work properly,
++	depend upon the ncurses library (or equivalently, on the tinfo-library
++	if the --with-termlib option was given).  The tic- and tinfo-library
++	ABIs do not depend on the --enable-widec option.  Some packagers have
++	used this to reduce the number of library files which are packaged by
++	using only one copy of those libraries.  To make this work properly,
+ 	the tic library must be built without an explicit dependency on the
+-	ncurses (or ncursesw) library.  Use this configure option to do that.
++	underlying library (ncurses vs ncursesw, tinfo vs tinfow).  Use this
++	configure option to do that.
+ 	For example
+ 		configure --with-ticlib --with-shared --disable-tic-depends
+ 
+@@ -555,6 +556,9 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	library by reducing global and static variables.  This option is also
+ 	set if --with-pthread is used.
+ 
++	Enabling this option adds a "t" to the library names, except for the
++	special case when --enable-weak-symbols is also used.
++
+     --enable-rpath
+ 	Use rpath option when generating shared libraries, and (with some
+ 	restrictions) when linking the corresponding programs.  This originally
+@@ -595,6 +599,14 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	reducing the need for juggling the global SP value with set_term() and
+ 	delscreen().
+ 
++    --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
++	is weakly standardized.
++
++	Aside from stifling these warnings, there is no functional improvement
++	in ncurses.
++
+     --enable-symlinks
+ 	If your system supports symbolic links, make tic use symbolic links
+ 	rather than hard links to save diskspace when writing aliases in the
+@@ -616,6 +628,12 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	match is found in the terminfo database.  See also the --enable-getcap
+ 	and --enable-getcap-cache options.
+ 
++	Termcap support requires run-time parsing rather than loading
++	predigested data.  If you have specified --with-ticlib, then you
++	cannot have termcap support since run-time parsing is done in the
++	tic library, which is intentionally not part of normal linkage
++	dependencies.
++
+     --enable-warnings
+ 	Turn on GCC compiler warnings.  There should be only a few.
+ 
+@@ -740,6 +758,12 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	executables, e.g., by setting "--with-chtype=long" (the configure
+ 	script supplies "unsigned").
+ 
++    --with-cxx-shared
++	When --with-shared is set, build libncurses++ as a shared library.
++	This implicitly relies upon building with gcc/g++, since other
++	compiler suites may have differences in the way shared libraries are
++	built.  libtool by the way has similar limitations.
++
+     --with-database=XXX
+ 	Specify the terminfo source file to install.  Usually you will wish
+ 	to install ncurses' default (misc/terminfo.src).  Certain systems
+@@ -824,7 +848,17 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	NOTE: a few systems build shared libraries with fixed pathnames; this
+ 	option probably will not work for those configurations.
+ 
+-     --with-libtool[=XXX]
++    --with-lib-prefix=XXX
++	OS/2 EMX used a different naming convention from most Unix-like
++	platforms.  It required that the "lib" part of a library name was
++	omitted.  Newer EMX as part of eComStation does not follow that
++	convention.  Use this option to override the configure script's
++	assumptions about the library-prefix.  If this option is omitted, it
++	uses the original OS/2 EMX convention for that platform.  Use
++	"--with-lib-prefix=lib" for the newer EMX in eComStation.  Use
++	"--without-lib-prefix" to suppress it for other odd platforms.
++
++    --with-libtool[=XXX]
+ 	Generate libraries with libtool.  If this option is selected, then it
+ 	overrides all other library model specifications.  Note that libtool
+ 	must already be installed, uses makefile rules dependent on GNU make,
+@@ -904,6 +938,10 @@ SUMMARY OF CONFIGURE OPTIONS:
+     --with-pkg-config=[DIR]
+ 	Check for pkg-config, optionally specifying its path.
+ 
++    --with-pkg-config-libdir=[DIR]
++	If pkg-config was found, override the automatic check for its library
++	path.
++
+     --with-profile
+ 	Generate profile-libraries These are named by adding "_p" to the root,
+ 	e.g., libncurses_p.a
+@@ -996,10 +1034,27 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	library dependencies for tic and other programs built with the tic
+ 	library.
+ 
++    --with-tparm-arg[=XXX]
++	Override the type used for tparm() arguments, which normally is a
++	"long".  However the function must assume that its arguments can hold a
++	pointer to char's which is not always workable for 64-bit platforms.  A
++	better choice would be intptr_t, which was not available at the time
++	tparm's interface was defined.
++
++	If the option is not given, this defaults to "long".
++
+     --with-trace
+ 	Configure the trace() function as part of the all models of the ncurses
+ 	library.  Normally it is part of the debug (libncurses_g) library only.
+ 
++    --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).
++
++	During installation, the makefile and scripts modifies the "xterm+kbs"
++	terminfo entry to use this setting.
++
+     --with-valgrind
+ 	For testing, compile with debug option.
+ 	This also sets the --disable-leaks option.
+@@ -1024,6 +1079,8 @@ SUMMARY OF CONFIGURE OPTIONS:
+ 	install as "ncurses.h" and modify the installed headers and manpages
+ 	accordingly.
+ 
++	Likewise, do not install an alias "curses" for the ncurses manpage.
++
+     --without-cxx
+ 	XSI curses declares "bool" as part of the interface.  C++ also declares
+ 	"bool".  Neither specifies the size and type of booleans, but both
+@@ -1726,20 +1783,37 @@ CONFIGURING FALLBACK ENTRIES:
+ 	By default, there are no entries on the fallback list.  After you have
+ 	built the ncurses suite for the first time, you can change the list
+ 	(the process needs infocmp(1)).  To do so, use the script
+-	ncurses/tinfo/MKfallback.sh.  A configure script option
++	ncurses/tinfo/MKfallback.sh.  The configure script option
+ 	--with-fallbacks does this (it accepts a comma-separated list of the
+ 	names you wish, and does not require a rebuild).
+ 
+ 	If you wanted (say) to have linux, vt100, and xterm fallbacks, you
+-	would use the commands
++	might use the commands
+ 
+ 		cd ncurses;
+-		tinfo/MKfallback.sh linux vt100 xterm >fallback.c
++		tinfo/MKfallback.sh \
++			$TERMINFO \
++			../misc/terminfo.src \
++			`which tic` \
++			linux vt100 xterm >fallback.c
++
++	The first three parameters of the script are normally supplied by
++	the configured makefiles via the "--with-fallbacks" option.  They
++	are
++
++		1) the location of the terminfo database
++		2) the source for the terminfo entries
++		3) the location of the tic program, used to create a terminfo
++		   database.
+ 
+ 	Then just rebuild and reinstall the library as you would normally.
+ 	You can restore the default empty fallback list with
+ 
+-		tinfo/MKfallback.sh >fallback.c
++		tinfo/MKfallback.sh \
++			$TERMINFO \
++			../misc/terminfo.src \
++			`which tic` \
++			>fallback.c
+ 
+ 	The overhead for an empty fallback list is one trivial stub function.
+ 	Any non-empty fallback list is const-ed and therefore lives in sharable
+diff --git a/MANIFEST b/MANIFEST
+index 421cc67..3655a8d 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -545,6 +545,8 @@
+ ./include/nc_alloc.h
+ ./include/nc_mingw.h
+ ./include/nc_panel.h
++./include/nc_string.h
++./include/nc_termios.h
+ ./include/nc_tparm.h
+ ./include/ncurses_cfg.hin
+ ./include/ncurses_defs
+@@ -764,7 +766,6 @@
+ ./mk-0th.awk
+ ./mk-1st.awk
+ ./mk-2nd.awk
+-./mk-dlls.sh.in
+ ./mk-hdr.awk
+ ./ncurses/Makefile.in
+ ./ncurses/README
+@@ -850,7 +851,6 @@
+ ./ncurses/base/lib_wattron.c
+ ./ncurses/base/lib_winch.c
+ ./ncurses/base/lib_window.c
+-./ncurses/base/memmove.c
+ ./ncurses/base/nc_panel.c
+ ./ncurses/base/resizeterm.c
+ ./ncurses/base/safe_sprintf.c
+@@ -867,6 +867,12 @@
+ ./ncurses/llib-lncursest
+ ./ncurses/llib-lncursestw
+ ./ncurses/llib-lncursesw
++./ncurses/llib-ltic
++./ncurses/llib-ltictw
++./ncurses/llib-lticw
++./ncurses/llib-ltinfo
++./ncurses/llib-ltinfotw
++./ncurses/llib-ltinfow
+ ./ncurses/modules
+ ./ncurses/tinfo/MKcaptab.awk
+ ./ncurses/tinfo/MKcaptab.sh
+@@ -915,10 +921,10 @@
+ ./ncurses/tinfo/make_hash.c
+ ./ncurses/tinfo/make_keys.c
+ ./ncurses/tinfo/name_match.c
++./ncurses/tinfo/obsolete.c
+ ./ncurses/tinfo/parse_entry.c
+ ./ncurses/tinfo/read_entry.c
+ ./ncurses/tinfo/read_termcap.c
+-./ncurses/tinfo/setbuf.c
+ ./ncurses/tinfo/strings.c
+ ./ncurses/tinfo/tinfo_driver.c
+ ./ncurses/tinfo/trim_sgr0.c
+@@ -943,8 +949,6 @@
+ ./ncurses/tty/lib_tstp.c
+ ./ncurses/tty/lib_twait.c
+ ./ncurses/tty/lib_vidattr.c
+-./ncurses/tty/tty_display.h
+-./ncurses/tty/tty_input.h
+ ./ncurses/tty/tty_update.c
+ ./ncurses/wcwidth.h
+ ./ncurses/widechar/charable.c
+@@ -967,9 +971,18 @@
+ ./ncurses/widechar/lib_vline_set.c
+ ./ncurses/widechar/lib_wacs.c
+ ./ncurses/widechar/lib_wunctrl.c
++./ncurses/widechar/widechars.c
+ ./ncurses/win32con/gettimeofday.c
+ ./ncurses/win32con/wcwidth.c
+ ./ncurses/win32con/win_driver.c
++./package/debian/changelog
++./package/debian/compat
++./package/debian/control
++./package/debian/copyright
++./package/debian/rules
++./package/debian/source/format
++./package/debian/watch
++./package/ncurses.spec
+ ./panel/Makefile.in
+ ./panel/headers
+ ./panel/llib-lpanel
+@@ -1022,6 +1035,7 @@
+ ./test/cardfile.dat
+ ./test/chgat.c
+ ./test/clip_printw.c
++./test/color_name.h
+ ./test/color_set.c
+ ./test/configure
+ ./test/configure.in
+@@ -1092,12 +1106,15 @@
+ ./test/test_instr.c
+ ./test/test_inwstr.c
+ ./test/test_opaque.c
++./test/test_vid_puts.c
++./test/test_vidputs.c
+ ./test/testaddch.c
+ ./test/testcurs.c
+ ./test/testscanw.c
+ ./test/tracemunch
+ ./test/view.c
+ ./test/widechars-utf8.txt
++./test/widechars.h
+ ./test/worm.c
+ ./test/xmas.c
+ ./test/xterm-16color.dat
+diff --git a/Makefile.in b/Makefile.in
+index d891e00..d33e978 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1,6 +1,6 @@
+-# $Id: Makefile.in,v 1.30 2010/11/27 21:45:27 tom Exp $
++# $Id: Makefile.in,v 1.35 2012/10/06 17:31:01 tom Exp $
+ ##############################################################################
+-# Copyright (c) 1998-2008,2010 Free Software Foundation, Inc.                #
++# Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -35,7 +35,8 @@ SHELL = /bin/sh
+ VPATH		= @srcdir@
+ 
+ DESTDIR=@DESTDIR@
+-CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
++RPATH_LIST=@RPATH_LIST@
++TOP_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)"
+ 
+ @SET_MAKE@
+ 
+@@ -48,6 +49,7 @@ srcdir		= @srcdir@
+ 
+ prefix		= @prefix@
+ exec_prefix	= @exec_prefix@
++datarootdir	= @datarootdir@
+ 
+ bindir		= @bindir@
+ ticdir		= @TERMINFO@
+@@ -87,12 +89,9 @@ preinstall :
+ 		fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
+ 		echo '** Will overwrite non-ncurses curses.h'
+ 
+-dlls:	libs
+-	$(SHELL) $(srcdir)/mk-dlls.sh
+-
+ distclean \
+ realclean ::
+-	-rm -f mk-dlls.sh mingw_arch
++
+ 
+ # Put the common rules here so that we can easily construct the list of
+ # directories to visit.
+diff --git a/NEWS b/NEWS
+index e8f9cef..84da50c 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,5 +1,5 @@
+ -------------------------------------------------------------------------------
+--- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.               --
++-- Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.               --
+ --                                                                           --
+ -- Permission is hereby granted, free of charge, to any person obtaining a   --
+ -- copy of this software and associated documentation files (the             --
+@@ -25,7 +25,7 @@
+ -- sale, use or other dealings in this Software without prior written        --
+ -- authorization.                                                            --
+ -------------------------------------------------------------------------------
+--- $Id: NEWS,v 1.1682 2011/04/04 00:02:42 tom Exp $
++-- $Id: NEWS,v 1.2053 2013/05/04 23:03:37 tom Exp $
+ -------------------------------------------------------------------------------
+ 
+ This is a log of changes that ncurses has gone through since Zeyd started
+@@ -45,6 +45,1074 @@ 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.
+ 
++20130504
++	+ fixes for issues found by Coverity:
++	  + correct FNKEY() macro in progs/dump_entry.c, allowing kf11-kf63 to
++	    display when infocmp's -R option is used for HP or AIX subsets.
++	  + fix dead-code issue with test/movewindow.c
++	  + improve limited-checking in _nc_read_termtype().
++
++20130427
++	+ fix clang 3.2 warning in progs/dump_entry.c
++	+ drop AC_TYPE_SIGNAL check; ncurses relies on c89 and later.
++
++20130413
++	+ add MinGW to cases where ncurses installs by default into /usr
++	  (prompted by discussion with Daniel Silva Ferreira).
++	+ add -D option to infocmp's usage-message (patch by Miroslav Lichvar).
++	+ add a missing 'int' type for main function in configure check for
++	  type of bool variable, to work with clang 3.2 (report by Dmitri
++	  Gribenko).
++	+ improve configure check for static_cast, to work with clang 3.2
++	  (report by Dmitri Gribenko).
++	+ re-order rule for demo.o and macros defining header dependencies in
++	  c++/Makefile.in to accommodate gmake (report by Dmitri Gribenko).
++
++20130406
++	+ improve parameter checking in copywin().
++	+ modify configure script to work around OS X's "libtool" program, to
++	  choose glibtool instead.  At the same time, chance the autoconf macro
++	  to look for a "tool" rather than a "prog", to help with potential use
++	  in cross-compiling.
++	+ separate the rpath usage for c++ library from demo program
++	  (Redhat #911540)
++	+ update/correct header-dependencies in c++ makefile (report by Werner
++	  Fink).
++	+ add --with-cxx-shared to dpkg-script, as done for rpm-script.
++
++20130324
++	+ build-fix for libtool configuration (reports by Daniel Silva Ferreira
++	  and Roumen Petrov).
++
++20130323
++	+ build-fix for OS X, to handle changes for --with-cxx-shared feature
++	  (report by Christian Ebert).
++	+ change initialization for vt220, similar entries for consistency
++	  with cursor-key strings (NetBSD #47674) -TD
++	+ further improvements to linux-16color (Benjamin Sittler)
++
++20130316
++	+ additional fix for tic.c, to allocate missing buffer space.
++	+ eliminate configure-script warnings for gen-pkgconfig.in
++	+ correct typo in sgr string for sun-color,
++	  add bold for consistency with sgr,
++	  change smso for consistency with sgr -TD
++	+ correct typo in sgr string for terminator -TD
++	+ add blink to the attributes masked by ncv in linux-16color (report
++	  by Benjamin Sittler)
++	+ improve warning message from post-load checking for missing "%?"
++	  operator by tic/infocmp by showing the entry name and capability.
++	+ minor formatting improvement to tic/infocmp -f option to ensure
++	  line split after "%;".
++	+ amend scripting for --with-cxx-shared option to handle the debug
++	  library "libncurses++_g.a" (report by Sven Joachim).
++
++20130309
++	+ amend change to toe.c for reading from /dev/zero, to ensure that
++	  there is a buffer for the temporary filename (cf: 20120324).
++	+ regenerated html manpages.
++	+ fix typo in terminfo.head (report by Sven Joachim, cf: 20130302).
++	+ updated some autoconf macros:
++	  + CF_ACVERSION_CHECK, from byacc 1.9 20130304
++	  + CF_INTEL_COMPILER, CF_XOPEN_SOURCE from luit 2.0-20130217
++	+ add configure option --with-cxx-shared to permit building
++	  libncurses++ as a shared library when using g++, e.g., the same
++	  limitations as libtool but better integrated with the usual build
++	  configuration (Redhat #911540).
++	+ modify MKkey_defs.sh to filter out build-path which was unnecessarily
++	  shown in curses.h (Debian #689131).
++
++20130302
++	+ add section to terminfo manpage discussing user-defined capabilities.
++	+ update manpage description of NCURSES_NO_SETBUF, explaining why it
++	  is obsolete.
++	+ add a check in waddch_nosync() to ensure that tab characters are
++	  treated as control characters; some broken locales claim they are
++	  printable.
++	+ add some traces to the Windows console driver.
++	+ initialize a temporary array in _nc_mbtowc, needed for some cases
++	  of raw input in MinGW port.
++
++20130218
++	+ correct ifdef on change to lib_twait.c (report by  Werner Fink).
++	+ update config.guess, config.sub
++
++20130216
++	+ modify test/testcurs.c to work with mouse for ncurses as it does for
++	  pdcurses.
++	+ modify test/knight.c to work with mouse for pdcurses as it does for
++	  ncurses.
++	+ modify internal recursion in wgetch() which handles cooked mode to
++	  check if the call to wgetnstr() returned an error.  This can happen
++	  when both nocbreak() and nodelay() are set, for instance (report by
++	  Nils Christopher Brause) (cf: 960418).
++	+ fixes for issues found by Coverity:
++	  + add a check for valid position in ClearToEOS()
++	  + fix in lib_twait.c when --enable-wgetch-events is used, pointer
++	    use after free.
++	  + improve a limit-check in make_hash.c
++	  + fix a memory leak in hashed_db.c
++
++20130209
++	+ modify test/configure script to make it simpler to override names
++	  of curses-related libraries, to help with linking with pdcurses in
++	  mingw environment.
++	+ if the --with-terminfo-dirs configure option is not used, there is
++	  no corresponding compiled-in value for that.  Fill in "no default
++	  value" for that part of the manpage substitution.
++
++20130202
++	+ correct initialization in knight.c which let it occasionally make
++	  an incorrect move (cf: 20001028).
++	+ improve documentation of the terminfo/termcap search path.
++
++20130126
++	+ further fixes to mvcur to pass callback function (cf: 20130112),
++	  needed to make test/dots_mvcur work.
++	+ reduce calls to SetConsoleActiveScreenBuffer in win_driver.c, to
++	  help reduce flicker.
++	+ modify configure script to omit "+b" from linker options for very
++	  old HP-UX systems (report by Dennis Grevenstein)
++	+ add HP-UX workaround for missing EILSEQ on old HP-UX systems (patch
++	  by Dennis Grevenstein).
++	+ restore memmove/strdup support for antique systems (request by
++	  Dennis Grevenstein).
++	+ change %l behavior in tparm to push the string length onto the stack
++	  rather than saving the formatted length into the output buffer
++	  (report by Roy Marples, cf: 980620).
++
++20130119
++	+ fixes for issues found by Coverity:
++	  + fix memory leak in safe_sprintf.c
++	  + add check for return-value in tty_update.c
++	  + correct initialization for -s option in test/view.c
++	  + add check for numeric overflow in lib_instr.c
++	  + improve error-checking in copywin
++	+ add advice in infocmp manpage for termcap users (Debian #698469).
++	+ add "-y" option to test/demo_termcap and test/demo_terminfo to
++	  demonstrate behavior with/without extended capabilities.
++	+ updated termcap manpage to document legacy termcap behavior for
++	  matching capability names.
++	+ modify name-comparison for tgetstr, etc., to accommodate legacy
++	  applications as well as to improve compatbility with BSD 4.2
++	  termcap implementations (Debian #698299) (cf: 980725).
++
++20130112
++	+ correct prototype in manpage for vid_puts.
++	+ drop ncurses/tty/tty_display.h, ncurses/tty/tty_input.h, since they
++	  are unused in the current driver model.
++	+ modify mvcur to use stdout except when called within the ncurses
++	  library.
++	+ modify vidattr and vid_attr to use stdout as documented in manpage.
++	+ amend changes made to buffering in 20120825 so that the low-level
++	  putp() call uses stdout rather than ncurses' internal buffering.
++	  The putp_sp() call does the same, for consistency (Redhat #892674).
++
++20130105
++	+ add "-s" option to test/view.c to allow it to start in single-step
++	  mode, reducing size of trace files when it is used for debugging
++	  MinGW changes.
++	+ revert part of 20121222 change to tinfo_driver.c
++	+ add experimental logic in win_driver.c to improve optimization of
++	  screen updates.  This does not yet work with double-width characters,
++	  so it is ifdef'd out for the moment (prompted by report by Erwin
++	  Waterlander regarding screen flicker).
++
++20121229
++	+ fix coverity warnings regarding copying into fixed-size buffers.
++	+ add throw-declarations in the c++ binding per Coverity warning.
++	+ minor changes to new-items for consistent reference to bug-report
++	  numbers.
++
++20121222
++	+ add *.dSYM directories to clean-rule in ncurses directory makefile,
++	  for Mac OS builds.
++	+ add a configure check for gcc option -no-cpp-precomp, which is not
++	  available in all Mac OS X configurations (report by Andras Salamon,
++	  cf: 20011208).
++	+ improve 20021221 workaround for broken acs, handling a case where
++	  that ACS_xxx character is not in the acsc string but there is a known
++	  wide-character which can be used.
++
++20121215
++	+ fix several warnings from clang 3.1 --analyze, includes correcting
++	  a null-pointer check in _nc_mvcur_resume.
++	+ correct display of double-width characters with MinGW port (report
++	  by Erwin Waterlander).
++	+ replace MinGW's wcrtomb(), fixing a problem with _nc_viscbuf 
++	> fixes based on Coverity report:
++	+ correct coloring in test/bs.c
++	+ correct check for 8-bit value in _nc_insert_ch().
++	+ remove dead code in progs/tset.c, test/linedata.h
++	+ add null-pointer checks in lib_tracemse.c, panel.priv.h, and some
++	  test-programs.
++
++20121208
++	+ modify test/knight.c to show the number of choices possible for
++	  each position in automove option, e.g., to allow user to follow
++	  Warnsdorff's rule to solve the puzzle.
++	+ modify test/hanoi.c to show the minimum number of moves possible for
++	  the given number of tiles (prompted by patch by Lucas Gioia).
++	> fixes based on Coverity report:
++	+ remove a few redundant checks.
++	+ correct logic in test/bs.c, when randomly placing a specific type of
++	  ship.
++	+ check return value from remove/unlink in tic.
++	+ check return value from sscanf in test/ncurses.c
++	+ fix a null dereference in c++/cursesw.cc
++	+ fix two instances of uninitialized variables when configuring for the
++	  terminal driver.
++	+ correct scope of variable used in SetSafeOutcWrapper macro.
++	+ set umask when calling mkstemp in tic.
++	+ initialize wbkgrndset() temporary variable when extended-colors are
++	  used.
++
++20121201
++	+ also replace MinGW's wctomb(), fixing a problem with setcchar().
++	+ modify test/view.c to load UTF-8 when built with MinGW by using
++	  regular win32 API because the MinGW functions mblen() and mbtowc()
++	  do not work.
++
++20121124
++	+ correct order of color initialization versus display in some of the
++	  test-programs, e.g., test_addstr.c
++	> fixes based on Coverity report:
++	+ delete windows on exit from some of the test-programs.
++
++20121117
++	> fixes based on Coverity report:
++	+ add missing braces around FreeAndNull in two places.
++	+ various fixes in test/ncurses.c
++	+ improve limit-checks in tinfo/make_hash.c, tinfo/read_entry.c
++	+ correct malloc size in progs/infocmp.c
++	+ guard against negative array indices in test/knight.c
++	+ fix off-by-one limit check in test/color_name.h
++	+ add null-pointer check in progs/tabs.c, test/bs.c, test/demo_forms.c,
++	  test/inchs.c
++	+ fix memory-leak in tinfo/lib_setup.c, progs/toe.c,
++	  test/clip_printw.c, test/demo_menus.c
++	+ delete unused windows in test/chgat.c, test/clip_printw.c,
++	  test/insdelln.c, test/newdemo.c on error-return.
++
++20121110
++	+ modify configure macro CF_INCLUDE_DIRS to put $CPPFLAGS after the
++	  local -I include options in case someone has set conflicting -I
++	  options in $CPPFLAGS (prompted by patch for ncurses/Makefile.in by
++	  Vassili Courzakis).
++	+ modify the ncurses*-config scripts to eliminate relative paths from
++	  the RPATH_LIST variable, e.g., "../lib" as used in installing shared
++	  libraries or executables.
++
++20121102
++	+ realign these related pages:
++	    curs_add_wchstr.3x
++	    curs_addchstr.3x
++	    curs_addstr.3x
++	    curs_addwstr.3x
++	  and fix a long-ago error in curs_addstr.3x which said that a -1
++	  length parameter would only write as much as fit onto one line
++	  (report by Reuben Thomas).
++	+ remove obsolete fallback _nc_memmove() for memmove()/bcopy().
++	+ remove obsolete fallback _nc_strdup() for strdup().
++	+ cancel any debug-rpm in package/ncurses.spec
++	+ reviewed vte-2012, reverted most of the change since it was incorrect
++	  based on testing with tack -TD
++	+ un-cancel the initc in vte-256color, since this was implemented
++	  starting with version 0.20 in 2009 -TD
++
++20121026
++	+ improve malloc/realloc checking (prompted by discussion in Redhat
++	  #866989).
++	+ add ncurses test-program as "ncurses6" to the rpm- and dpkg-scripts.
++	+ updated configure macros CF_GCC_VERSION and CF_WITH_PATHLIST.  The
++	  first corrects pattern used for Mac OS X's customization of gcc.
++
++20121017
++	+ fix change to _nc_scroll_optimize(), which incorrectly freed memory 
++	  (Redhat #866989).
++
++20121013
++	+ add vte-2012, gnome-2012, making these the defaults for vte/gnome
++	  (patch by Christian Persch).
++
++20121006
++	+ improve CF_GCC_VERSION to work around Debian's customization of gcc
++	  --version message.
++	+ improve configure macros as done in byacc:
++	  + drop 2.13 compatibility; use 2.52.xxxx version only since EMX port
++	    has used that for a while.
++	  + add 3rd parameter to AC_DEFINE's to allow autoheader to run, i.e.,
++	    for experimental use.
++	  + remove unused configure macros.
++	+ modify configure script and makefiles to quiet new autoconf warning
++	  for LIBS_TO_MAKE variable.
++	+ modify configure script to show $PATH_SEPARATOR variable.
++	+ update config.guess, config.sub
++
++20120922
++	+ modify setupterm to set its copy of TERM to "unknown" if configured
++	  for the terminal driver and TERM was null or empty.
++	+ modify treatment of TERM variable for MinGW port to allow explicit
++	  use of the windows console driver by checking if $TERM is set to
++	  "#win32con" or an abbreviation of that.
++	+ undo recent change to fallback definition of vsscanf() to build with
++	  older Solaris compilers (cf: 20120728).
++
++20120908
++	+ add test-screens to test/ncurses to show 256-characters at a time,
++	  to help with MinGW port.
++
++20120903
++	+ simplify varargs logic in lib_printw.c; va_copy is no longer needed
++	  there.
++	+ modifications for MinGW port to make wide-character display usable.
++
++20120902
++	+ regenerate configure script (report by Sven Joachim, cf: 20120901).
++
++20120901
++	+ add a null-pointer check in _nc_flush (cf: 20120825).
++	+ fix a case in _nc_scroll_optimize() where the _oldnums_list array
++	  might not be allocated.
++	+ improve comparisons in configure.in for unset shell variables.
++
++20120826
++	+ increase size of ncurses' output-buffer, in case of very small
++	  initial screen-sizes.
++	+ fix evaluation of TERMINFO and TERMINFO_DIRS default values as needed
++	  after changes to use --datarootdir (reports by Gabriele Balducci,
++	  Roumen Petrov).
++
++20120825
++	+ change output buffering scheme, using buffer maintained by ncurses
++	  rather than stdio, to avoid problems with SIGTSTP handling (report
++	  by Brian Bloniarz).
++
++20120811
++	+ update autoconf patch to 2.52.20120811, adding --datarootdir
++	  (prompted by discussion with Erwin Waterlander).
++	+ improve description of --enable-reentrant option in README and the
++	  INSTALL file.
++	+ add nsterm-256color, make this the default nsterm -TD
++	+ remove bw from nsterm-bce, per testing with tack -TD
++
++20120804
++	+ update test/configure, adding check for tinfo library.
++	+ improve limit-checks for the getch fifo (report by Werner Fink).
++	+ fix a remaining mismatch between $with_echo and the symbols updated
++	  for CF_DISABLE_ECHO affecting parameters for mk-2nd.awk (report by
++	  Sven Joachim, cf:  20120317).
++	+ modify followup check for pkg-config's library directory in the
++	  --enable-pc-files option to validate syntax (report by Sven Joachim,
++	  cf: 20110716).
++
++20120728
++	+ correct path for ncurses_mingw.h in include/headers, in case build
++	  is done outside source-tree (patch by Roumen Petrov).
++	+ modify some older xterm entries to align with xterm source -TD
++	+ separate "xterm-old" alias from "xterm-r6" -TD
++	+ add E3 extended capability to xterm-basic and putty -TD
++	+ parenthesize parameters of other macros in curses.h -TD
++	+ parenthesize parameter of COLOR_PAIR and PAIR_NUMBER in curses.h
++	  in case it happens to be a comma-expression, etc.  (patch by Nick
++	  Black).
++
++20120721
++	+ improved form_request_by_name() and menu_request_by_name().
++	+ eliminate two fixed-size buffers in toe.c
++	+ extend use_tioctl() to have expected behavior when use_env(FALSE) and
++	  use_tioctl(TRUE) are called.
++	+ modify ncurses test-program, adding -E and -T options to demonstrate
++	  use_env() versus use_tioctl().
++
++20120714
++	+ add use_tioctl() function (adapted from patch by Werner Fink,
++	  Novell #769788):
++
++20120707
++	+ add ncurses_mingw.h to installed headers (prompted by patch by
++	  Juergen Pfeifer).
++	+ clarify return-codes from wgetch() in response to SIGWINCH (prompted
++	  by Novell #769788).
++	+ modify resizeterm() to always push a KEY_RESIZE onto the fifo, even
++	  if screensize is unchanged.  Modify _nc_update_screensize() to push a
++	  KEY_RESIZE if there was a SIGWINCH, even if it does not call
++	  resizeterm().  These changes eliminate the case where a SIGWINCH is
++	  received, but ERR returned from wgetch or wgetnstr because the screen
++	  dimensions did not change (Novell #769788).
++
++20120630
++	+ add --enable-interop to sample package scripts (suggested by Juergen
++	  Pfeifer).
++	+ update CF_PATH_SYNTAX macro, from mawk changes.
++	+ modify mk-0th.awk to allow for generating llib-ltic, etc., though
++	  some work is needed on cproto to work with lib_gen.c to update
++	  llib-lncurses.
++	+ remove redundant getenv() cal in database-iterator leftover from
++	  cleanup in 20120622 changes (report by Sven Joachim).
++
++20120622
++	+ add -d, -e and -q options to test/demo_terminfo and test/demo_termcap
++	+ fix caching of environment variables in database-iterator (patch by
++	  Philippe Troin, Redhat #831366).
++
++20120616
++	+ add configure check to distinguish clang from gcc to eliminate
++	  warnings about unused command-line parameters when compiler warnings
++	  are enabled.
++	+ improve behavior when updating terminfo entries which are hardlinked
++	  by allowing for the possibility that an alias has been repurposed to
++	  a new primary name.
++	+ fix some strict compiler warnings based on package scripts.
++	+ further fixes for configure check for working poll (Debian #676461).
++
++20120608
++	+ fix an uninitialized variable in -c/-n logic for infocmp changes
++	  (cf: 20120526).
++	+ corrected fix for building c++ binding with clang 3.0 (report/patch
++	  by Richard Yao, Gentoo #417613, cf: 20110409)
++	+ correct configure check for working poll, fixing the case where stdin
++	  is redirected, e.g., in rpm/dpkg builds (Debian #676461).
++	+ add rpm- and dpkg-scripts, to test those build-environments.
++	  The resulting packages are used only for testing.
++
++20120602
++	+ add kdch1 aka "Remove" to vt220 and vt220-8 entries -TD
++	+ add kdch1, etc., to qvt108 -TD
++	+ add dl1/il1 to some entries based on dl/il values -TD
++	+ add dl to simpleterm -TD
++	+ add consistency-checks in tic for insert-line vs delete-line
++	  controls, and insert/delete-char keys
++	+ correct no-leaks logic in infocmp when doing comparisons, fixing
++	  duplicate free of entries given via the command-line, and freeing
++	  entries loaded from the last-but-one of files specified on the
++	  command-line.
++	+ add kdch1 to wsvt25 entry from NetBSD CVS (reported by David Lord,
++	  analysis by Martin Husemann).
++	+ add cnorm/civis to wsvt25 entry from NetBSD CVS (report/analysis by
++	  Onno van der Linden).
++
++20120526
++	+ extend -c and -n options of infocmp to allow comparing more than two
++	  entries.
++	+ correct check in infocmp for number of terminal names when more than
++	  two are given.
++	+ correct typo in curs_threads.3x (report by Yanhui Shen on
++	  freebsd-hackers mailing list).
++
++20120512
++	+ corrected 'op' for bterm (report by Samuel Thibault) -TD
++	+ modify test/background.c to demonstrate a background character
++	  holding a colored ACS_HLINE.  The behavior differs from SVr4 due to
++	  the thick- and double-line extension (cf: 20091003).
++	+ modify handling of acs characters in PutAttrChar to avoid mapping an
++	  unmapped character to a space with A_ALTCHARSET set.
++	+ rewrite vt520 entry based on vt420 -TD
++
++20120505
++	+ remove p6 (bold) from opus3n1+ for consistency -TD
++	+ remove acs stuff from env230 per clues in Ingres termcap -TD
++	+ modify env230 sgr/sgr0 to match other capabilities -TD
++	+ modify smacs/rmacs in bq300-8 to match sgr/sgr0 -TD
++	+ make sgr for dku7202 agree with other caps -TD
++	+ make sgr for ibmpc agree with other caps -TD
++	+ make sgr for tek4107 agree with other caps -TD
++	+ make sgr for ndr9500 agree with other caps -TD
++	+ make sgr for sco-ansi agree with other caps -TD
++	+ make sgr for d410 agree with other caps -TD
++	+ make sgr for d210 agree with other caps -TD
++	+ make sgr for d470c, d470c-7b agree with other caps -TD
++	+ remove redundant AC_DEFINE for NDEBUG versus Makefile definition.
++	+ fix a back-link in _nc_delink_entry(), which is needed if ncurses is
++	  configured with --enable-termcap and --disable-getcap.
++
++20120428
++	+ fix some inconsistencies between vt320/vt420, e.g., cnorm/civis -TD
++	+ add eslok flag to dec+sl -TD
++	+ dec+sl applies to vt320 and up -TD
++	+ drop wsl width from xterm+sl -TD
++	+ reuse xterm+sl in putty and nsca-m -TD
++	+ add ansi+tabs to vt520 -TD
++	+ add ansi+enq to vt220-vt520 -TD
++	+ fix a compiler warning in example in ncurses-intro.doc (Paul Waring).
++	+ added paragraph in keyname manpage telling how extended capabilities
++	  are interpreted as key definitions.
++	+ modify tic's check of conflicting key definitions to include extended
++	  capability strings in addition to the existing check on predefined
++	  keys.
++
++20120421
++	+ improve cleanup of temporary files in tic using atexit().
++	+ add msgr to vt420, similar DEC vtXXX entries -TD
++	+ add several missing vt420 capabilities from vt220 -TD
++	+ factor out ansi+pp from several entries -TD
++	+ change xterm+sl and xterm+sl-twm to include only the status-line
++	  capabilities and not "use=xterm", making them more generally useful
++	  as building-blocks -TD
++	+ add dec+sl building block, as example -TD
++
++20120414
++	+ add XT to some terminfo entries to improve usefulness for other
++	  applications than screen, which would like to pretend that xterm's
++	  title is a status-line.  -TD
++	+ change use-clauses in ansi-mtabs, hp2626, and hp2622 based on review
++	  of ordering and overrides -TD
++	+ add consistency check in tic for screen's "XT" capability.
++	+ add section in terminfo.src summarizing the user-defined capabilities
++	  used in that file -TD
++
++20120407
++	+ fix an inconsistency between tic/infocmp "-x" option; tic omits all
++	  non-standard capabilities, while infocmp was ignoring only the user
++	  definable capabilities.
++	+ improve special case in tic parsing of description to allow it to be
++	  followed by terminfo capabilities.  Previously the description had to
++	  be the last field on an input line to allow tic to distinguish
++	  between termcap and terminfo format while still allowing commas to be
++	  embedded in the description.
++	+ correct variable name in gen_edit.sh which broke configurability of
++	  the --with-xterm-kbs option.
++	+ revert 2011-07-16 change to "linux" alias, return to "linux2.2" -TD
++	+ further amend 20110910 change, providing for configure-script
++	  override of the "linux" terminfo entry to install and changing the
++	  default for that to "linux2.2" (Debian #665959).
++
++20120331
++	+ update Ada95/configure to use CF_DISABLE_ECHO (cf: 20120317).
++	+ correct order of use-clauses in st-256color -TD
++	+ modify configure script to look for gnatgcc if the Ada95 binding
++	  is built, in preference to the default gcc/cc (suggested by
++	  Nicolas Boulenguez).
++	+ modify configure script to ensure that the same -On option used for
++	  the C compiler in CFLAGS is used for ADAFLAGS rather than simply
++	  using "-O3" (suggested by Nicolas Boulenguez)
++
++20120324
++	+ amend an old fix so that next_char() exits properly for empty files,
++	  e.g., from reading /dev/null (cf: 20080804).
++	+ modify tic so that it can read from the standard input, or from
++	  a character device.  Because tic uses seek's, this requires writing
++	  the data to a temporary file first (prompted by remark by Sven
++	  Joachim) (cf: 20000923).
++
++20120317
++	+ correct a check made in lib_napms.c, so that terminfo applications
++	  can again use napms() (cf: 20110604).
++	+ add a note in tic.h regarding required casts for ABSENT_BOOLEAN
++	  (cf: 20040327).
++	+ correct scripting for --disable-echo option in test/configure.
++	+ amend check for missing c++ compiler to work when no error is
++	  reported, and no variables set (cf: 20021206).
++	+ add/use configure macro CF_DISABLE_ECHO.
++
++20120310
++	+ fix some strict compiler warnings for abi6 and 64-bits.
++	+ use begin_va_copy/end_va_copy macros in lib_printw.c (cf: 20120303).
++	+ improve a limit-check in infocmp.c (Werner Fink):
++
++20120303
++	+ minor tidying of terminfo.tail, clarify reason for limitation
++	  regarding mapping of \0 to \200
++	+ minor improvement to _nc_copy_termtype(), using memcpy to replace
++	  loops.
++	+ fix no-leaks checking in test/demo_termcap.c to account for multiple
++	  calls to setupterm().
++	+ modified the libgpm change to show previous load as a problem in the
++	  debug-trace.
++	> merge some patches from OpenSUSE rpm (Werner Fink):
++	+ ncurses-5.7-printw.dif, fixes for varargs handling in lib_printw.c
++	+ ncurses-5.7-gpm.dif, do not dlopen libgpm if already loaded by
++	  runtime linker
++	+ ncurses-5.6-fallback.dif, do not free arrays and strings from static
++	  fallback entries
++
++20120228
++	+ fix breakage in tic/infocmp from 20120225 (report by Werner Fink).
++
++20120225
++	+ modify configure script to allow creating dll's for MinGW when
++	  cross-compiling.
++	+ add --enable-string-hacks option to control whether strlcat and
++	  strlcpy may be used.  The same issue applies to OpenBSD's warnings
++	  about snprintf, noting that this function is weakly standardized.
++	+ add configure checks for strlcat, strlcpy and snprintf, to help
++	  reduce bogus warnings with OpenBSD builds.
++	+ build-fix for OpenBSD 4.9 to supply consistent intptr_t declaration
++	  (cf:20111231)
++	+ update config.guess, config.sub
++
++20120218
++	+ correct CF_ETIP_DEFINES configure macro, making it exit properly on
++	  the first success (patch by Pierre Labastie).
++	+ improve configure macro CF_MKSTEMP by moving existence-check for
++	  mkstemp out of the AC_TRY_RUN, to help with cross-compiles.
++	+ improve configure macro CF_FUNC_POLL from luit changes to detect
++	  broken implementations, e.g., with Mac OS X.
++	+ add configure option --with-tparm-arg
++	+ build-fix for MinGW cross-compiling, so that make_hash does not
++	  depend on TTY definition (cf: 20111008).
++
++20120211
++	+ make sgr for xterm-pcolor agree with other caps -TD
++	+ make sgr for att5425 agree with other caps -TD
++	+ make sgr for att630 agree with other caps -TD
++	+ make sgr for linux entries agree with other caps -TD
++	+ make sgr for tvi9065 agree with other caps -TD
++	+ make sgr for ncr260vt200an agree with other caps -TD
++	+ make sgr for ncr160vt100pp agree with other caps -TD
++	+ make sgr for ncr260vt300an agree with other caps -TD
++	+ make sgr for aaa-60-dec-rv, aaa+dec agree with other caps -TD
++	+ make sgr for cygwin, cygwinDBG agree with other caps -TD
++	+ add configure option --with-xterm-kbs to simplify configuration for
++	  Linux versus most other systems.
++
++20120204
++	+ improved tic -D option, avoid making target directory and provide
++	  better diagnostics.
++
++20120128
++	+ add mach-gnu (Debian #614316, patch by Samuel Thibault)
++	+ add mach-gnu-color, tweaks to mach-gnu terminfo -TD
++	+ make sgr for sun-color agree with smso -TD
++	+ make sgr for prism9 agree with other caps -TD
++	+ make sgr for icl6404 agree with other caps -TD
++	+ make sgr for ofcons agree with other caps -TD
++	+ make sgr for att5410v1, att4415, att620 agree with other caps -TD
++	+ make sgr for aaa-unk, aaa-rv agree with other caps -TD
++	+ make sgr for avt-ns agree with other caps -TD
++	+ amend fix intended to separate fixups for acsc to allow "tic -cv" to
++	  give verbose warnings (cf:  20110730). 
++	+ modify misc/gen-edit.sh to make the location of the tabset directory
++	  consistent with misc/Makefile.in, i.e., using ${datadir}/tabset
++	  (Debian #653435, patch by Sven Joachim).
++
++20120121
++	+ add --with-lib-prefix option to allow configuring for old/new flavors
++	  of OS/2 EMX.
++	+ modify check for gnat version to allow for year, as used in FreeBSD
++	  port.
++	+ modify check_existence() in db_iterator.c to simply check if the
++	  path is a directory or file, according to the need.  Checking for
++	  directory size also gives no usable result with OS/2 (cf: 20120107).
++	+ support OS/2 kLIBC (patch by KO Myung-Han).
++
++20120114
++	+ several improvements to test/movewindow.c (prompted by discussion on
++	  Linux Mint forum):
++	  + modify movement commands to make them continuous
++	  + rewrote the test for mvderwin
++	  + rewrote the test for recursive mvwin
++	+ split-out reusable CF_WITH_NCURSES_ETC macro in test/configure.in
++	+ updated configure macro CF_XOPEN_SOURCE, build-fixes for Mac OS X
++	  and OpenBSD.
++	+ regenerated html manpages.
++
++20120107
++	+ various improvments for MinGW (Juergen Pfeifer):
++	  + modify stat() calls to ignore the st_size member
++	  + drop mk-dlls.sh script.
++	  + change recommended regular expression library.
++	  + modify rain.c to allow for threaded configuraton.
++	  + modify tset.c to allow for case when size-change logic is not used. 
++
++20111231
++	+ modify toe's report when -a and -s options are combined, to add
++	  a column showing which entries belong to a given database.
++	+ add -s option to toe, to sort its output.
++	+ modify progs/toe.c, simplifying use of db-iterator results to use
++	  caching improvements from 20111001 and 20111126.
++	+ correct generation of pc-files when ticlib or termlib options are
++	  given to rename the corresponding tic- or tinfo-libraries (report
++	  by Sven Joachim).
++
++20111224
++	+ document a portability issue with tput, i.e., that scripts which work
++	  with ncurses may fail in other implementations that do no parameter
++	  analysis.
++	+ add putty-sco entry -TD
++
++20111217
++	+ review/fix places in manpages where --program-prefix configure option
++	  was not being used.
++	+ add -D option to infocmp, to show the database locations that it
++	  could use.
++	+ fix build for the special case where term-driver, ticlib and termlib
++	  are all enabled.  The terminal driver depends on a few features in
++	  the base ncurses library, so tic's dependencies include both ncurses
++	  and termlib.
++	+ fix build work for term-driver when --enable-wgetch-events option is
++	  enabled.
++	+ use <stdint.h> types to fix some questionable casts to void*.
++
++20111210
++	+ modify configure script to check if thread library provides
++	  pthread_mutexattr_settype(), e.g., not provided by Solaris 2.6
++	+ modify configure script to suppress check to define _XOPEN_SOURCE
++	  for IRIX64, since its header files have a conflict versus
++	  _SGI_SOURCE.
++	+ modify configure script to add ".pc" files for tic- and
++	  tinfo-libraries, which were omitted in recent change (cf: 20111126).
++	+ fix inconsistent checks on $PKG_CONFIG variable in configure script.
++
++20111203
++	+ modify configure-check for etip.h dependencies, supplying a temporary
++	  copy of ncurses_dll.h since it is a generated file (prompted by
++	  Debian #646977).
++	+ modify CF_CPP_PARAM_INIT "main" function to work with current C++.
++
++20111126
++	+ correct database iterator's check for duplicate entries
++	  (cf: 20111001).
++	+ modify database iterator to ignore $TERMCAP when it is not an
++	  absolute pathname.
++	+ add -D option to tic, to show the database locations that it could
++	  use.
++	+ improve description of database locations in tic manpage.
++	+ modify the configure script to generate a list of the ".pc" files to
++	  generate, rather than deriving the list from the libraries which have
++	  been built (patch by Mike Frysinger).
++	+ use AC_CHECK_TOOLS in preference to AC_PATH_PROGS when searching for
++	  ncurses*-config, e.g., in Ada95/configure and test/configure (adapted
++	  from patch by Mike Frysinger).
++
++20111119
++	+ remove obsolete/conflicting fallback definition for _POSIX_SOURCE
++	  from curses.priv.h, fixing a regression with IRIX64 and Tru64
++	  (cf: 20110416)
++	+ modify _nc_tic_dir() to ensure that its return-value is nonnull,
++	  i.e., the database iterator was not initialized.  This case is needed
++	  to when tic is translating to termcap, rather than loading the
++	  database (cf:  20111001).
++
++20111112
++	+ add pccon entries for OpenBSD console (Alexei Malinin).
++	+ build-fix for OpenBSD 4.9 with gcc 4.2.1, setting _XOPEN_SOURCE to
++	  600 to work around inconsistent ifdef'ing of wcstof between C and
++	  C++ header files.
++	+ modify capconvert script to accept more than exact match on "xterm",
++	  e.g., the "xterm-*" variants, to exclude from the conversion (patch
++	  by Robert Millan).
++	+ add -lc_r as alternative for -lpthread, allows build of threaded code
++	  in older FreeBSD machines.
++	+ build-fix for MirBSD, which fails when either _XOPEN_SOURCE or
++	  _POSIX_SOURCE are defined.
++	+ fix a typo misc/Makefile.in, used in uninstalling pc-files.
++
++20111030
++	+ modify make_db_path() to allow creating "terminfo.db" in the same
++	  directory as an existing "terminfo" directory.  This fixes a case
++	  where switching between hashed/filesystem databases would cause the
++	  new hashed database to be installed in the next best location -
++	  root's home directory.
++	+ add variable cf_cv_prog_gnat_correct to those passed to
++	  config.status, fixing a problem with Ada95 builds (cf: 20111022).
++	+ change feature test from _XPG5 to _XOPEN_SOURCE in two places, to
++	  accommodate broken implementations for _XPG6.
++	+ eliminate usage of NULL symbol from etip.h, to reduce header
++	  interdependencies.
++	+ add configure check to decide when to add _XOPEN_SOURCE define to
++	  compiler options, i.e., for Solaris 10 and later (cf: 20100403).
++	  This is a workaround for gcc 4.6, which fails to build the c++
++	  binding if that symbol is defined by the application, due to
++	  incorrectly combining the corresponding feature test macros
++	  (report by Peter Kruse).
++
++20111022
++	+ correct logic for discarding mouse events, retaining the partial
++	  events used to build up click, double-click, etc, until needed
++	  (cf: 20110917).
++	+ fix configure script to avoid creating unused Ada95 makefile when
++	  gnat does not work.
++	+ cleanup width-related gcc 3.4.3 warnings for 64-bit platform, for the
++	  internal functions of libncurses.  The external interface of courses
++	  uses bool, which still produces these warnings.
++
++20111015
++	+ improve description of --disable-tic-depends option to make it
++	  clear that it may be useful whether or not the --with-termlib
++	  option is also given (report by Sven Joachim).
++	+ amend termcap equivalent for set_pglen_inch to use the X/Open
++	  "YI" rather than the obsolete Solaris 2.5 "sL" (cf: 990109).
++	+ improve manpage for tgetent differences from termcap library.
++
++20111008
++	+ moved static data from db_iterator.c to lib_data.c
++	+ modify db_iterator.c for memory-leak checking, fix one leak.
++	+ modify misc/gen-pkgconfig.in to use Requires.private for the parts
++	  of ncurses rather than Requires, as well as Libs.private for the
++	  other library dependencies (prompted by Debian #644728).
++
++20111001
++	+ modify tic "-K" option to only set the strict-flag rather than force
++	  source-output.  That allows the same flag to control the parser for
++	  input and output of termcap source.
++	+ modify _nc_getent() to ignore backslash at the end of a comment line,
++	  making it consistent with ncurses' parser.
++	+ restore a special-case check for directory needed to make termcap
++	  text files load as if they were databases (cf: 20110924).
++	+ modify tic's resolution/collision checking to attempt to remove the
++	  conflicting alias from the second entry in the pair, which is
++	  normally following in the source file.  Also improved the warning
++	  message to make it simpler to see which alias is the problem.
++	+ improve performance of the database iterator by caching search-list.
++
++20110925
++	+ add a missing "else" in changes to _nc_read_tic_entry().
++
++20110924
++	+ modify _nc_read_tic_entry() so that hashed-database is checked before
++	  filesystem.
++	+ updated CF_CURSES_LIBS check in test/configure script.
++	+ modify configure script and makefiles to split TIC_ARGS and
++	  TINFO_ARGS into pieces corresponding to LDFLAGS and LIBS variables,
++	  to help separate searches for tic- and tinfo-libraries (patch by Nick
++	  Alcock aka "Nix").
++	+ build-fix for lib_mouse.c changes (cf: 20110917).
++
++20110917
++	+ fix compiler warning for clang 2.9
++	+ improve merging of mouse events (integrated patch by Damien
++	  Guibouret).
++	+ correct mask-check used in lib_mouse for wheel mouse buttons 4/5
++	  (patch by Damien Guibouret).
++
++20110910
++	+ modify misc/gen_edit.sh to select a "linux" entry which works with
++	  the current kernel rather than assuming it is always "linux3.0"
++	  (cf: 20110716).
++	+ revert a change to getmouse() which had the undesirable side-effect
++	  of suppressing button-release events (report by Damien Guibouret,
++	  cf: 20100102).
++	+ add xterm+kbs fragment from xterm #272 -TD
++	+ add configure option --with-pkg-config-libdir to provide control over
++	  the actual directory into which pc-files are installed, do not use
++	  the pkg-config environment variables (discussion with Frederic L W
++	  Meunier).
++	+ add link to mailing-list archive in announce.html.in, as done in
++	  FAQ (prompted by question by Andrius Bentkus).
++	+ improve manpage install by adjusting the "#include" examples to
++	  show the ncurses-subdirectory used when --disable-overwrite option
++	  is used.
++	+ install an alias for "curses" to the ncurses manpage, tied to the
++	  --with-curses-h configure option (suggested by Reuben Thomas).
++
++20110903
++	+ propagate error-returns from wresize, i.e., the internal
++	  increase_size and decrease_size functions through resize_term (report
++	  by Tim van der Molen, cf:  20020713).
++	+ fix typo in tset manpage (patch by Sven Joachim).
++
++20110820
++	+ add a check to ensure that termcap files which might have "^?" do
++	  not use the terminfo interpretation as "\177".
++	+ minor cleanup of X-terminal emulator section of terminfo.src -TD
++	+ add terminator entry -TD
++	+ add simpleterm entry -TD
++	+ improve wattr_get macros by ensuring that if the window pointer is
++	  null, then the attribute and color values returned will be zero
++	  (cf: 20110528).
++
++20110813
++	+ add substitution for $RPATH_LIST to misc/ncurses-config.in
++	+ improve performance of tic with hashed-database by caching the
++	  database connection, using atexit() to cleanup.
++	+ modify treatment of 2-character aliases at the beginning of termcap
++	  entries so they are not counted in use-resolution, since these are
++	  guaranteed to be unique.  Also ignore these aliases when reporting
++	  the primary name of the entry (cf: 20040501)
++	+ double-check gn (generic) flag in terminal descriptions to
++	  accommodate old/buggy termcap databases which misused that feature.
++	+ minor fixes to _nc_tgetent(), ensure buffer is initialized even on
++	  error-return.
++
++20110807
++	+ improve rpath fix from 20110730 by ensuring that the new $RPATH_LIST
++	  variable is defined in the makefiles which use it.
++	+ build-fix for DragonFlyBSD's pkgsrc in test/configure script.
++	+ build-fixes for NetBSD 5.1 with termcap support enabled.
++	+ corrected k9 in dg460-ansi, add other features based on manuals -TD
++	+ improve trimming of whitespace at the end of terminfo/termcap output
++	  from tic/infocmp.
++	+ when writing termcap source, ensure that colons in the description
++	  field are translated to a non-delimiter, i.e., "=".
++	+ add "-0" option to tic/infocmp, to make the termcap/terminfo source
++	  use a single line.
++	+ add a null-pointer check when handling the $CC variable.
++
++20110730
++	+ modify configure script and makefiles in c++ and progs to allow the
++	  directory used for rpath option to be overridden, e.g., to work
++	  around updates to the variables used by tic during an install.
++	+ add -K option to tic/infocmp, to provide stricter BSD-compatibility
++	  for termcap output.
++	+ add _nc_strict_bsd variable in tic library which controls the
++	  "strict" BSD termcap compatibility from 20110723, plus these
++	  features:
++	  + allow escapes such as "\8" and "\9" when reading termcap
++	  + disallow "\a", "\e", "\l", "\s" and "\:" escapes when reading
++	    termcap files, passing through "a", "e", etc.
++	  + expand "\:" as "\072" on output.
++	+ modify _nc_get_token() to reset the token's string value in case
++	  there is a string-typed token lacking the "=" marker.
++	+ fix a few memory leaks in _nc_tgetent.
++	+ fix a few places where reading from a termcap file could refer to
++	  freed memory.
++	+ add an overflow check when converting terminfo/termcap numeric
++	  values, since terminfo stores those in a short, and they must be
++	  positive.
++	+ correct internal variables used for translating to termcap "%>"
++	  feature, and translating from termcap %B to terminfo, needed by
++	  tctest (cf: 19991211).
++	+ amend a minor fix to acsc when loading a termcap file to separate it
++	  from warnings needed for tic (cf: 20040710)
++	+ modify logic in _nc_read_entry() and _nc_read_tic_entry() to allow
++	  a termcap file to be handled via TERMINFO_DIRS.
++	+ modify _nc_infotocap() to include non-mandatory padding when
++	  translating to termcap.
++	+ modify _nc_read_termcap_entry(), passing a flag in the case where
++	  getcap is used, to reduce interactive warning messages.
++
++20110723
++	+ add a check in start_color() to limit color-pairs to 256 when
++	  extended colors are not supported (patch by David Benjamin).
++	+ modify setcchar to omit no-longer-needed OR'ing of color pair in
++	  the SetAttr() macro (patch by David Benjamin).
++	+ add kich1 to sun terminfo entry (Yuri Pankov)
++	+ use bold rather than reverse for smso in sun-color terminfo entry
++	  (Yuri Pankov).
++	+ improve generation of termcap using tic/infocmp -C option, e.g.,
++	  to correspond with 4.2BSD (prompted by discussion with Yuri Pankov
++	  regarding Schilling's test program):
++	  + translate %02 and %03 to %2 and %3 respectively.
++	  + suppress string capabilities which use %s, not supported by tgoto
++	  + use \040 rather than \s
++	  + expand null characters as \200 rather than \0
++	+ modify configure script to support shared libraries for DragonFlyBSD.
++
++20110716
++	+ replace an assert() in _nc_Free_Argument() with a regular null
++	  pointer check (report/analysis by Franjo Ivancic).
++	+ modify configure --enable-pc-files option to take into account the
++	  PKG_CONFIG_PATH variable (report by Frederic L W Meunier).
++	+ add/use xterm+tmux chunk from xterm #271 -TD
++	+ resync xterm-new entry from xterm #271 -TD
++	+ add E3 extended capability to linux-basic (Miroslav Lichvar)
++	+ add linux2.2, linux2.6, linux3.0 entries to give context for E3 -TD
++	+ add SI/SO change to linux2.6 entry (Debian #515609) -TD
++	+ fix inconsistent tabset path in pcmw (Todd C. Miller).
++	+ remove a backslash which continued comment, obscuring altos3
++	  definition with OpenBSD toolset (Nicholas Marriott).
++
++20110702
++	+ add workaround from xterm #271 changes to ensure that compiler flags
++	  are not used in the $CC variable.
++	+ improve support for shared libraries, tested with AIX 5.3, 6.1 and
++	  7.1 with both gcc 4.2.4 and cc.
++	+ modify configure checks for AIX to include release 7.x
++	+ add loader flags/libraries to libtool options so that dynamic loading
++	  works properly, adapted from ncurses-5.7-ldflags-with-libtool.patch
++	  at gentoo prefix repository (patch by Michael Haubenwallner).
++
++20110626
++	+ move include of nc_termios.h out of term_entry.h, since the latter
++	  is installed, e.g., for tack while the former is not (report by
++	  Sven Joachim).
++
++20110625
++	+ improve cleanup() function in lib_tstp.c, using _exit() rather than
++	  exit() and checking for SIGTERM rather than SIGQUIT (prompted by
++	  comments forwarded by Nicholas Marriott).
++	+ reduce name pollution from term.h, moving fallback #define's for
++	  tcgetattr(), etc., to new private header nc_termios.h (report by
++	  Sergio NNX).
++	+ two minor fixes for tracing (patch by Vassili Courzakis).
++	+ improve trace initialization by starting it in use_env() and
++	  ripoffline().
++	+ review old email, add details for some changelog entries.
++
++20110611
++	+ update minix entry to minix 3.2 (Thomas Cort).
++	+ fix a strict compiler warning in change to wattr_get (cf: 20110528).
++
++20110604
++	+ fixes for MirBSD port:
++	  + set default prefix to /usr.
++	  + add support for shared libraries in configure script.
++	  + use S_ISREG and S_ISDIR consistently, with fallback definitions.
++	+ add a few more checks based on ncurses/link_test.
++	+ modify MKlib_gen.sh to handle sp-funcs renaming of NCURSES_OUTC type.
++
++20110528
++	+ add case to CF_SHARED_OPTS for Interix (patch by Markus Duft).
++	+ used ncurses/link_test to check for behavior when the terminal has
++	  not been initialized and when an application passes null pointers
++	  to the library.  Added checks to cover this (prompted by Redhat
++	  #707344).
++	+ modify MKlib_gen.sh to make its main() function call each function
++	  with zero parameters, to help find inconsistent checking for null
++	  pointers, etc.
++
++20110521
++	+ fix warnings from clang 2.7 "--analyze"
++
++20110514
++	+ compiler-warning fixes in panel and progs.
++	+ modify CF_PKG_CONFIG macro, from changes to tin -TD
++	+ modify CF_CURSES_FUNCS configure macro, used in test directory
++	  configure script:
++	  + work around (non-optimizer) bug in gcc 4.2.1 which caused
++	    test-expression to be omitted from executable.
++	  + force the linker to see a link-time expression of a symbol, to
++	    help work around weak-symbol issues.
++
++20110507
++	+ update discussion of MKfallback.sh script in INSTALL; normally the
++	  script is used automatically via the configured makefiles.  However
++	  there are still occasions when it might be used directly by packagers
++	  (report by Gunter Schaffler).
++	+ modify misc/ncurses-config.in to omit the "-L" option from the
++	  "--libs" output if the library directory is /usr/lib.
++	+ change order of tests for curses.h versus ncurses.h headers in the
++	  configure scripts for Ada95 and test-directories, to look for
++	  ncurses.h, from fixes to tin -TD
++	+ modify ncurses/tinfo/access.c to account for Tandem's root uid
++	  (report by Joachim Schmitz).
++
++20110430
++	+ modify rules in Ada95/src/Makefile.in to ensure that the PIC option
++	  is not used when building a static library (report by Nicolas
++	  Boulenguez):
++	+ Ada95 build-fix for big-endian architectures such as sparc.  This
++	  undoes one of the fixes from 20110319, which added an "Unused" member
++	  to representation clauses, replacing that with pragmas to suppress
++	  warnings about unused bits (patch by Nicolas Boulenguez):
++
++20110423
++	+ add check in test/configure for use_window, use_screen.
++	+ add configure-checks for getopt's variables, which may be declared
++	  as different types on some Unix systems.
++	+ add check in test/configure for some legacy curses types of the
++	  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
++	  assume_default_colors() and use_default_colors().
++
++20110416
++	+ modify configure script/source-code to only define _POSIX_SOURCE if
++	  the checks for sigaction and/or termios fail, and if _POSIX_C_SOURCE
++	  and _XOPEN_SOURCE are undefined (report by Valentin Ochs).
++	+ update config.guess, config.sub
++
++20110409
++	+ fixes to build c++ binding with clang 3.0 (patch by Alexander
++	  Kolesen).
++	+ add check for unctrl.h in test/configure, to work around breakage in
++	  some ncurses packages.
++	+ add "--disable-widec" option to test/configure script.
++	+ add "--with-curses-colr" and "--with-curses-5lib" options to the
++	  test/configure script to address testing with very old machines.
++
+ 20110404 5.9 release for upload to ftp.gnu.org
+ 
+ 20110402
+@@ -100,7 +1168,7 @@ it is not possible to add this information.
+ 	+ modify configure script to provide value for HTML_DIR in
+ 	  Ada95/gen/Makefile.in, which depends on whether the Ada95 binding is
+ 	  distributed separately (report by Nicolas Boulenguez).
+-	+ modify configure script to add -g and/or -O3 to ADAFLAGS if the
++	+ modify configure script to add "-g" and/or "-O3" to ADAFLAGS if the
+ 	  CFLAGS for the build has these options.
+ 	+ amend change from 20070324, to not add 1 to the result of getmaxx
+ 	  and getmaxy in the Ada binding (report by Nicolas Boulenguez for
+@@ -155,7 +1223,7 @@ it is not possible to add this information.
+ 20110212
+ 	+ regenerated html manpages.
+ 	+ use _tracef() in show_where() function of tic, to work correctly with
+-	  special case of trace configuration. 
++	  special case of trace configuration.
+ 
+ 20110205
+ 	+ add xterm-utf8 entry as a demo of the U8 feature -TD
+@@ -219,7 +1287,7 @@ it is not possible to add this information.
+ 	  version which works with termcap.
+ 	+ remove obsolete emacs "Local Variables" section from documentation
+ 	  (request by Sven Joachim).
+-	+ update doc/html/index.html to include NCURSES-Programming-HOWTO.html 
++	+ update doc/html/index.html to include NCURSES-Programming-HOWTO.html
+ 	  (report by Sven Joachim).
+ 
+ 20101128
+@@ -294,8 +1362,8 @@ it is not possible to add this information.
+ 	  Sven Joachim).
+ 	+ add parameterized cursor-controls to linux-basic (report by Dae) -TD
+ 	> patch by Juergen Pfeifer:
+-	+ document how to build 32-bit libraries in README.MinGW 
+-	+ fixes to filename computation in mk-dlls.sh.in 
++	+ document how to build 32-bit libraries in README.MinGW
++	+ fixes to filename computation in mk-dlls.sh.in
+ 	+ use POSIX locale in mk-dlls.sh.in rather than en_US (report by Sven
+ 	  Joachim).
+ 	+ add a check in mk-dlls.sh.in to obtain the size of a pointer to
+@@ -478,7 +1546,7 @@ it is not possible to add this information.
+ 20100417
+ 	+ modify _nc_capcmp() to work with cancelled strings.
+ 	+ correct translation of "^" in _nc_infotocap(), used to transform
+-	  terminfo to termcap strings 
++	  terminfo to termcap strings
+ 	+ add configure --disable-rpath-hack, to allow disabling the feature
+ 	  which adds rpath options for libraries in unusual places.
+ 	+ improve CF_RPATH_HACK_2 by checking if the rpath option for a given
+@@ -1533,8 +2601,8 @@ it is not possible to add this information.
+ 	  that library.
+ 	+ add/modify null-pointer checks in several functions for SP and/or
+ 	  the WINDOW* parameter (report by Thorben Krueger).
+-	+ fixes for field_buffer() in formw library (see Redhat Bugzilla
+-	  #310071, patches by Miroslav Lichvar).
++	+ fixes for field_buffer() in formw library (see Redhat #310071,
++	  patches by Miroslav Lichvar).
+ 	+ improve performance of NCURSES_CHAR_EQ code (patch by Miroslav
+ 	  Lichvar).
+ 	+ update/improve mlterm and rxvt terminfo entries, e.g., for
+@@ -1645,7 +2713,7 @@ it is not possible to add this information.
+ 	+ modify configure script to quiet c++ build with libtool when the
+ 	  --disable-echo option is used.
+ 	+ modify configure script to disable ada95 if libtool is selected,
+-	  writing a warning message (addresses FreeBSD ports/114493).
++	  writing a warning message (addresses FreeBSD #114493).
+ 	+ update config.guess, config.sub
+ 
+ 20070707
+@@ -2130,8 +3198,7 @@ it is not possible to add this information.
+ 	+ workaround for 20050806 ifdef's change to allow visbuf.c to compile
+ 	  when using --with-termlib --with-trace options.
+ 	+ improve tgetstr() by making the return value point into the user's
+-	  buffer, if provided (patch by Miroslav Lichvar (see Redhat Bugzilla
+-	  #202480)).
++	  buffer, if provided (patch by Miroslav Lichvar (see Redhat #202480)).
+ 	+ correct libraries needed for foldkeys (report by Stanislav Ievlev)
+ 
+ 20060826
+@@ -2144,10 +3211,10 @@ it is not possible to add this information.
+ 	  source output (Debian #378783).
+ 	+ modify configure script to ensure that if the C compiler is used
+ 	  rather than the loader in making shared libraries, the $(CFLAGS)
+-	  variable is also used (Redhat Bugzilla #199369).
++	  variable is also used (Redhat #199369).
+ 	+ port hashed-db code to db2 and db3.
+ 	+ fix a bug in tgetent() from 20060625 and 20060715 changes
+-	  (patch/analysis by Miroslav Lichvar (see Redhat Bugzilla #202480)).
++	  (patch/analysis by Miroslav Lichvar (see Redhat #202480)).
+ 
+ 20060805
+ 	+ updated xterm function-keys terminfo to match xterm #216 -TD
+@@ -2939,7 +4006,7 @@ it is not possible to add this information.
+ 	  of cur_term if the same output was selected.  This now reuses it only
+ 	  when setupterm() is called from tgetent(), which has no notion of
+ 	  separate SCREENs.  Note that tgetent() must be called after initscr()
+-	  or newterm() to use this feature (Redhat Bugzilla #140326).
++	  or newterm() to use this feature (Redhat #140326).
+ 	+ add a check in CF_BUILD_CC macro to ensure that developer has given
+ 	  the --with-build-cc option when cross-compiling (report by Alexandre
+ 	  Campo).
+@@ -3032,7 +4099,7 @@ it is not possible to add this information.
+ 	  entries, e.g., so it can analyze the xterm-8bit entry.
+ 	+ add morphos terminfo entry, improve amiga-8bit entry (Pavel Fedin).
+ 	+ correct translation of "%%" in terminfo format to termcap, e.g.,
+-	  using "tic -C" (Redhat Bugzilla #130921).
++	  using "tic -C" (Redhat #130921).
+ 	+ modified configure script CF_XOPEN_SOURCE macro to ensure that if
+ 	  it defines _POSIX_C_SOURCE, that it defines it to a specific value
+ 	  (comp.os.stratus newsgroup comment).
+@@ -3043,9 +4110,9 @@ it is not possible to add this information.
+ 	  However that did find a coding error in Assume_Default_Colors().
+ 	+ modify several terminfo entries to ensure xterm mouse and cursor
+ 	  visibility are reset in rs2 string:  hurd, putty, gnome,
+-	  konsole-base, mlterm, Eterm, screen (Debian #265784, #55637).  The
+-	  xterm entries are left alone - old ones for compatibility, and the
+-	  new ones do not require this change. -TD
++	  konsole-base, mlterm, Eterm, screen (Debian #265784, Debian #55637). 
++	  The xterm entries are left alone - old ones for compatibility, and
++	  the new ones do not require this change. -TD
+ 
+ 20040814
+ 	+ fake a SIGWINCH in newterm() to accommodate buggy terminal emulators
+@@ -3076,8 +4143,8 @@ it is not possible to add this information.
+ 	+ modify "tic -cv" to ignore delays when comparing strings.  Also
+ 	  modify it to ignore a canceled sgr string, e.g., for terminals which
+ 	  cannot properly combine attributes in one control sequence.
+-	+ corrections for gnome and konsole entries (Redhat Bugzilla #122815,
+-	  patch by Hans de Goede)
++	+ corrections for gnome and konsole entries (Redhat #122815, patch by
++	  Hans de Goede)
+ 	> terminfo updates -TD
+ 	+ make ncsa-m rmacs/smacs consistent with sgr
+ 	+ add sgr, rc/sc and ech to syscons entries
+@@ -3090,7 +4157,7 @@ it is not possible to add this information.
+ 	> terminfo updates -TD
+ 	+ add xterm-pc-fkeys
+ 	+ review/update gnome and gnome-rh90 entries (prompted by Redhat
+-	  Bugzilla #122815).
++	  #122815).
+ 	+ review/update konsole entries
+ 	+ add sgr, correct sgr0 for kterm and mlterm
+ 	+ correct tsl string in kterm
+@@ -4204,7 +5271,7 @@ it is not possible to add this information.
+ 	+ add a check in kgetch() for cooked characters in the fifo to avoid
+ 	  calling fifo_push() when a KEY_RESIZE is available (report/analysis
+ 	  by Sam Varshavchik <mrsam at courier-mta.com>).
+-	+ fix an overlooked case for bugzilla #68199 (Philippe Blain).
++	+ fix an overlooked case for Redhat #68199 (Philippe Blain).
+ 	+ ensure clearerr() is called before using ferror() e.g., in
+ 	  lib_screen.c (report by Philippe Blain).
+ 
+@@ -4212,7 +5279,7 @@ it is not possible to add this information.
+ 	+ modify lib_screen.c and lib_newwin.c to maintain the SCREEN-specific
+ 	  pointers for curscr/stdscr/newscr when scr_save() and scr_restore()
+ 	  modify the global curscr/stdscr/newscr variables.  Fixes Redhat
+-	  bugzilla #68199 dated 2002-07-07.
++	  #68199.
+ 	+ add checks for null pointer in calls to tparm() and tgoto() based on
+ 	  FreeBSD bug report.  If ncurses were built with termcap support, and
+ 	  the first call to tgoto() were a zero-length string, the result would
+@@ -4245,7 +5312,7 @@ it is not possible to add this information.
+ 	  Olaf Buddenhagen <olafBuddenhagen at web.de>).
+ 	+ modified wresize() to ensure that a failed realloc will not corrupt
+ 	  the window structure, and to make subwindows fit within the resized
+-	  window (completes Debian #87678, #101699)
++	  window (completes Debian #87678, Debian #101699)
+ 
+ 20020803
+ 	+ fix an off-by-one in lib_pad.c check for limits of pad (patch by
+@@ -4940,9 +6007,9 @@ it is not possible to add this information.
+ 	  which may be in libutf8.
+ 	+ remove some unnecessary text from curs_extend.3x and
+ 	  default_colors.3x which caused man-db to make incorrect symbolic
+-	  links (Debian bug report #99550).
++	  links (Debian #99550).
+ 	+ add configure check if cast for _IO_va_list is needed to compile
+-	  C++ vscan code (Debian bug report #97945).
++	  C++ vscan code (Debian #97945).
+ 	> several patches from Sven Verdoolaege:
+ 	+ correct code that used non-standard auto-initialization of a struct,
+ 	  which gcc allows (report by Larry Virden).
+@@ -5077,7 +6144,7 @@ it is not possible to add this information.
+ 	+ add some examples of customizing screen's terminfo:
+ 	  screen.xterm-xfree86, screen.xterm-r6, screen.teraterm -TD
+ 	+ modify screen's terminfo entry to match the khome/kend in screen
+-	  3.09.08 (Debian bug report #92215).
++	  3.09.08 (Debian #92215).
+ 	+ correct a memory leak in forms library (report by Stefan Vogtner
+ 	  <stefan at vogtner.de>) (patch by Juergen Pfeifer).
+ 
+@@ -5091,12 +6158,12 @@ it is not possible to add this information.
+ 	+ add .cc.ii rule to c++ makefile, to get preprocessor output for
+ 	  debugging.
+ 	+ correct configure script handling of @keyword@ substitutions when the
+-	  --with-manpage-renames option is given (cf:  20000715, fixes Debian
+-	  bug #89939).
++	  --with-manpage-renames option is given (cf: 20000715, fixes Debian
++	  #89939).
+ 	+ report stack underflow/overflow in tparm() when tic -cv option is
+ 	  given.
+ 	+ remove spurious "%|" operator from xterm-xfree86 terminfo entry,
+-	  (reported by Adam Costello <amc at cs.berkeley.edu>, Debian bug #89222).
++	  (reported by Adam Costello <amc at cs.berkeley.edu>, Debian #89222).
+ 
+ 20010310
+ 	+ cleanup of newdemo.c, fixing some ambiguous expressions noted by gcc
+@@ -5800,7 +6867,7 @@ it is not possible to add this information.
+ 	+ correct spelling error in terminfo entry name:  bq300-rv was given as
+ 	  bg300-rv in esr's version.
+ 	+ modify redrawwin() macro so its parameter is fully parenthesized
+-	  (fixes Debian bug report #61088).
++	  (fixes Debian #61088).
+ 	+ correct formatting error in dump_entry() which set incorrect column
+ 	  value when no newline trimming was needed at the end of an entry,
+ 	  before appending "use=" clauses (cf: 960406).
+@@ -6530,7 +7597,7 @@ it is not possible to add this information.
+ 	  handling in lynx (reported by Kim DeVaughn).
+ 
+ 990306	pre-release
+-	+ add -G option to tic and infocmp, to reverse the -g option.
++	+ add -G option to tic and infocmp, to reverse the "-g" option.
+ 	+ recode functions in name_match.c to avoid use of strncpy, which
+ 	  caused a 4-fold slowdown in tic (cf: 980530).
+ 	+ correct a few warnings about sign-extension in recent changes.
+@@ -6901,7 +7968,7 @@ it is not possible to add this information.
+ 	  since that is a little more efficient.
+ 	+ minor correction to infocmp to avoid displaying "difference" between
+ 	  two capabilities that are rendered in equivalent forms.
+-	+ add -g option to tic/infocmp to force character constants to be
++	+ add "-g" option to tic/infocmp to force character constants to be
+ 	  displayed in quoted form.  Otherwise their decimal values are shown.
+ 	+ modify setupterm so that cancelled strings are treated the same as
+ 	  absent strings, cancelled and absent booleans false (does not affect
+@@ -8979,15 +10046,18 @@ it is not possible to add this information.
+ 	+ correction to #317.
+ 	> patch 317 (ESR):
+ 	+ re-add _nc_hash_map
+-	+ modify EmitRange to maintain position as per original design.
+-	+ add hashtest.c, program to time the hashmap optimization.
++	+ modify EmitRange to maintain position as per original design
++	  (patch by A. Lukyanov).
++	+ modify test/ncurses.c and tputs, etc., to allow trace counting
++	  output characters.
++	+ add hashtest.c program to time the hashmap optimization.
+ 	> patch 316 (ESR):
+ 	+ add logic to deal with magic-cookie (how was this tested?)
+ 	  (lib_doupdate.c).
+ 	+ add ncurses.c driver for magic-cookie, some fixes to ncurses.c
+ 	> patch 315 (ESR):
+-	+ merged Alexander V Lukyanov's patch to use ech and rep - untested
+-	  (lib_doupdate.c).
++	+ merge changes to lib_doupdate.c to use ech and rep - untested
++	  (patch by Alexander V Lukyanov).
+ 	+ modified handling of interrupted system calls - untested
+ 	  (lib_getch.c, lib_twait.c).
+ 	+ new function _nc_mvcur_resume()
+@@ -9059,12 +10129,12 @@ it is not possible to add this information.
+ 	+ corrected typo in dtterm description.
+ 	> patch 313 (ESR):
+ 	+ add dtterm description
+-	+ clarify ncurses 'i' test (drop vscanf subtest)
++	+ clarify ncurses 'i' test (drop mvwscanw subtest)
+ 
+ 960810	- snapshot
+ 	+ correct nl()/nonl() to work as per SVr4 & XSI.
+ 	+ minor fixes to ncurses.c (use 'noraw()', mvscanw return-code)
+-	+ refine configure-test for -g option (Tim Mooney).
++	+ refine configure-test for "-g" option (Tim Mooney).
+ 	+ correct interaction between O_BLANK and NEW_LINE request in form
+ 	  library (Juergen Pfeifer)
+ 
+@@ -9073,7 +10143,8 @@ it is not possible to add this information.
+ 	> patch 312 (ESR):
+ 	  correct terminfo.src corrupted by #310
+ 	> patch 311 (ESR):
+-	+ fix idlok() and idcok() and the default of the idlok switch.
++	+ fix idlok() and idcok() and the default of the idlok switch (report
++	  by Ville Sulko).
+ 
+ 960803	- snapshot
+ 	+ corrected tparm to handle capability strings without explicit pop
+@@ -9083,7 +10154,7 @@ it is not possible to add this information.
+ 	> patch 310 (ESR):
+ 	+ documentation and prototyping errors for has_color, immedok and idcok
+ 	  (reported by William P Setzer <wsetzer at pams.ncsu.edu>)
+-	+ updated qnx terminfo entry (by Michael Hunter)
++	+ updated qnx terminfo entry (patch by Michael Hunter)
+ 
+ 960730
+ 	+ eliminate quoted includes in ncurses subdirectory, ensure config.h
+@@ -9095,7 +10166,7 @@ it is not possible to add this information.
+ 	+ call cbreak() in initscr(), as per XSI & SVr4.
+ 	+ turn off hardware echo in initscr() as per XSI & SVr4
+ 	> patch 309 (ESR):
+-	+ terminfo changes (9.3.10), from BRL
++	+ terminfo changes (9.3.9), from BRL
+ 	+ add more checks to terminfo parser.
+ 	+ add more symbols to infocmp.
+ 
+@@ -9114,6 +10185,7 @@ it is not possible to add this information.
+ 	> patch 308 (ESR):
+ 	+ terminfo changes (9.3.8)
+ 	+ modified logic of error-reporting in terminfo parser
++	+ fix option-processing bug in toe.
+ 
+ 960713	- snapshot
+ 	+ always check for <sys/bsdtypes.h> since ISC needs it to declare
+@@ -9122,9 +10194,19 @@ it is not possible to add this information.
+ 	  by Juergen Pfeifer, Mike Long)
+ 	+ add LOCAL_LDFLAGS2 symbol (Juergen Pfeifer)
+ 	+ corrected prototype for delay_output() -- bump ABI to 3.2
+-	+ terminfo patches #306/307 (ESR).
++	+ patch 307 (ESR):
++	+ enable more translations of nonstandard caps, and document them.
++	+ misc/terminfo.src update to 9.13.8
++	+ patch 306 (ESR):
+ 	+ moved logic that filters out rmul and rmso from setupterm to newterm
+ 	  where it is less likely to interfere with termcap applications.
++	+ cosmetic fixes to test/ncurses.c
++	+ modify open() call in ncurses/read_entry.c to use O_RDONLY symbol
++	  rather than constant (report by mib).
++	+ misc/terminfo.src sgr0 and acsc changes (report by Philippe De
++	  Muyter).
++	+ modify ncurses/comp_parse.c so that entries containing a "+" can
++	  have missing rmcup vs smcup.
+ 
+ 960707
+ 	+ rollback ESR's #305 change to terminfo.src (it breaks existing
+@@ -9139,7 +10221,6 @@ it is not possible to add this information.
+ 	+ make lib_vidattr.c more readable using macros.
+ 	+ filter out rmul, rmso that conflict with sgr0 when reading terminal
+ 	  descriptions.
+-	+ added sanity-checking of various paired string attributes (ESR).
+ 	+ work around autoconf bug, force $INSTALL to absolute path
+ 	  (reported by Zeyd).
+ 	+ modify man-page install for BSDI to install preformatted .0 files
+@@ -9152,6 +10233,12 @@ it is not possible to add this information.
+ 	+ disable scrollok during the ncurses 'p' test; if it is enabled the
+ 	  stdscr will scroll when putting the box-corners in the lower-right
+ 	  of the screen.
++	> patch 305 (ESR):
++	+ added sanity-checking of various paired string attributes.
++	+ misc/terminfo.src update to 9.13.7 (report by A. Lukyanov).
++	+ modify man/Makefile.in to make terminfo.5 during normal build.
++	> patch 304 (ESR):
++	+ corrected allocation-length for $HOME/.terminfo path.
+ 
+ 960629	- snapshot
+ 	+ check return code of _nc_mvcur_scrolln() in _nc_scroll_optimize() for
+@@ -9234,6 +10321,7 @@ it is not possible to add this information.
+ 	+ better fix for nvi refresh-bug (Rick Marshall)
+ 	+ fix for bug in handling of interrupted keystroke waits,
+ 	  (Werner Fleck).
++	+ misc/ncurses-intro.html syntax fix (Kajiyama Tamito).
+ 
+ 960601	- snapshot
+ 	+ auto-configure man-page compression-format and renames for Debian.
+@@ -9248,7 +10336,7 @@ it is not possible to add this information.
+ 	+ enhancement to the control over the new PC-style soft key format.
+ 	  allow caller now to select whether or not one wants to have
+ 	  the index-line; see curs_slk.3x for documentation (Juergen Pfeifer).
+-	+ typos, don't use inline with -g (Philippe De Muyter)
++	+ typos, don't use inline with "-g" (Philippe De Muyter)
+ 	+ fixes for menus & wattr-, slk-functions (Juergen Pfeifer)
+ 
+ 960526	- snapshot
+@@ -9263,6 +10351,9 @@ it is not possible to add this information.
+ 	+ include sys/types.h in case stdlib.h does not declare size_t.
+ 	+ fixes for makefile (Tim Mooney)
+ 	+ fixes for menus & forms (Juergen Pfeifer)
++	> patch 302 (ESR):
++	+ improve hash function (suggested by Alexander V Lukyanov).
++	+ 9.13.4 update for terminfo.src
+ 
+ 960518	- snapshot
+ 	+ revised ncurses.c panner test, let pad abut all 4 sides of screen.
+@@ -9275,6 +10366,8 @@ it is not possible to add this information.
+ 	  confusion, and made this check for the /usr/lib/terminfo pre-existing
+ 	  directory.
+ 	> patches 299-301 (ESR):
++	+ html fixes (Phillippe de Muyter).
++	+ fix typo in ncurses-intro.html (report by Fabrizio Polacco).
+ 	+ added hashmap.c
+ 	+ mods to tracing, especially for ACS chars.
+ 	+ corrected off-by-one in IDCtransform.
+@@ -9294,13 +10387,21 @@ it is not possible to add this information.
+ 	> patches 297, 298 (ESR):
+ 	+ implement TERMINFO_DIRS, and -o option of tic
+ 	+ added TRACE_IEVENT
+-	+ removed boolean version of 'getm'
+-	+ added lib_print.c (for Rick Marshall)
+-	+ added has_key()
++	+ fix REQ_TOGGLE_ITEM in menu/menu_driver.c; it could select but not
++	  deselect.
++	+ added lib_print.c (request by Rick Marshall).
++	+ added has_key() (request by Juergen Pfeifer).
++	+ do not issue clrtoeol or clrtobot if the relevant portion of the line
++	  is already blank (analysis by Keith Bostic).
++	+ add parentheses for parameters of COLOR_PAIR and PAIR_NUMBER macros
++	  (analysis by Jurgen Eidt).
++	+ update screen's notion of cursor position in endwin() (analysis by
++	  Alexander Lukyanov).
+ 	+ added 't' to ncurses.c test.
+ 	+ moved delay_output() to lib_tputs.c
+ 	+ removed tparam() (was added in 1.9.9, but conflicts with emacs and
+ 	  is not part of X/Open Curses).
++	+ removed boolean version of 'getm'.
+ 	+ misc cursor & optimization fixes.
+ 
+ 960504	- snapshot
+@@ -9326,11 +10427,20 @@ it is not possible to add this information.
+ 	+ make TIOCGWINSZ configure test less stringent, in case user
+ 	  configures via terminal that cannot get screen size.
+ 	> patches 295, 296 (ESR):
+-	+ new "-e" option of tic.
+-	+ fix for "infocmp -e".
+-	+ restore working-directory in read_termcap.c
+ 	+ split lib_kernel.c, lib_setup.c and names.c in order to reduce
+ 	  overhead for programs that use only termcap features.
++	+ new "-e" and "-h" options of tic (request by Tony Nugent).
++	+ fix bug in mandatory-delay logic in lib_tputs.c (report by Sven
++	  Verdoolaege).
++	+ fix for "infocmp -e" to emit correct initializers (reported by Manual
++	  J Novoa III).
++	+ restore working-directory in read_termcap.c (report by Kayvan
++	  Sylvan).
++	+ use "-h" option on Solaris when generating shared libraries on
++	  Solaris 2.5 to record the library name in the file, for assisting
++	  the loader (patch by Scott Kramer).
++	+ undo patch #294 changes to form and menu libraries (request by
++	  Juergen Pfeifer).
+ 
+ 960418	- snapshot
+ 	+ use autoconf 2.9
+@@ -9338,10 +10448,22 @@ it is not possible to add this information.
+ 	  definitions via <termios.h>, modified macros in lib_raw.c to avoid
+ 	  K&R-style substitution)
+ 	> patches 293, 294 (ESR):
+-	+ mods to wgetch() in cooked mode
+-	+ corrected askuser() logic in tset
+-	+ correct interaction of endwin() with mouse processing
++	+ rewrite wsyncup(), wsyncdown(), as well as small fixes to form and
++	  menu libraries to fix echo-breakage introduced by 1.8.9, 1.9.9e
++	  changes (patches by Juergen Pfeifer).
++	+ fix compile under QNX 4.2 by defining ONLCR in lib_raw.c when
++	  __QNX__ is defined (patch by Michael Hunter).
++	+ modify setupterm() to match documentation for its return value, fix
++	  newterm to work with this change (report by Emmet Lazich).
++	+ add checks in getch() for error, return ERR as appropriate (report by
++	  Emmet Lazich).
++	+ mods to wgetch() in cooked mode (report by Pete Seebach).
++	+ corrected askuser() logic in tset (patch by Remco Treffkorn).
++	+ correct interaction of endwin() with mouse processing (report by
++	  Michael Elkins).
+ 	+ added trace support for TTY flags
++	+ update terminfo.src to 9.13.1
++	+ FreeBSD console entries (patch by Andrew Chernov).
+ 
+ 960406
+ 	+ fixes for NeXT, ISC and HPUX auto-configure
+diff --git a/README b/README
+index 56bc385..c509352 100644
+--- a/README
++++ b/README
+@@ -1,5 +1,5 @@
+ -------------------------------------------------------------------------------
+--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.               --
++-- Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.               --
+ --                                                                           --
+ -- Permission is hereby granted, free of charge, to any person obtaining a   --
+ -- copy of this software and associated documentation files (the             --
+@@ -25,7 +25,7 @@
+ -- sale, use or other dealings in this Software without prior written        --
+ -- authorization.                                                            --
+ -------------------------------------------------------------------------------
+--- $Id: README,v 1.23 2006/04/22 22:19:37 tom Exp $
++-- $Id: README,v 1.25 2012/08/11 20:11:26 tom Exp $
+ -------------------------------------------------------------------------------
+ 		README file for the ncurses package
+ 
+@@ -78,6 +78,10 @@ features are provided by ifdef's in the header files.  The wide-character
+ library interfaces are not binary-compatible with the non-wide-character
+ 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".
++
+ 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
+ code for these lives in the `ncurses', `panel', `menu', and `form' directories
+@@ -122,8 +126,9 @@ The utilities are as follows:
+ 	tic             -- terminfo source to binary compiler
+ 	infocmp         -- terminfo binary to source decompiler/comparator
+ 	clear           -- emits clear-screen for current terminal
++	tabs            -- set tabs on a terminal
+ 	tput            -- shell-script access to terminal capabilities.
+-	toe		-- table of entries utility
++	toe             -- table of entries utility
+ 	tset            -- terminal-initialization utility
+ 
+ The first two (tic and infocmp) are used for manipulating terminfo
+@@ -153,8 +158,10 @@ Thomas Dickey (maintainer for 1.9.9g through 4.1, resuming with FSF's 5.0):
+ 	configuration scripts, porting, mods to adhere to XSI Curses in the
+ 	areas of background color, terminal modes.  Also memory leak testing,
+ 	the wresize, default colors and key definition extensions and numerous
+-	bug fixes (more than half of those enumerated in NEWS beginning with
+-	the internal release 1.8.9).
++	bug fixes -- more than half of those enumerated in NEWS beginning with
++	the internal release 1.8.9, see
++
++		http://invisible-island.net/personal/changelogs.html
+ 
+ Florian La Roche (official maintainer for FSF's ncurses 4.2)
+ 	Beginning with release 4.2, ncurses is distributed under an MIT-style
+diff --git a/README.MinGW b/README.MinGW
+index d111b38..f7d7897 100644
+--- a/README.MinGW
++++ b/README.MinGW
+@@ -1,5 +1,5 @@
+ -------------------------------------------------------------------------------
+--- Copyright (c) 2008-2010,2011 Free Software Foundation, Inc.               --
++-- Copyright (c) 2008-2011,2012 Free Software Foundation, Inc.               --
+ --                                                                           --
+ -- Permission is hereby granted, free of charge, to any person obtaining a   --
+ -- copy of this software and associated documentation files (the             --
+@@ -25,7 +25,7 @@
+ -- sale, use or other dealings in this Software without prior written        --
+ -- authorization.                                                            --
+ -------------------------------------------------------------------------------
+--- $Id: README.MinGW,v 1.5 2011/02/26 16:57:17 tom Exp $
++-- $Id: README.MinGW,v 1.9 2012/09/22 17:46:04 tom Exp $
+ -- Author: Juergen Pfeifer
+ -------------------------------------------------------------------------------
+ 
+@@ -39,7 +39,7 @@ from http://www.mingw.org
+ To build ncurses for native Windows, you need the MinGW toolchain.  The
+ original MinGW toolchain from the above site is only for 32-Bit Windows.  As
+ Windows Server - and also regular workstations - are moving to 64-Bit, it
+-seems to be reasonable to have a toolchain that supports both architectures. 
++seems to be reasonable to have a toolchain that supports both architectures.
+ I recommend to use the TDM gcc toolchain which you can find at
+ http://tdm-gcc.tdragon.net/download.  Go to the download section and select
+ the bundle installer for tdm64 (MinGW-w64).  This installs a multilib version
+@@ -47,7 +47,7 @@ of the gcc toolchain that can compile for native 32- and 64-Bit Windows
+ versions.  It also comes with a working pthread implementation.
+ 
+ The latest config and build scripts we use for MinGW have only been tested
+-for the gcc-4.4 compiler toolchain (or better).
++for the gcc-4.6.1 compiler toolchain (or better).
+ 
+ Using MinGW is a pragmatic decision, it's the easiest way to port this
+ heavily UNIX based sourcebase to native Windows. The goal is of course
+@@ -55,22 +55,13 @@ to provide the includes, libraries and DLLs to be used with the more
+ common traditional development environments on Windows, mainly with
+ Microsoft Visual Studio.
+ 
+-If you start a bash from the MSYS environment, please make sure that the
+-Microsoft Development tools are in your PATH right after the MinGW
+-tools. The LIB.EXE tool is the only one needed. You need this only if 
+-you want to build DLLs that work with native Windows programs. If you 
+-don't have any Microsoft  Development tools on your machine, consider 
+-at least to get the free "Visual C++ 2010 Express Edition". 
+-It contains the LIB.EXE tool. You may also use this compiler to test 
+-writing native Windows programs using the ncurses DLLs without using 
+-MinGW then for writing apps.
+-
+-It is necessary to unset the TERM environment variable, to activate the
+-Windows console-driver.
++The TERM environment variable must be set specially to active the Windows
++console-driver.  The driver checks if TERM is set to "#win32con" (explicit
++use) or if TERM is unset or empty (implicit).
+ 
+ Please also make sure that MSYS links to the correct directory containing
+ your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
+-CMD.EXE command shell go to the MSYS root directory (most probably 
++CMD.EXE command shell go to the MSYS root directory (most probably
+ C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
+ that points to the MinGW toolchain directory. If not, delete the mingw
+ directory and use the mklink command (or the linkd.exe utility on older
+@@ -79,62 +70,60 @@ Windows) to create the junction point.
+ This code requires WindowsNT 5.1 or better, which means on the client
+ Windows XP or better, on the server Windows Server 2003 or better.
+ 
+-In order to build ncurses for the planned interop layer with .NET, we
+-recommend to use these options with configure
++I recommend using libtool to build ncurses on MinGW, because libtool
++knows exactly how to build dll's on Windows for use with MinGW.
++
++To build a modern but still small footprint ncurses that provides
++hooks for interop, I recommend using these options:
+ 
++	  --with-libtool
+ 	  --disable-home-terminfo
+-	  --enable-reentrant
++	  --enable-database
++	  --disable-termcap
+ 	  --enable-sp-funcs
+ 	  --enable-term-driver
+ 	  --enable-interop
+-	  --with-pthread         (if using TDM toolchain as recommended)
+ 
+-This is the configuration commandline as I'm using it at the moment:
++This is the configuration commandline as I'm using it at the moment (assuming
++environment variable MINGW_ROOT to hold the root directory name of your MinGW
++build):
+ 
+ ./configure \
+-	--prefix=/mingw \
+-	--without-cxx-binding \
++	--prefix=$MINGW_ROOT \
++	--with-cxx \
+ 	--without-ada \
+ 	--enable-warnings \
+ 	--enable-assertions \
+-	--enable-reentrant \
+-	--with-debug \
+-	--with-normal \
+ 	--disable-home-terminfo \
++	--enable-database \
+ 	--enable-sp-funcs \
+ 	--enable-term-driver \
+ 	--enable-interop \
+-	--with-pthread
++	--disable-termcap \
++	--with-progs \
++	--with-libtool \
++	--enable-pc-files \
++	--mandir=$MINGW_ROOT/share/man
+ 
+-If you are on a 64-Bit Windows system and want to build a 32-Bit version
+-of ncurses, you may use this commandline for configuration (when using
+-the TDM toolchain):
++Please note that it is also necessary to set this environment variable:
+ 
+-CC="gcc -m32" LD="ld -m32" ./configure \
+-	--prefix=/mingw \
+-	--without-cxx-binding \
+-	--without-ada \
+-	--enable-warnings \
+-	--enable-assertions \
+-	--enable-reentrant \
+-	--with-debug \
+-	--with-normal \
+-	--disable-home-terminfo \
+-	--enable-sp-funcs \
+-	--enable-term-driver \
+-	--enable-interop \
+-	--with-pthread
++export PATH_SEPARATOR=";"
+ 
+-All the options above are - like the whole Windows support -
+-experimental.
++in order to parse the terminfo paths correctly. Terminfo paths should
++always be separated by a seeeemicolon,even when running under MSYS.
+ 
+-In order to build the DLLs, after your regular make you must call
++To support regular expressions properly, ncurses under MinGW should be
++linked against the gnurx regex library, which must be built separately
++under MinGW.  See
+ 
+-   make dlls
++    ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip
++
++All the options above are - like the whole Windows support -
++experimental.
+ 
+ A lot is still TODO, e.g.:
+ 
+-  - Wide Character support
++  - Wide Character support (display is workable, but input untested)
+     The Win32Con driver should actually only use Unicode in the
+     future.
+   - Thread support (locking). If using TDM toolchain this is done by
+@@ -145,5 +134,5 @@ A lot is still TODO, e.g.:
+   - Workarounds for MinGW's filesystem access are necessary to make infocmp
+     work (though tic works).
+ 
+-To support terminfo, we need to have an ioctl() simulation for the
+-serial and networked Terminals.
++To support terminfo, we would need to have an ioctl() simulation for the
++serial and networked terminals.
+diff --git a/aclocal.m4 b/aclocal.m4
+index 9a82855..9a8c65e 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1,5 +1,5 @@
+ dnl***************************************************************************
+-dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
++dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ dnl                                                                          *
+ dnl Permission is hereby granted, free of charge, to any person obtaining a  *
+ dnl copy of this software and associated documentation files (the            *
+@@ -28,7 +28,7 @@ dnl***************************************************************************
+ dnl
+ dnl Author: Thomas E. Dickey 1995-on
+ dnl
+-dnl $Id: aclocal.m4,v 1.553 2011/03/31 23:35:38 tom Exp $
++dnl $Id: aclocal.m4,v 1.666 2013/04/13 22:59:35 tom Exp $
+ dnl Macros used in NCURSES auto-configuration script.
+ dnl
+ dnl These macros are maintained separately from NCURSES.  The copyright on
+@@ -62,6 +62,32 @@ AC_DEFUN([AM_LANGINFO_CODESET],
+   fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
++dnl ------------------
++dnl Conditionally generate script according to whether we're using a given autoconf.
++dnl
++dnl $1 = version to compare against
++dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
++dnl $3 = code to use if AC_ACVERSION is older than $1.
++define([CF_ACVERSION_CHECK],
++[
++ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
++ifdef([m4_version_compare],
++[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
++[CF_ACVERSION_COMPARE(
++AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
++AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
++dnl --------------------
++dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
++dnl                      MAJOR2, MINOR2, TERNARY2,
++dnl                      PRINTABLE2, not FOUND, FOUND)
++define([CF_ACVERSION_COMPARE],
++[ifelse(builtin([eval], [$2 < $5]), 1,
++[ifelse([$8], , ,[$8])],
++[ifelse([$9], , ,[$9])])])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
+ dnl -------------------
+ dnl Construct the list of include-options for the C programs in the Ada95
+@@ -313,76 +339,6 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
+ }
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32
+-dnl ----------------
+-dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
+-dnl in the sharutils 4.2 distribution.
+-AC_DEFUN([CF_ANSI_CC_CHECK],
+-[
+-AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[
+-cf_cv_ansi_cc=no
+-cf_save_CFLAGS="$CFLAGS"
+-cf_save_CPPFLAGS="$CPPFLAGS"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX			-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc
+-# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
+-for cf_arg in "-DCC_HAS_PROTOS" \
+-	"" \
+-	-qlanglvl=ansi \
+-	-std1 \
+-	-Ae \
+-	"-Aa -D_HPUX_SOURCE" \
+-	-Xc
+-do
+-	CF_ADD_CFLAGS($cf_arg)
+-	AC_TRY_COMPILE(
+-[
+-#ifndef CC_HAS_PROTOS
+-#if !defined(__STDC__) || (__STDC__ != 1)
+-choke me
+-#endif
+-#endif
+-],[
+-	int test (int i, double x);
+-	struct s1 {int (*f) (int a);};
+-	struct s2 {int (*f) (double a);};],
+-	[cf_cv_ansi_cc="$cf_arg"; break])
+-done
+-CFLAGS="$cf_save_CFLAGS"
+-CPPFLAGS="$cf_save_CPPFLAGS"
+-])
+-
+-if test "$cf_cv_ansi_cc" != "no"; then
+-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+-	CF_ADD_CFLAGS($cf_cv_ansi_cc)
+-else
+-	AC_DEFINE(CC_HAS_PROTOS)
+-fi
+-fi
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
+-dnl ---------------
+-dnl For programs that must use an ANSI compiler, obtain compiler options that
+-dnl will make it recognize prototypes.  We'll do preprocessor checks in other
+-dnl macros, since tools such as unproto can fake prototypes, but only part of
+-dnl the preprocessor.
+-AC_DEFUN([CF_ANSI_CC_REQD],
+-[AC_REQUIRE([CF_ANSI_CC_CHECK])
+-if test "$cf_cv_ansi_cc" = "no"; then
+-	AC_MSG_ERROR(
+-[Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto])
+-fi
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
+ dnl --------------
+ dnl Allow user to disable a normally-on option.
+@@ -465,7 +421,7 @@ fi
+ AC_SUBST(ARFLAGS)
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_AWK_BIG_PRINTF version: 3 updated: 2008/12/27 12:30:03
++dnl CF_AWK_BIG_PRINTF version: 4 updated: 2011/10/30 17:09:50
+ dnl -----------------
+ dnl Check if awk can handle big strings using printf.  Some older versions of
+ dnl awk choke on large strings passed via "%s".
+@@ -479,8 +435,8 @@ AC_DEFUN([CF_AWK_BIG_PRINTF],
+ 		eval $2=no
+ 		;;
+ 	*) #(vi
+-		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \
+-			| $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
++		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
++			| $AWK '{ printf "%d\n", length([$]0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
+ 			eval $2=yes
+ 		else
+ 			eval $2=no
+@@ -536,7 +492,7 @@ else	AC_MSG_RESULT(no)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_BOOL_SIZE version: 12 updated: 2006/12/16 12:33:30
++dnl CF_BOOL_SIZE version: 13 updated: 2013/04/13 18:03:21
+ 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.
+@@ -570,7 +526,7 @@ AC_CACHE_VAL(cf_cv_type_of_bool,[
+ 
+ #endif
+ 
+-main()
++int main()
+ {
+ 	FILE *fp = fopen("cf_test.out", "w");
+ 	if (fp != 0) {
+@@ -604,7 +560,7 @@ if test "$cf_cv_type_of_bool" = unknown ; then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_BUILD_CC version: 6 updated: 2006/10/14 15:23:15
++dnl CF_BUILD_CC version: 7 updated: 2012/10/06 15:31:55
+ 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
+@@ -614,7 +570,8 @@ dnl
+ dnl $1 = default for $CPPFLAGS
+ dnl $2 = default for $LIBS
+ AC_DEFUN([CF_BUILD_CC],[
+-AC_REQUIRE([CF_PROG_EXT])
++CF_ACVERSION_CHECK(2.52,,
++	[AC_REQUIRE([CF_PROG_EXT])])
+ if test "$cross_compiling" = yes ; then
+ 
+ 	# defaults that we might want to override
+@@ -695,7 +652,33 @@ AC_SUBST(BUILD_EXEEXT)
+ AC_SUBST(BUILD_OBJEXT)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CFG_DEFAULTS version: 7 updated: 2005/09/24 16:15:00
++dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49
++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 with
++dnl options, but eliminates a more common category of user confusion.
++AC_DEFUN([CF_CC_ENV_FLAGS],
++[
++# This should have been defined by AC_PROG_CC
++: ${CC:=cc}
++
++AC_MSG_CHECKING(\$CC variable)
++case "$CC" in #(vi
++*[[\ \	]]-[[IUD]]*)
++	AC_MSG_RESULT(broken)
++	AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
++	# humor him...
++	cf_flags=`echo "$CC" | sed -e 's/^[[^ 	]]*[[ 	]]//'`
++	CC=`echo "$CC" | sed -e 's/[[ 	]].*//'`
++	CF_ADD_CFLAGS($cf_flags)
++	;;
++*)
++	AC_MSG_RESULT(ok)
++	;;
++esac
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_CFG_DEFAULTS version: 9 updated: 2013/04/13 18:58:32
+ dnl ---------------
+ dnl Determine the default configuration into which we'll install ncurses.  This
+ dnl can be overridden by the user's command-line options.  There's two items to
+@@ -713,7 +696,7 @@ AC_MSG_CHECKING(for prefix)
+ if test "x$prefix" = "xNONE" ; then
+ 	case "$cf_cv_system_name" in
+ 		# non-vendor systems don't have a conflict
+-	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
++	openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
+ 		prefix=/usr
+ 		;;
+ 	*)	prefix=$ac_default_prefix
+@@ -749,30 +732,51 @@ AC_MSG_RESULT($includedir)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52
++dnl CF_CGETENT version: 5 updated: 2012/10/06 17:56:13
+ 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_MSG_CHECKING(for terminal-capability database functions)
+-AC_CACHE_VAL(cf_cv_cgetent,[
++AC_CACHE_CHECK(for terminal-capability database functions,cf_cv_cgetent,[
+ AC_TRY_LINK([
+ #include <stdlib.h>],[
+ 	char temp[128];
+ 	char *buf = temp;
+ 	char *db_array = temp;
+-	cgetent(&buf, /* int *, */ &db_array, "vt100");
++	cgetent(&buf, &db_array, "vt100");
+ 	cgetcap(buf, "tc", '=');
+ 	cgetmatch(buf, "tc");
+ 	],
+ 	[cf_cv_cgetent=yes],
+ 	[cf_cv_cgetent=no])
+ ])
+-AC_MSG_RESULT($cf_cv_cgetent)
+-test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
++
++if test "$cf_cv_cgetent" = yes
++then
++	AC_DEFINE(HAVE_BSD_CGETENT,1,[Define to 1 if we have BSD cgetent])
++AC_CACHE_CHECK(if cgetent uses const parameter,cf_cv_cgetent_const,[
++AC_TRY_LINK([
++#include <stdlib.h>],[
++	char temp[128];
++	char *buf = temp;
++#ifndef _NETBSD_SOURCE			/* given, since April 2004 in stdlib.h */
++	const char *db_array = temp;
++	cgetent(&buf, &db_array, "vt100");
++#endif
++	cgetcap(buf, "tc", '=');
++	cgetmatch(buf, "tc");
++	],
++	[cf_cv_cgetent_const=yes],
++	[cf_cv_cgetent_const=no])
++])
++	if test "$cf_cv_cgetent_const" = yes
++	then
++		AC_DEFINE_UNQUOTED(CGETENT_CONST,const,[Define to const if needed for some BSD cgetent variations])
++	fi
++fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
++dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
+ dnl --------------
+ dnl Check if we're accidentally using a cache from a different machine.
+ dnl Derive the system name, as a check for reusing the autoconf cache.
+@@ -795,7 +799,7 @@ else
+ 		system_name="`(hostname) 2>/dev/null`"
+ 	fi
+ fi
+-test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
++test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.])
+ AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+ 
+ test -z "$system_name" && system_name="$cf_cv_system_name"
+@@ -908,7 +912,82 @@ if test "$cf_cv_check_gpm_wgetch" != yes ; then
+ fi
+ ])])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18
++dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
++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.
++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)
++	fi
++else
++	AC_MSG_ERROR(GNU libtool has not been found)
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_CHECK_WCHAR_H version: 1 updated: 2011/10/29 15:01:05
++dnl ----------------
++dnl Check if wchar.h can be used, i.e., without defining _XOPEN_SOURCE_EXTENDED
++AC_DEFUN([CF_CHECK_WCHAR_H],[
++AC_CACHE_CHECK(if wchar.h can be used as is,cf_cv_wchar_h_okay,[
++AC_TRY_COMPILE(
++[
++#include <stdlib.h>
++#include <wchar.h>
++],[
++	wint_t foo = 0;
++	int bar = iswpunct(foo)],
++	[cf_cv_wchar_h_okay=yes],
++	[cf_cv_wchar_h_okay=no])])
++
++if test $cf_cv_wchar_h_okay = no
++then
++	CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
++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
++dnl not ignore some gcc options.
++dnl
++dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
++dnl ensure that it is not mistaken for gcc/g++.  It is normally invoked from
++dnl the wrappers for gcc and g++ warnings.
++dnl
++dnl $1 = GCC (default) or GXX
++dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
++dnl $3 = CFLAGS (default) or CXXFLAGS
++AC_DEFUN([CF_CLANG_COMPILER],[
++ifelse([$2],,CLANG_COMPILER,[$2])=no
++
++if test "$ifelse([$1],,[$1],GCC)" = yes ; then
++	AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
++	cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
++	ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
++	AC_TRY_COMPILE([],[
++#ifdef __clang__
++#else
++make an error
++#endif
++],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
++cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
++],[])
++	ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
++	AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
++fi
++])
++dnl ---------------------------------------------------------------------------
++dnl CF_CPP_PARAM_INIT version: 6 updated: 2012/10/06 17:56:13
+ dnl -----------------
+ dnl Check if the C++ compiler accepts duplicate parameter initialization.  This
+ dnl is a late feature for the standard and is not in some recent compilers
+@@ -932,7 +1011,7 @@ TEST::TEST(int x = 1)	// some compilers do not like second initializer
+ {
+ 	value = x;
+ }
+-void main() { }
++int main() { }
+ ],
+ 	[cf_cv_cpp_param_init=yes],
+ 	[cf_cv_cpp_param_init=no],
+@@ -940,10 +1019,10 @@ void main() { }
+ 	AC_LANG_RESTORE
+ ])
+ fi
+-test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT)
++test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT,1,[Define to 1 if C++ has parameter initialization])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_CPP_STATIC_CAST version: 1 updated: 2005/07/23 16:52:43
++dnl CF_CPP_STATIC_CAST version: 3 updated: 2013/04/13 18:03:21
+ dnl ------------------
+ dnl Check if the C++ compiler accepts static_cast in generics.  This appears to
+ dnl not be supported in g++ before 3.0
+@@ -965,7 +1044,7 @@ public:
+ 	       int begin_x = 0)
+   {
+   }
+-
++  NCursesPanel();
+   ~NCursesPanel();
+ };
+ 
+@@ -996,10 +1075,58 @@ public:
+ 
+ fi
+ 
+-test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST)
++test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST,1,[Define to 1 if C++ has static_cast])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_C_INLINE version: 3 updated: 2010/05/01 15:14:41
++dnl CF_CXX_AR_FLAGS version: 1 updated: 2011/10/29 08:35:34
++dnl ---------------
++dnl Setup special archiver flags for given compilers.
++AC_DEFUN([CF_CXX_AR_FLAGS],[
++	CXX_AR='$(AR)'
++	CXX_ARFLAGS='$(ARFLAGS)'
++	case $cf_cv_system_name in #(vi
++	irix*) #(vi
++	    if test "$GXX" != yes ; then
++		CXX_AR='$(CXX)'
++		CXX_ARFLAGS='-ar -o'
++	    fi
++	    ;;
++	sco3.2v5*) #(vi
++	    CXXLDFLAGS="-u main"
++	    ;;
++	solaris2*)
++	    if test "$GXX" != yes ; then
++		CXX_AR='$(CXX)'
++		CXX_ARFLAGS='-xar -o'
++	    fi
++	    ;;
++	esac
++	AC_SUBST(CXXLDFLAGS)
++	AC_SUBST(CXX_AR)
++	AC_SUBST(CXX_ARFLAGS)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_CXX_IOSTREAM_NAMESPACE version: 2 updated: 2012/10/06 17:56:13
++dnl -------------------------
++dnl For c++, check if iostream uses "std::" namespace.
++AC_DEFUN([CF_CXX_IOSTREAM_NAMESPACE],[
++AC_CHECK_HEADERS(iostream)
++if test x"$ac_cv_header_iostream" = xyes ; then
++	AC_MSG_CHECKING(if iostream uses std-namespace)
++	AC_TRY_COMPILE([
++#include <iostream>
++using std::endl;
++using std::cerr;],[
++cerr << "testing" << endl;
++],[cf_iostream_namespace=yes],[cf_iostream_namespace=no])
++	AC_MSG_RESULT($cf_iostream_namespace)
++	if test "$cf_iostream_namespace" = yes ; then
++		AC_DEFINE(IOSTREAM_NAMESPACE,1,[Define to 1 if C++ has namespace iostream])
++	fi
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_C_INLINE version: 4 updated: 2012/06/16 14:55:39
+ dnl -----------
+ dnl Check if the C compiler supports "inline".
+ dnl $1 is the name of a shell variable to set if inline is supported
+@@ -1012,6 +1139,9 @@ if test "$ac_cv_c_inline" != no ; then
+   if test "$INTEL_COMPILER" = yes
+   then
+     :
++  elif test "$CLANG_COMPILER" = yes
++  then
++    :
+   elif test "$GCC" = yes
+   then
+     AC_CACHE_CHECK(if $CC supports options to tune inlining,cf_cv_gcc_inline,[
+@@ -1057,7 +1187,44 @@ done
+ AC_SUBST(DIRS_TO_MAKE)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32
++dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28
++dnl ---------------
++dnl You can always use "make -n" to see the actual options, but it's hard to
++dnl pick out/analyze warning messages when the compile-line is long.
++dnl
++dnl Sets:
++dnl	ECHO_LT - symbol to control if libtool is verbose
++dnl	ECHO_LD - symbol to prefix "cc -o" lines
++dnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
++dnl	SHOW_CC - symbol to put before explicit "cc -c" lines
++dnl	ECHO_CC - symbol to put before any "cc" line
++dnl
++AC_DEFUN([CF_DISABLE_ECHO],[
++AC_MSG_CHECKING(if you want to see long compiling messages)
++CF_ARG_DISABLE(echo,
++	[  --disable-echo          do not display "compiling" commands],
++	[
++    ECHO_LT='--silent'
++    ECHO_LD='@echo linking [$]@;'
++    RULE_CC='@echo compiling [$]<'
++    SHOW_CC='@echo compiling [$]@'
++    ECHO_CC='@'
++],[
++    ECHO_LT=''
++    ECHO_LD=''
++    RULE_CC=''
++    SHOW_CC=''
++    ECHO_CC=''
++])
++AC_MSG_RESULT($enableval)
++AC_SUBST(ECHO_LT)
++AC_SUBST(ECHO_LD)
++AC_SUBST(RULE_CC)
++AC_SUBST(SHOW_CC)
++AC_SUBST(ECHO_CC)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_DISABLE_LEAKS version: 7 updated: 2012/10/02 20:55:03
+ dnl ----------------
+ dnl Combine no-leak checks with the libraries or tools that are used for the
+ dnl checks.
+@@ -1075,8 +1242,8 @@ AC_ARG_ENABLE(leaks,
+ AC_MSG_RESULT($with_no_leaks)
+ 
+ if test "$with_no_leaks" = yes ; then
+-	AC_DEFINE(NO_LEAKS)
+-	AC_DEFINE(YY_NO_LEAKS)
++	AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
++	AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+@@ -1123,6 +1290,30 @@ if test "$cf_disable_rpath_hack" = no ; then
+ fi
+ ])
+ dnl ---------------------------------------------------------------------------
++dnl CF_ENABLE_PC_FILES version: 9 updated: 2012/08/04 13:59:54
++dnl ------------------
++dnl This is the "--enable-pc-files" option, which is available if there is a
++dnl pkg-config configuration on the local machine.
++AC_DEFUN([CF_ENABLE_PC_FILES],[
++AC_REQUIRE([CF_PKG_CONFIG])
++AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])
++
++if test "$PKG_CONFIG" != none ; then
++	AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
++	AC_ARG_ENABLE(pc-files,
++		[  --enable-pc-files       generate and install .pc files for pkg-config],
++		[enable_pc_files=$enableval],
++		[enable_pc_files=no])
++	AC_MSG_RESULT($enable_pc_files)
++	if test "$enable_pc_files" != no
++	then
++		CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
++	fi
++else
++	enable_pc_files=no
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42
+ dnl ---------------
+ dnl Check if the rpath option should be used, setting cache variable
+@@ -1137,6 +1328,37 @@ AC_ARG_ENABLE(rpath,
+ AC_MSG_RESULT($cf_cv_enable_rpath)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_ENABLE_STRING_HACKS version: 3 updated: 2013/01/26 16:26:12
++dnl ----------------------
++dnl On a few platforms, the compiler and/or loader nags with untruthful
++dnl comments stating that "most" uses of strcat/strcpy/sprintf are incorrect,
++dnl and implying that most uses of the recommended alternatives are correct.
++dnl
++dnl Factually speaking, no one has actually counted the number of uses of these
++dnl functions versus the total of incorrect uses.  Samples of a few thousand
++dnl instances are meaningless compared to the hundreds of millions of lines of
++dnl existing C code.
++dnl
++dnl strlcat/strlcpy are (as of 2012) non-standard, and are available on some
++dnl platforms, in implementations of varying quality.  Likewise, snprintf is
++dnl standard - but evolved through phases, and older implementations are likely
++dnl to yield surprising results, as documented in manpages on various systems.
++AC_DEFUN([CF_ENABLE_STRING_HACKS],
++[
++AC_MSG_CHECKING(if you want to work around bogus compiler/loader warnings)
++AC_ARG_ENABLE(string-hacks,
++	[  --enable-string-hacks   work around bogus compiler/loader warnings],
++	[with_string_hacks=$enableval],
++	[with_string_hacks=no])
++AC_MSG_RESULT($with_string_hacks)
++
++if test "x$with_string_hacks" = "xyes"; then
++ 	AC_DEFINE(USE_STRING_HACKS,1,[Define to 1 to work around bogus compiler/loader warnings])
++	AC_MSG_WARN(enabling string-hacks to work around bogus compiler/loader warnings)
++	AC_CHECK_FUNCS( strlcat strlcpy snprintf )
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39
+ dnl --------
+ dnl Check if 'errno' is declared in <errno.h>
+@@ -1145,7 +1367,7 @@ AC_DEFUN([CF_ERRNO],
+ CF_CHECK_ERRNO(errno)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_ETIP_DEFINES version: 3 updated: 2003/03/22 19:13:43
++dnl CF_ETIP_DEFINES version: 5 updated: 2012/02/18 17:51:07
+ dnl ---------------
+ dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between
+ dnl math.h and builtin.h, only for ncurses
+@@ -1154,11 +1376,17 @@ AC_DEFUN([CF_ETIP_DEFINES],
+ AC_MSG_CHECKING(for special defines needed for etip.h)
+ cf_save_CXXFLAGS="$CXXFLAGS"
+ cf_result="none"
++
++# etip.h includes ncurses.h which includes ncurses_dll.h
++# But ncurses_dll.h is generated - fix here.
++test -d include || mkdir include
++test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
++
+ for cf_math in "" MATH_H
+ do
+ for cf_excp in "" MATH_EXCEPTION
+ do
+-	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
++	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
+ 	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
+ 	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
+ AC_TRY_COMPILE([
+@@ -1167,7 +1395,7 @@ AC_TRY_COMPILE([
+ 	test -n "$cf_math" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_math})
+ 	test -n "$cf_excp" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_excp})
+ 	cf_result="$cf_math $cf_excp"
+-	break
++	break 2
+ ],[])
+ done
+ done
+@@ -1305,7 +1533,35 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_FUNC_DLSYM version: 2 updated: 2010/05/29 16:31:02
++dnl CF_FIXUP_ADAFLAGS version: 1 updated: 2012/03/31 18:48:10
++dnl -----------------
++dnl make ADAFLAGS consistent with CFLAGS
++AC_DEFUN([CF_FIXUP_ADAFLAGS],[
++	AC_MSG_CHECKING(optimization options for ADAFLAGS)
++	case "$CFLAGS" in
++	*-g*)
++		CF_ADD_ADAFLAGS(-g)
++		;;
++	esac
++	case "$CFLAGS" in
++	*-O*)
++		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[[ 	]].*//'`
++		CF_ADD_ADAFLAGS($cf_O_flag)
++		;;
++	esac
++	AC_MSG_RESULT($ADAFLAGS)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09
++dnl --------------
++dnl Forget that we saw the given tool.
++AC_DEFUN([CF_FORGET_TOOL],[
++unset ac_cv_prog_ac_ct_$1
++unset ac_ct_$1
++unset $1
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_FUNC_DLSYM version: 3 updated: 2012/10/06 11:17:15
+ dnl -------------
+ dnl Test for dlsym() and related functions, as well as libdl.
+ dnl
+@@ -1332,7 +1588,7 @@ if test "$cf_have_dlsym" = yes ; then
+ 			dlclose(obj);
+ 			}
+ 		}],[
+-		AC_DEFINE(HAVE_LIBDL)],[
++		AC_DEFINE(HAVE_LIBDL,1,[Define to 1 if we have dl library])],[
+ 		AC_MSG_ERROR(Cannot link test program for libdl)])
+ 	AC_MSG_RESULT(ok)
+ else
+@@ -1340,7 +1596,7 @@ else
+ fi
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_FUNC_MEMMOVE version: 7 updated: 2006/12/16 12:33:30
++dnl CF_FUNC_MEMMOVE version: 8 updated: 2012/10/04 20:12:20
+ 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.
+@@ -1365,13 +1621,13 @@ int main() {
+ 		])
+ 	],[cf_cv_good_bcopy=no])
+ 	if test "$cf_cv_good_bcopy" = yes ; then
+-		AC_DEFINE(USE_OK_BCOPY)
++		AC_DEFINE(USE_OK_BCOPY,1,[Define to 1 to use bcopy when memmove is unavailable])
+ 	else
+-		AC_DEFINE(USE_MY_MEMMOVE)
++		AC_DEFINE(USE_MY_MEMMOVE,1,[Define to 1 to use replacement function when memmove is unavailable])
+ 	fi
+ ])])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_FUNC_NANOSLEEP version: 3 updated: 2006/12/16 12:33:30
++dnl CF_FUNC_NANOSLEEP version: 4 updated: 2012/10/06 17:56:13
+ dnl -----------------
+ dnl Check for existence of workable nanosleep() function.  Some systems, e.g.,
+ dnl AIX 4.x, provide a non-working version.
+@@ -1402,7 +1658,7 @@ int main() {
+ 	[cf_cv_func_nanosleep=no],
+ 	[cf_cv_func_nanosleep=unknown])])
+ 
+-test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP)
++test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP,1,[Define to 1 if we have nanosleep()])
+ ])
+ dnl ---------------------------------------------------------------------------
+ dnl CF_FUNC_OPENPTY version: 3 updated: 2010/05/29 16:31:02
+@@ -1433,14 +1689,17 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[
+ ])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_FUNC_POLL version: 4 updated: 2006/12/16 12:33:30
++dnl CF_FUNC_POLL version: 8 updated: 2012/10/04 05:24:07
+ dnl ------------
+ dnl See if the poll function really works.  Some platforms have poll(), but
+ dnl it does not work for terminals or files.
+ AC_DEFUN([CF_FUNC_POLL],[
+ AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
+ AC_TRY_RUN([
++#include <stdlib.h>
+ #include <stdio.h>
++#include <unistd.h>
++#include <fcntl.h>
+ #ifdef HAVE_POLL_H
+ #include <poll.h>
+ #else
+@@ -1450,19 +1709,42 @@ int main() {
+ 	struct pollfd myfds;
+ 	int ret;
+ 
+-	myfds.fd = 0;
++	/* check for Darwin bug with respect to "devices" */
++	myfds.fd = open("/dev/null", 1);	/* O_WRONLY */
++	if (myfds.fd < 0)
++		myfds.fd = 0;
+ 	myfds.events = POLLIN;
++	myfds.revents = 0;
+ 
+ 	ret = poll(&myfds, 1, 100);
+-	${cf_cv_main_return:-return}(ret != 0);
++
++	if (ret < 0 || (myfds.revents & POLLNVAL)) {
++		ret = -1;
++	} else {
++		int fd = 0;
++		if (!isatty(fd)) {
++			fd = open("/dev/tty", 2);	/* O_RDWR */
++		}
++
++		if (fd >= 0) {
++			/* also check with standard input */
++			myfds.fd = fd;
++			myfds.events = POLLIN;
++			myfds.revents = 0;
++			ret = poll(&myfds, 1, 100);
++		} else {
++			ret = -1;
++		}
++	}
++	${cf_cv_main_return:-return}(ret < 0);
+ }],
+ 	[cf_cv_working_poll=yes],
+ 	[cf_cv_working_poll=no],
+ 	[cf_cv_working_poll=unknown])])
+-test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL)
++test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL,1,[Define to 1 if the poll function seems to work])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_FUNC_TERMIOS version: 2 updated: 2000/07/22 23:37:24
++dnl CF_FUNC_TERMIOS version: 3 updated: 2012/10/06 17:56:13
+ dnl ---------------
+ dnl Some old/broken variations define tcgetattr() only as a macro in
+ dnl termio(s).h
+@@ -1488,10 +1770,10 @@ TTY foo;
+ tcgetattr(1, &foo);],
+ [cf_cv_have_tcgetattr=yes],
+ [cf_cv_have_tcgetattr=no])])
+-test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR)
++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: 3 updated: 2001/12/19 00:50:10
++dnl CF_FUNC_VSSCANF version: 4 updated: 2012/10/06 17:56:13
+ 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
+@@ -1529,14 +1811,14 @@ AC_TRY_LINK([
+ cf_cv_func_vsscanf=no])])])])
+ 
+ case $cf_cv_func_vsscanf in #(vi
+-vsscanf) AC_DEFINE(HAVE_VSSCANF);; #(vi
+-vfscanf) AC_DEFINE(HAVE_VFSCANF);; #(vi
+-_doscan) AC_DEFINE(HAVE__DOSCAN);;
++vsscanf) AC_DEFINE(HAVE_VSSCANF,1,[Define to 1 if we have vsscanf]);; #(vi
++vfscanf) AC_DEFINE(HAVE_VFSCANF,1,[Define to 1 if we have vfscanf]);; #(vi
++_doscan) AC_DEFINE(HAVE__DOSCAN,1,[Define to 1 if we have _doscan]);;
+ esac
+ 
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
++dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03
+ dnl -----------------
+ dnl Test for availability of useful gcc __attribute__ directives to quiet
+ dnl compiler warnings.  Though useful, not all are supported -- and contrary
+@@ -1614,27 +1896,27 @@ EOF
+ 			test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
+ 			cat conftest.h >>confdefs.h
+ 			case $cf_attribute in #(vi
++			noreturn) #(vi
++				AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
++				;;
+ 			printf) #(vi
+-				if test "$cf_printf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+-EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+-EOF
++				cf_value='/* nothing */'
++				if test "$cf_printf_attribute" != no ; then
++					cf_value='__attribute__((format(printf,fmt,var)))'
++					AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
+ 				fi
++				AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
+ 				;;
+ 			scanf) #(vi
+-				if test "$cf_scanf_attribute" = no ; then
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var) /* nothing */
+-EOF
+-				else
+-					cat >>confdefs.h <<EOF
+-#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
+-EOF
++				cf_value='/* nothing */'
++				if test "$cf_scanf_attribute" != no ; then
++					cf_value='__attribute__((format(scanf,fmt,var)))'
++					AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
+ 				fi
++				AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
++				;;
++			unused) #(vi
++				AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
+ 				;;
+ 			esac
+ 		fi
+@@ -1646,7 +1928,7 @@ rm -rf conftest*
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
++dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33
+ dnl --------------
+ dnl Find version of gcc
+ AC_DEFUN([CF_GCC_VERSION],[
+@@ -1654,13 +1936,13 @@ 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/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
++	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.]].*//'`"
+ 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ 	AC_MSG_RESULT($GCC_VERSION)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
++dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39
+ dnl ---------------
+ dnl Check if the compiler supports useful warning options.  There's a few that
+ dnl we don't use, simply because they're too noisy:
+@@ -1683,6 +1965,7 @@ AC_DEFUN([CF_GCC_WARNINGS],
+ [
+ AC_REQUIRE([CF_GCC_VERSION])
+ CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
++CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
+ 
+ cat > conftest.$ac_ext <<EOF
+ #line __oline__ "${as_me:-configure}"
+@@ -1758,6 +2041,13 @@ then
+ 					continue;;
+ 				esac
+ 				;;
++			Wpointer-arith) #(vi
++				case $GCC_VERSION in
++				[[12]].*)
++					CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
++					continue;;
++				esac
++				;;
+ 			esac
+ 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ 		fi
+@@ -1769,6 +2059,29 @@ rm -rf conftest*
+ AC_SUBST(EXTRA_CFLAGS)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_GETOPT_HEADER version: 5 updated: 2012/10/06 16:39:58
++dnl ----------------
++dnl Check for getopt's variables which are commonly defined in stdlib.h,
++dnl unistd.h or (nonstandard) in getopt.h
++AC_DEFUN([CF_GETOPT_HEADER],
++[
++AC_HAVE_HEADERS(unistd.h getopt.h)
++AC_CACHE_CHECK(for header declaring getopt variables,cf_cv_getopt_header,[
++cf_cv_getopt_header=none
++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],
++[cf_cv_getopt_header=$cf_header
++ break])
++done
++])
++if test $cf_cv_getopt_header != none ; then
++	AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if we need to include getopt.h])
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
+ dnl ----------------
+ AC_DEFUN([CF_GNAT_GENERICS],
+@@ -2040,7 +2353,7 @@ fi
+ rm -rf conftest* *~conftest*
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41
++dnl CF_GNAT_VERSION version: 18 updated: 2012/01/21 19:28:10
+ dnl ---------------
+ dnl Verify version of GNAT.
+ AC_DEFUN([CF_GNAT_VERSION],
+@@ -2052,7 +2365,7 @@ cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
+ AC_MSG_RESULT($cf_gnat_version)
+ 
+ case $cf_gnat_version in #(vi
+-3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
++3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|20[[0-9]][[0-9]]) #(vi
+ 	cf_cv_prog_gnat_correct=yes
+ 	;;
+ *)
+@@ -2092,7 +2405,7 @@ make an error
+ test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GPP_LIBRARY version: 10 updated: 2010/05/29 16:31:02
++dnl CF_GPP_LIBRARY version: 11 updated: 2012/10/06 17:56:13
+ dnl --------------
+ dnl If we're trying to use g++, test if libg++ is installed (a rather common
+ dnl problem :-).  If we have the compiler but no library, we'll be able to
+@@ -2119,9 +2432,9 @@ if test "$GXX" = yes; then
+ 	[cf_cxx_library=yes
+ 	 CF_ADD_LIB($cf_gpp_libname,CXXLIBS)
+ 	 if test "$cf_gpp_libname" = cpp ; then
+-	    AC_DEFINE(HAVE_GPP_BUILTIN_H)
++	    AC_DEFINE(HAVE_GPP_BUILTIN_H,1,[Define to 1 if we have gpp builtin.h])
+ 	 else
+-	    AC_DEFINE(HAVE_GXX_BUILTIN_H)
++	    AC_DEFINE(HAVE_GXX_BUILTIN_H,1,[Define to 1 if we have g++ builtin.h])
+ 	 fi],
+ 	[AC_TRY_LINK([
+ #include <builtin.h>
+@@ -2129,28 +2442,28 @@ if test "$GXX" = yes; then
+ 	[two_arg_error_handler_t foo2 = lib_error_handler],
+ 	[cf_cxx_library=yes
+ 	 CF_ADD_LIB($cf_gpp_libname,CXXLIBS)
+-	 AC_DEFINE(HAVE_BUILTIN_H)],
++	 AC_DEFINE(HAVE_BUILTIN_H,1,[Define to 1 if we have builtin.h])],
+ 	[cf_cxx_library=no])])
+ 	LIBS="$cf_save"
+ 	AC_MSG_RESULT($cf_cxx_library)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GXX_VERSION version: 6 updated: 2010/10/23 15:44:18
++dnl CF_GXX_VERSION version: 7 updated: 2012/06/16 14:55:39
+ dnl --------------
+ dnl Check for version of g++
+ AC_DEFUN([CF_GXX_VERSION],[
+ AC_REQUIRE([AC_PROG_CPP])
+ GXX_VERSION=none
+ if test "$GXX" = yes; then
+-	AC_MSG_CHECKING(version of g++)
++	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.]].*//'`"
+ 	test -z "$GXX_VERSION" && GXX_VERSION=unknown
+ 	AC_MSG_RESULT($GXX_VERSION)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_GXX_WARNINGS version: 6 updated: 2010/08/14 18:25:37
++dnl CF_GXX_WARNINGS version: 7 updated: 2012/06/16 14:55:39
+ dnl ---------------
+ dnl Check if the compiler supports useful warning options.
+ dnl
+@@ -2173,6 +2486,7 @@ AC_DEFUN([CF_GXX_WARNINGS],
+ [
+ 
+ CF_INTEL_COMPILER(GXX,INTEL_CPLUSPLUS,CXXFLAGS)
++CF_CLANG_COMPILER(GXX,CLANG_CPLUSPLUS,CXXFLAGS)
+ 
+ AC_REQUIRE([CF_GXX_VERSION])
+ 
+@@ -2464,7 +2778,7 @@ AC_DEFUN([CF_HELP_MESSAGE],
+ [AC_DIVERT_HELP([$1])dnl
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40
++dnl CF_INCLUDE_DIRS version: 7 updated: 2012/11/10 19:15:05
+ dnl ---------------
+ dnl Construct the list of include-options according to whether we're building
+ dnl in the source directory or using '--srcdir=DIR' option.  If we're building
+@@ -2472,25 +2786,25 @@ dnl with gcc, don't append the includedir if it happens to be /usr/include,
+ dnl since that usually breaks gcc's shadow-includes.
+ AC_DEFUN([CF_INCLUDE_DIRS],
+ [
+-CPPFLAGS="$CPPFLAGS -I. -I../include"
+-if test "$srcdir" != "."; then
+-	CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
+-fi
+ if test "$GCC" != yes; then
+-	CPPFLAGS="$CPPFLAGS -I\${includedir}"
++	CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ elif test "$includedir" != "/usr/include"; then
+ 	if test "$includedir" = '${prefix}/include' ; then
+ 		if test $prefix != /usr ; then
+-			CPPFLAGS="$CPPFLAGS -I\${includedir}"
++			CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 		fi
+ 	else
+-		CPPFLAGS="$CPPFLAGS -I\${includedir}"
++		CPPFLAGS="-I\${includedir} $CPPFLAGS"
+ 	fi
+ fi
++if test "$srcdir" != "."; then
++	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
++fi
++CPPFLAGS="-I. -I../include $CPPFLAGS"
+ AC_SUBST(CPPFLAGS)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
++dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
+ 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
+@@ -2504,6 +2818,7 @@ dnl $1 = GCC (default) or GXX
+ dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+ dnl $3 = CFLAGS (default) or CXXFLAGS
+ AC_DEFUN([CF_INTEL_COMPILER],[
++AC_REQUIRE([AC_CANONICAL_HOST])
+ ifelse([$2],,INTEL_COMPILER,[$2])=no
+ 
+ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+@@ -2527,7 +2842,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_ISASCII version: 3 updated: 2000/08/12 23:18:52
++dnl CF_ISASCII version: 4 updated: 2012/10/06 17:56:13
+ dnl ----------
+ dnl Check if we have either a function or macro for 'isascii()'.
+ AC_DEFUN([CF_ISASCII],
+@@ -2539,10 +2854,10 @@ AC_CACHE_VAL(cf_cv_have_isascii,[
+ 	[cf_cv_have_isascii=no])
+ ])dnl
+ AC_MSG_RESULT($cf_cv_have_isascii)
+-test "$cf_cv_have_isascii" = yes && AC_DEFINE(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: 7 updated: 2007/06/02 11:58:50
++dnl CF_LARGEFILE version: 8 updated: 2012/10/06 08:57:51
+ dnl ------------
+ dnl Add checks for large file support.
+ AC_DEFUN([CF_LARGEFILE],[
+@@ -2576,12 +2891,12 @@ ifdef([AC_FUNC_FSEEKO],[
+ 		[cf_cv_struct_dirent64=yes],
+ 		[cf_cv_struct_dirent64=no])
+ 	])
+-	test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64)
++	test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Define to 1 if we have struct dirent64])
+     fi
+ ])
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LDFLAGS_STATIC version: 8 updated: 2010/10/23 14:39:56
++dnl CF_LDFLAGS_STATIC version: 10 updated: 2011/09/24 12:51:48
+ dnl -----------------
+ dnl Check for compiler/linker flags used to temporarily force usage of static
+ dnl libraries.  This depends on the compiler and platform.  Use this to help
+@@ -2602,7 +2917,7 @@ if test "$GCC" = yes ; then
+     esac
+ else
+ 	case $cf_cv_system_name in #(
+-	aix[[456]]*) 	#( from ld manpage
++	aix[[4-7]]*) 	#( from ld manpage
+ 		LDFLAGS_STATIC=-bstatic
+ 		LDFLAGS_SHARED=-bdynamic
+ 		;;
+@@ -2652,7 +2967,17 @@ EOF
+ int cf_ldflags_static(FILE *fp);
+ ],[
+ 	return cf_ldflags_static(stdin);
+-],[cf_ldflags_static=yes],[cf_ldflags_static=no])
++],[
++	# some linkers simply ignore the -dynamic
++	case x`file conftest$ac_exeext 2>/dev/null` in #(vi
++	*static*) # (vi
++		cf_ldflags_static=no
++		;;
++	*)
++		cf_ldflags_static=yes
++		;;
++	esac
++],[cf_ldflags_static=no])
+ 
+ 	rm -f libconftest.*
+ 	LIBS="$cf_save_LIBS"
+@@ -2673,7 +2998,7 @@ AC_SUBST(LDFLAGS_STATIC)
+ AC_SUBST(LDFLAGS_SHARED)
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05
++dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
+ dnl ---------------
+ dnl For the given system and compiler, find the compiler flags to pass to the
+ dnl loader to use the "rpath" feature.
+@@ -2694,10 +3019,10 @@ irix*) #(vi
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-openbsd[[2-9]].*) #(vi
++openbsd[[2-9]].*|mirbsd*) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-freebsd*) #(vi
++dragonfly*|freebsd*) #(vi
+ 	LD_RPATH_OPT="-rpath "
+ 	;;
+ netbsd*) #(vi
+@@ -2756,11 +3081,23 @@ CF_SUBDIR_PATH($1,$2,lib)
+ $1="$cf_library_path_list [$]$1"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
++dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
++dnl ------------------
++AC_DEFUN([CF_LIBTOOL_VERSION],[
++if test -n "$LIBTOOL" && test "$LIBTOOL" != none
++then
++	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
++else
++	cf_cv_libtool_version=
++fi
++test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
+ dnl -------------
+ dnl Compute the library-prefix for the given host system
+ dnl $1 = variable to set
+-AC_DEFUN([CF_LIB_PREFIX],
++define([CF_LIB_PREFIX],
+ [
+ 	case $cf_cv_system_name in #(vi
+ 	OS/2*|os2*) #(vi
+@@ -2773,11 +3110,11 @@ ifelse($1,,,[$1=$LIB_PREFIX])
+ 	AC_SUBST(LIB_PREFIX)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_RULES version: 61 updated: 2010/10/23 16:10:30
++dnl CF_LIB_RULES version: 72 updated: 2013/03/24 17:10:41
+ 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
+-dnl subdirectory is a library-source directory, modify the LIBS_TO_MAKE list in
++dnl subdirectory is a library-source directory, modify the Libs_To_Make list in
+ dnl the corresponding makefile to list the models that we'll generate.
+ dnl
+ dnl For shared libraries, make a list of symbolic links to construct when
+@@ -2786,15 +3123,19 @@ dnl one:
+ dnl	lib<name>.so	->
+ dnl	lib<name>.so.<major>	->
+ dnl	lib<name>.so.<maj>.<minor>
++dnl
++dnl Note: Libs_To_Make is mixed case, since it is not a pure autoconf variable.
+ AC_DEFUN([CF_LIB_RULES],
+ [
+-CF_LIB_PREFIX(cf_prefix)
++cf_prefix=$LIB_PREFIX
+ AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
+ 
+-if test $cf_cv_shlib_version = cygdll ; then
++case $cf_cv_shlib_version in #(vi
++cygdll|mingw)
+ 	TINFO_NAME=$TINFO_ARG_SUFFIX
+ 	TINFO_SUFFIX=.dll
+-fi
++	;;
++esac
+ 
+ if test -n "$TINFO_SUFFIX" ; then
+ 	case $TINFO_SUFFIX in
+@@ -2820,79 +3161,73 @@ do
+ 	elif test -f $srcdir/$cf_dir/modules; then
+ 
+ 		SHARED_LIB=
+-		LIBS_TO_MAKE=
++		Libs_To_Make=
+ 		for cf_item in $cf_LIST_MODELS
+ 		do
+ 			CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf)
++			cf_libname=$cf_dir
++			test "$cf_dir" = c++ && cf_libname=ncurses++
+ 			if test $cf_item = shared ; then
+-			if test "$cf_cv_do_symlinks" = yes ; then
+-				case "$cf_cv_shlib_version" in #(vi
+-				rel) #(vi
+-					case "$cf_cv_system_name" in #(vi
+-					darwin*)
+-					case .${LIB_SUFFIX} in
+-					.tw*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+-						cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
+-						;;
+-					.t*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+-						cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
+-						;;
+-					.w*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+-						cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
++				if test -n "${LIB_SUFFIX}"
++				then
++					cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
++				else
++					cf_shared_suffix="$cf_suffix"
++				fi
++				if test "$cf_cv_do_symlinks" = yes ; then
++					cf_version_name=
++
++					case "$cf_cv_shlib_version" in #(vi
++					rel) #(vi
++						cf_version_name=REL_VERSION
+ 						;;
+-					*)
+-						cf_suffix='.${REL_VERSION}'"$cf_suffix"
++					abi)
++						cf_version_name=ABI_VERSION
+ 						;;
+ 					esac
+-					;; #(vi
+-					*) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
+-					esac
++
++					if test -n "$cf_version_name"
++					then
++						case "$cf_cv_system_name" in #(vi
++						darwin*)
++							# "w", etc?
++							cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
++							;; #(vi
++						*)
++							cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
++							;;
++						esac
++					fi
++					if test -n "${LIB_SUFFIX}"
++					then
++						cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
++					else
++						cf_shared_suffix="$cf_suffix"
++					fi
++				fi
++				# cygwin needs import library, and has unique naming convention
++				# use autodetected ${cf_prefix} for import lib and static lib, but
++				# use 'cyg' prefix for shared lib.
++				case $cf_cv_shlib_version in #(vi
++				cygdll) #(vi
++					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
++					Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
++					continue
+ 					;;
+-				abi)
+-					case "$cf_cv_system_name" in #(vi
+-					darwin*)
+-					case .${LIB_SUFFIX} in
+-					.tw*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+-						cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
+-						;;
+-					.t*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+-						cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
+-						;;
+-					.w*)
+-						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+-						cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
+-						;;
+-					*)
+-						cf_suffix='.${ABI_VERSION}'"$cf_suffix"
+-						;;
+-					esac
+-					;; #(vi
+-					*) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
+-					esac
++				mingw)
++					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
++					Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
++					continue
+ 					;;
+ 				esac
+ 			fi
+-			# cygwin needs import library, and has unique naming convention
+-			# use autodetected ${cf_prefix} for import lib and static lib, but
+-			# use 'cyg' prefix for shared lib.
+-			if test $cf_cv_shlib_version = cygdll ; then
+-				cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
+-				LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
+-				continue
+-			fi
+-			fi
+-			LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
++			Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
+ 		done
+ 
+ 		if test $cf_dir = ncurses ; then
+ 			cf_subsets="$LIB_SUBSETS"
+ 			cf_r_parts="$cf_subsets"
+-			cf_liblist="$LIBS_TO_MAKE"
++			cf_liblist="$Libs_To_Make"
+ 
+ 			while test -n "$cf_r_parts"
+ 			do
+@@ -2912,7 +3247,7 @@ do
+ 						;;
+ 					esac
+ 					if test -n "$cf_item"; then
+-						LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
++						Libs_To_Make="$cf_item $Libs_To_Make"
+ 					fi
+ 				else
+ 					break
+@@ -2922,13 +3257,40 @@ do
+ 			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
+ 		fi
+ 
+-		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
++		if test $cf_dir = c++; then
++			if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
++				cf_list=
++				for cf_item in $Libs_To_Make
++				do
++					case $cf_item in
++					*.a)
++						;;
++					*)
++						cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
++						;;
++					esac
++					for cf_test in $cf_list
++					do
++						if test "$cf_test" = "$cf_item"
++						then
++							cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
++							cf_item=
++							break
++						fi
++					done
++					test -n "$cf_item" && cf_list="$cf_list $cf_item"
++				done
++				Libs_To_Make="$cf_list"
++			fi
++		fi
++
++		sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
+ 		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
+ 			$cf_dir/Makefile >$cf_dir/Makefile.out
+ 		mv $cf_dir/Makefile.out $cf_dir/Makefile
+ 
+ 		$AWK -f $srcdir/mk-0th.awk \
+-			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
++			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
+ 			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
+ 
+ 		for cf_subset in $cf_subsets
+@@ -2936,8 +3298,23 @@ do
+ 			cf_subdirs=
+ 			for cf_item in $cf_LIST_MODELS
+ 			do
++
+ 			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
+ 			CF_UPPER(cf_ITEM,$cf_item)
++
++			CXX_MODEL=$cf_ITEM
++			if test "$CXX_MODEL" = SHARED; then
++				case $cf_cv_shlib_version in #(vi
++				cygdll|mingw) #(vi
++					test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED)
++					with_shared_cxx=yes
++					;;
++				*)
++					test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
++					;;
++				esac
++			fi
++
+ 			CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf)
+ 			CF_OBJ_SUBDIR($cf_item,cf_subdir)
+ 
+@@ -2955,6 +3332,8 @@ do
+ 					cf_libname=$TICS_LIB_SUFFIX
+ 					;;
+ 				esac
++			elif test $cf_dir = c++ ; then
++				cf_libname=ncurses++$LIB_SUFFIX
+ 			else
+ 				cf_libname=${cf_libname}$LIB_SUFFIX
+ 			fi
+@@ -3006,10 +3385,12 @@ do
+ 				name=${cf_libname}${cf_dir_suffix} \
+ 				traces=$LIB_TRACING \
+ 				MODEL=$cf_ITEM \
++				CXX_MODEL=$CXX_MODEL \
+ 				model=$cf_subdir \
+ 				prefix=$cf_prefix \
+ 				suffix=$cf_suffix \
+ 				subset=$cf_subset \
++				driver=$cf_cv_term_driver \
+ 				SymLink="$LN_S" \
+ 				TermlibRoot=$TINFO_NAME \
+ 				TermlibSuffix=$TINFO_SUFFIX \
+@@ -3048,7 +3429,7 @@ do
+ 		done
+ 	fi
+ 
+-	echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} [$]@' >>Makefile
++	echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} [$]@' >>Makefile
+ done
+ 
+ for cf_dir in $SRC_SUBDIRS
+@@ -3063,7 +3444,7 @@ do
+ 			echo 'libs \' >> Makefile
+ 			echo 'install.libs \' >> Makefile
+ 			echo 'uninstall.libs ::' >> Makefile
+-			echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} [$]@' >> Makefile
++			echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} [$]@' >> Makefile
+ 			;;
+ 		esac
+ 	fi
+@@ -3086,7 +3467,7 @@ install.libs \\
+ uninstall.libs \\
+ install.$cf_dir \\
+ uninstall.$cf_dir ::
+-	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \[$]@
++	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \[$]@
+ CF_EOF
+ 	elif test -f $srcdir/$cf_dir/headers; then
+ cat >> Makefile <<CF_EOF
+@@ -3096,7 +3477,7 @@ install.libs \\
+ uninstall.libs \\
+ install.includes \\
+ uninstall.includes ::
+-	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \[$]@
++	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \[$]@
+ CF_EOF
+ fi
+ done
+@@ -3105,7 +3486,7 @@ cat >> Makefile <<CF_EOF
+ 
+ install.libs uninstall.libs \\
+ install.data uninstall.data ::
+-$MAKE_TERMINFO	cd misc && \${MAKE} \${CF_MFLAGS} \[$]@
++$MAKE_TERMINFO	cd misc && \${MAKE} \${TOP_MFLAGS} \[$]@
+ CF_EOF
+ 
+ if test "x$cf_with_manpages" = xyes; then
+@@ -3113,7 +3494,7 @@ cat >> Makefile <<CF_EOF
+ 
+ install.man \\
+ uninstall.man ::
+-	cd man && \${MAKE} \${CF_MFLAGS} \[$]@
++	cd man && \${MAKE} \${TOP_MFLAGS} \[$]@
+ CF_EOF
+ fi
+ 
+@@ -3134,7 +3515,7 @@ cat >> Makefile <<CF_EOF
+ 
+ install.man \\
+ uninstall.man ::
+-	cd tack && \${MAKE} \${CF_MFLAGS} \[$]@
++	cd tack && \${MAKE} \${TOP_MFLAGS} \[$]@
+ CF_EOF
+ fi
+ fi
+@@ -3252,7 +3633,7 @@ CF_EOF
+ 		fi
+ 	fi
+ done
+-AC_SUBST(LIBS_TO_MAKE)
++AC_SUBST(Libs_To_Make)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_LIB_SONAME version: 5 updated: 2010/08/14 18:25:37
+@@ -3292,7 +3673,7 @@ fi
+ ])
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03
++dnl CF_LIB_SUFFIX version: 18 updated: 2012/02/25 15:20:07
+ dnl -------------
+ dnl Compute the library file-suffix from the given model name
+ dnl $1 = model name
+@@ -3321,11 +3702,11 @@ AC_DEFUN([CF_LIB_SUFFIX],
+ 		;;
+ 	shared) #(vi
+ 		case $cf_cv_system_name in
+-		aix[[56]]*) #(vi
++		aix[[5-7]]*) #(vi
+ 			$2='.a'
+ 			$3=[$]$2
+ 			;;
+-		cygwin*) #(vi
++		cygwin*|mingw*) #(vi
+ 			$2='.dll'
+ 			$3='.dll.a'
+ 			;;
+@@ -3372,7 +3753,7 @@ AC_DEFUN([CF_LIB_TYPE],
+ 	test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LINK_DATAONLY version: 9 updated: 2009/01/01 20:21:38
++dnl CF_LINK_DATAONLY version: 10 updated: 2012/10/06 17:41:51
+ 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
+@@ -3429,13 +3810,13 @@ EOF
+ AC_MSG_RESULT($cf_cv_link_dataonly)
+ 
+ if test "$cf_cv_link_dataonly" = no ; then
+-	AC_DEFINE(BROKEN_LINKER)
++	AC_DEFINE(BROKEN_LINKER,1,[if data-only library module does not link])
+ 	BROKEN_LINKER=1
+ fi
+ 
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_LINK_FUNCS version: 7 updated: 2006/12/16 12:33:30
++dnl CF_LINK_FUNCS version: 8 updated: 2012/10/06 17:56:13
+ 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.
+@@ -3487,23 +3868,11 @@ int main()
+ 		done
+ 		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
+ 	])
+-	test "$ac_cv_func_link"    = yes && AC_DEFINE(HAVE_LINK)
+-	test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK)
++	test "$ac_cv_func_link"    = yes && AC_DEFINE(HAVE_LINK,1,[Define to 1 if we have link() function])
++	test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK,1,[Define to 1 if we have symlink() function])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_MAIN_RETURN version: 1 updated: 2006/12/10 09:51:54
+-dnl --------------
+-dnl Check if a return from main to the shell actually returns the same exit
+-dnl code.  This is true for almost any POSIX environment.
+-dnl
+-dnl Some very old environments did not flush stdout, etc., on an exit.  That
+-dnl would be a useful case to test for also.
+-AC_DEFUN([CF_MAIN_RETURN],
+-[
+-cf_cv_main_return=return
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
+ dnl ------------
+ dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
+@@ -3799,7 +4168,7 @@ AC_ARG_WITH(manpage-tbl,
+ AC_MSG_RESULT($MANPAGE_TBL)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_MAN_PAGES version: 39 updated: 2010/10/23 15:44:18
++dnl CF_MAN_PAGES version: 43 updated: 2013/02/09 12:53:45
+ 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
+@@ -3856,6 +4225,7 @@ cat >$cf_edit_man <<CF_EOF
+ # this script is generated by the configure-script CF_MAN_PAGES macro.
+ 
+ prefix="$cf_prefix"
++datarootdir="$datarootdir"
+ datadir="$datadir"
+ 
+ NCURSES_MAJOR="$NCURSES_MAJOR"
+@@ -3916,11 +4286,12 @@ case \$i in #(vi
+ 	if test ! -f $cf_man_alias ; then
+ cat >>$cf_man_alias <<-CF_EOF2
+ 		s, at DATADIR@,\$datadir,g
+-		s, at TERMINFO@,\$TERMINFO,g
+-		s, at NCURSES_MAJOR@,\$NCURSES_MAJOR,g
+-		s, at NCURSES_MINOR@,\$NCURSES_MINOR,g
+-		s, at NCURSES_PATCH@,\$NCURSES_PATCH,g
+-		s, at NCURSES_OSPEED@,\$NCURSES_OSPEED,g
++		s, at TERMINFO@,\${TERMINFO:="no default value"},g
++		s, at TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
++		s, at NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
++		s, at NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
++		s, at NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
++		s, at NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
+ CF_EOF
+ 	ifelse($1,,,[
+ 	for cf_name in $1
+@@ -3949,7 +4320,9 @@ CF_EOF
+ 
+ if test "$MANPAGE_ALIASES" != no ; then
+ cat >>$cf_edit_man <<CF_EOF
+-	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
++	nCurses=ignore.3x
++	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\`
+ CF_EOF
+ fi
+ 
+@@ -3995,6 +4368,13 @@ if test \$cf_tables = yes ; then
+ fi
+ CF_EOF
+ 
++if test $with_overwrite != yes ; then
++cat >>$cf_edit_man <<CF_EOF
++	sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
++	mv \$TMP.out \$TMP
++CF_EOF
++fi
++
+ if test $with_curses_h != yes ; then
+ cat >>$cf_edit_man <<CF_EOF
+ 	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+@@ -4154,7 +4534,7 @@ ifelse($1,,[
+ fi
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
++dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
+ dnl ----------------------
+ dnl Check if the file-system supports mixed-case filenames.  If we're able to
+ dnl create a lowercase name and see it as uppercase, it doesn't support that.
+@@ -4181,10 +4561,10 @@ else
+ 	rm -f conftest CONFTEST
+ fi
+ ])
+-test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
++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: 7 updated: 2010/08/14 18:25:37
++dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49
+ 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).
+@@ -4226,11 +4606,13 @@ int main()
+ }
+ ],[cf_cv_func_mkstemp=yes
+ ],[cf_cv_func_mkstemp=no
+-],[AC_CHECK_FUNC(mkstemp)
+-])
++],[cf_cv_func_mkstemp=maybe])
+ ])
++if test "x$cf_cv_func_mkstemp" = xmaybe ; then
++	AC_CHECK_FUNC(mkstemp)
++fi
+ if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+-	AC_DEFINE(HAVE_MKSTEMP)
++	AC_DEFINE(HAVE_MKSTEMP,1,[Define to 1 if mkstemp() is available and working.])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+@@ -4258,14 +4640,14 @@ if test "${with_abi_version+set}" != set; then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
++dnl CF_NO_LEAKS_OPTION version: 5 updated: 2012/10/02 20:55:03
+ dnl ------------------
+ dnl see CF_WITH_NO_LEAKS
+ AC_DEFUN([CF_NO_LEAKS_OPTION],[
+ AC_MSG_CHECKING(if you want to use $1 for testing)
+ AC_ARG_WITH($1,
+ 	[$2],
+-	[AC_DEFINE($3)ifelse([$4],,[
++	[AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[
+ 	 $4
+ ])
+ 	: ${with_cflags:=-g}
+@@ -4326,20 +4708,23 @@ AC_DEFUN([CF_OBJ_SUBDIR],
+ 	esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PATHSEP version: 5 updated: 2010/05/26 05:38:42
++dnl CF_PATHSEP version: 6 updated: 2012/09/29 18:38:12
+ dnl ----------
+-dnl Provide a value for the $PATH and similar separator
++dnl Provide a value for the $PATH and similar separator (or amend the value
++dnl as provided in autoconf 2.5x).
+ AC_DEFUN([CF_PATHSEP],
+ [
++	AC_MSG_CHECKING(for PATH separator)
+ 	case $cf_cv_system_name in
+ 	os2*)	PATH_SEPARATOR=';'  ;;
+-	*)	PATH_SEPARATOR=':'  ;;
++	*)	${PATH_SEPARATOR:=':'}  ;;
+ 	esac
+ ifelse([$1],,,[$1=$PATH_SEPARATOR])
+ 	AC_SUBST(PATH_SEPARATOR)
++	AC_MSG_RESULT($PATH_SEPARATOR)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42
++dnl CF_PATH_SYNTAX version: 14 updated: 2012/06/19 20:58:54
+ dnl --------------
+ dnl Check the argument to see that it looks like a pathname.  Rewrite it if it
+ dnl begins with one of the prefix/exec_prefix variables, and then again if the
+@@ -4359,7 +4744,7 @@ case ".[$]$1" in #(vi
+   ;;
+ .[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
+   ;;
+-.\[$]{*prefix}*) #(vi
++.\[$]{*prefix}*|.\[$]{*dir}*) #(vi
+   eval $1="[$]$1"
+   case ".[$]$1" in #(vi
+   .NONE/*)
+@@ -4376,7 +4761,7 @@ case ".[$]$1" in #(vi
+ esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24
++dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+ dnl -------------
+ dnl Check for the package-config program, unless disabled by command-line.
+ AC_DEFUN([CF_PKG_CONFIG],
+@@ -4393,7 +4778,9 @@ no) #(vi
+ 	PKG_CONFIG=none
+ 	;;
+ yes) #(vi
+-	AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
++	CF_ACVERSION_CHECK(2.52,
++		[AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
++		[AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
+ 	;;
+ *)
+ 	PKG_CONFIG=$withval
+@@ -4554,6 +4941,19 @@ AC_PROG_AWK
+ test -z "$AWK" && AC_MSG_ERROR(No awk program found)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55
++dnl ----------
++dnl standard check for CC, plus followup sanity checks
++dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
++AC_DEFUN([CF_PROG_CC],[
++ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)])
++CF_GCC_VERSION
++CF_ACVERSION_CHECK(2.52,
++	[AC_PROG_CC_STDC],
++	[CF_ANSI_CC_REQD])
++CF_CC_ENV_FLAGS 
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37
+ dnl --------------
+ dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that
+@@ -4593,31 +4993,6 @@ else
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_CC_U_D version: 1 updated: 2005/07/14 16:59:30
+-dnl --------------
+-dnl Check if C (preprocessor) -U and -D options are processed in the order
+-dnl given rather than by type of option.  Some compilers insist on apply all
+-dnl of the -U options after all of the -D options.  Others allow mixing them,
+-dnl and may predefine symbols that conflict with those we define.
+-AC_DEFUN([CF_PROG_CC_U_D],
+-[
+-AC_CACHE_CHECK(if $CC -U and -D options work together,cf_cv_cc_u_d_options,[
+-	cf_save_CPPFLAGS="$CPPFLAGS"
+-	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
+-	AC_TRY_COMPILE([],[
+-#ifndef U_D_OPTIONS
+-make an undefined-error
+-#endif
+-#ifdef  D_U_OPTIONS
+-make a defined-error
+-#endif
+-	],[
+-	cf_cv_cc_u_d_options=yes],[
+-	cf_cv_cc_u_d_options=no])
+-	CPPFLAGS="$cf_save_CPPFLAGS"
+-])
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_PROG_EGREP version: 1 updated: 2006/09/16 11:40:59
+ dnl -------------
+ dnl AC_PROG_EGREP was introduced in autoconf 2.53.
+@@ -4633,32 +5008,7 @@ AC_DEFUN([CF_PROG_EGREP],
+ test -z "$EGREP" && AC_MSG_ERROR(No egrep program found)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
+-dnl -----------
+-dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
+-AC_DEFUN([CF_PROG_EXT],
+-[
+-AC_REQUIRE([CF_CHECK_CACHE])
+-case $cf_cv_system_name in
+-os2*)
+-    CFLAGS="$CFLAGS -Zmt"
+-    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+-    CXXFLAGS="$CXXFLAGS -Zmt"
+-    # autoconf's macro sets -Zexe and suffix both, which conflict:w
+-    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+-    ac_cv_exeext=.exe
+-    ;;
+-esac
+-
+-AC_EXEEXT
+-AC_OBJEXT
+-
+-PROG_EXT="$EXEEXT"
+-AC_SUBST(PROG_EXT)
+-test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
+-])dnl
+-dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_GNAT version: 1 updated: 2010/06/19 15:22:18
++dnl CF_PROG_GNAT version: 2 updated: 2011/10/22 14:01:47
+ dnl ------------
+ dnl Check for gnatmake, ensure that it is complete.
+ AC_DEFUN([CF_PROG_GNAT],[
+@@ -4666,6 +5016,7 @@ cf_ada_make=gnatmake
+ AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
+ if test "$ac_cv_prog_gnat_exists" = no; then
+    cf_ada_make=
++   cf_cv_prog_gnat_correct=no
+ else
+    CF_GNAT_VERSION
+    AC_CHECK_PROG(M4_exists, m4, yes, no)
+@@ -4709,7 +5060,7 @@ case $INSTALL in
+ esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_PROG_LDCONFIG version: 2 updated: 2008/12/13 14:08:40
++dnl CF_PROG_LDCONFIG version: 3 updated: 2011/06/04 20:09:13
+ dnl ----------------
+ dnl Check for ldconfig, needed to fixup shared libraries that would be built
+ dnl and then used in the install.
+@@ -4718,7 +5069,7 @@ if test "$cross_compiling" = yes ; then
+   LDCONFIG=:
+ else
+ case "$cf_cv_system_name" in #(vi
+-dragonfly*|freebsd*) #(vi
++dragonfly*|mirbsd*|freebsd*) #(vi
+   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
+   ;;
+ *) LDPATH=$PATH:/sbin:/usr/sbin
+@@ -4759,7 +5110,7 @@ AC_MSG_RESULT($cf_prog_ln_sf)
+ test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_REGEX version: 8 updated: 2010/08/07 14:09:44
++dnl CF_REGEX version: 10 updated: 2012/10/04 20:12:20
+ dnl --------
+ dnl Attempt to determine if we've got one of the flavors of regular-expression
+ dnl code that we can support.
+@@ -4771,7 +5122,7 @@ cf_regex_func=no
+ cf_regex_libs="regex re"
+ case $host_os in #(vi
+ mingw*)
+-	cf_regex_libs="regex.dll $cf_regex_libs"
++	cf_regex_libs="gnurx $cf_regex_libs"
+ 	;;
+ esac
+ 
+@@ -4833,9 +5184,9 @@ esac
+ 
+ case $cf_cv_regex_hdrs in #(vi
+     no)	       AC_MSG_WARN(no regular expression header found) ;; #(vi
+-    regex.h)   AC_DEFINE(HAVE_REGEX_H_FUNCS) ;; #(vi
+-    regexp.h)  AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;; #(vi
+-    regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;;
++    regex.h)   AC_DEFINE(HAVE_REGEX_H_FUNCS,1,[Define to 1 to include regex.h for regular expressions]) ;; #(vi
++    regexp.h)  AC_DEFINE(HAVE_REGEXP_H_FUNCS,1,[Define to 1 to include regexp.h for regular expressions]) ;; #(vi
++    regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS,1,[Define to 1 to include regexpr.h for regular expressions]) ;;
+ esac
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+@@ -4984,7 +5335,7 @@ CF_VERBOSE(...checked $1 [$]$1)
+ AC_SUBST(EXTRA_LDFLAGS)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SHARED_OPTS version: 64 updated: 2010/06/05 16:51:16
++dnl CF_SHARED_OPTS version: 72 updated: 2013/01/26 16:26:12
+ dnl --------------
+ dnl --------------
+ dnl Attempt to determine the appropriate CC/LD options for creating a shared
+@@ -5040,6 +5391,7 @@ AC_DEFUN([CF_SHARED_OPTS],
+ 	AC_MSG_RESULT($cf_cv_shlib_version)
+ 
+ 	cf_cv_rm_so_locs=no
++	cf_try_cflags=
+ 
+ 	# Some less-capable ports of gcc support only -fpic
+ 	CC_SHARED_OPTS=
+@@ -5059,10 +5411,14 @@ AC_DEFUN([CF_SHARED_OPTS],
+ 	cf_cv_shlib_version_infix=no
+ 
+ 	case $cf_cv_system_name in #(vi
+-	aix[[56]]*) #(vi
++	aix4.[3-9]*|aix[[5-7]]*) #(vi
+ 		if test "$GCC" = yes; then
+ 			CC_SHARED_OPTS=
+-			MK_SHARED_LIB='$(CC) -shared'
++			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
++		else
++			# CC_SHARED_OPTS='-qpic=large -G'
++			# perhaps "-bM:SRE -bnoentry -bexpall"
++			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ 		fi
+ 		;;
+ 	beos*) #(vi
+@@ -5088,7 +5444,7 @@ CF_EOF
+ 		chmod +x mk_shared_lib.sh
+ 		;;
+ 	darwin*) #(vi
+-		EXTRA_CFLAGS="-no-cpp-precomp"
++		cf_try_cflags="no-cpp-precomp"
+ 		CC_SHARED_OPTS="-dynamic"
+ 		MK_SHARED_LIB='${CC} ${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
+@@ -5102,6 +5458,14 @@ CF_EOF
+ 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ 		fi
+ 		;;
++	hpux[[7-8]]*) #(vi
++		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list 
++		if test "$GCC" != yes; then
++			CC_SHARED_OPTS='+Z'
++		fi
++		MK_SHARED_LIB='${LD} -b -o $[@]'
++		INSTALL_LIB="-m 555"
++		;;
+ 	hpux*) #(vi
+ 		# (tested with gcc 2.7.2 -- I don't have c89)
+ 		if test "$GCC" = yes; then
+@@ -5115,9 +5479,19 @@ CF_EOF
+ 		# readonly to exploit a quirk in the memory manager.
+ 		INSTALL_LIB="-m 555"
+ 		;;
++	interix*)
++		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
++		if test "$cf_cv_shlib_version" = rel; then
++			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
++		else
++			cf_shared_soname='`basename $@`'
++		fi
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
++		;;
+ 	irix*) #(vi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		# tested with IRIX 5.2 and 'cc'.
+ 		if test "$GCC" != yes; then
+@@ -5134,18 +5508,39 @@ CF_EOF
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CF_SHARED_SONAME
+ 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ 		;;
+-	openbsd[[2-9]].*) #(vi
++	mingw*) #(vi
++		cf_cv_shlib_version=mingw
++		cf_cv_shlib_version_infix=mingw
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
++		#MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
++		#MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
++		cat >mk_shared_lib.sh <<-CF_EOF
++		#!/bin/sh
++		SHARED_LIB=\[$]1
++		IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
++		shift
++		cat <<-EOF
++		Linking shared library
++		** SHARED_LIB \[$]SHARED_LIB
++		** IMPORT_LIB \[$]IMPORT_LIB
++EOF
++		exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
++CF_EOF
++		chmod +x mk_shared_lib.sh
++		;;
++	openbsd[[2-9]].*|mirbsd*) #(vi
+ 		if test "$DFT_LWR_MODEL" = "shared" ; then
+ 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		CF_SHARED_SONAME
+@@ -5156,12 +5551,12 @@ CF_EOF
+ 		MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ 		;;
+-	freebsd*) #(vi
++	dragonfly*|freebsd*) #(vi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+-			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CF_SHARED_SONAME
+ 		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
+@@ -5171,7 +5566,7 @@ CF_EOF
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 			if test "$cf_cv_shlib_version" = auto; then
+ 			if test -f /usr/libexec/ld.elf_so; then
+ 				cf_cv_shlib_version=abi
+@@ -5276,10 +5671,40 @@ CF_EOF
+ 		;;
+ 	esac
+ 
+-	if test -n "$cf_ld_rpath_opt" ; then
+-		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
++	if test -n "$cf_try_cflags"
++	then
++cat > conftest.$ac_ext <<EOF
++#line __oline__ "${as_me:-configure}"
++#include <stdio.h>
++int main(int argc, char *argv[[]])
++{
++	printf("hello\n");
++	return (argv[[argc-1]] == 0) ;
++}
++EOF
++		cf_save_CFLAGS="$CFLAGS"
++		for cf_opt in $cf_try_cflags
++		do
++			CFLAGS="$cf_save_CFLAGS -$cf_opt"
++			AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
++			if AC_TRY_EVAL(ac_compile); then
++				AC_MSG_RESULT(yes)
++				cf_save_CFLAGS="$CFLAGS"
++			else
++				AC_MSG_RESULT(no)
++			fi
++		done
++		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+ 
++
++	# RPATH_LIST is a colon-separated list of directories
++	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
++	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
++
++	CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
++	CF_VERBOSE(MK_SHARED_LIB:  $MK_SHARED_LIB)
++
+ 	AC_SUBST(CC_SHARED_OPTS)
+ 	AC_SUBST(LD_RPATH_OPT)
+ 	AC_SUBST(LD_SHARED_OPTS)
+@@ -5290,6 +5715,7 @@ CF_EOF
+ 	AC_SUBST(LOCAL_LDFLAGS)
+ 	AC_SUBST(LOCAL_LDFLAGS2)
+ 	AC_SUBST(INSTALL_LIB)
++	AC_SUBST(RPATH_LIST)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
+@@ -5369,7 +5795,7 @@ done
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12
++dnl CF_SIG_ATOMIC_T version: 3 updated: 2012/10/04 20:12:20
+ dnl ---------------
+ dnl signal handler, but there are some gcc depedencies in that recommendation.
+ dnl Try anyway.
+@@ -5401,10 +5827,10 @@ static void handler(int sig)
+ 	done
+ 	])
+ 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)
++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: 8 updated: 2000/11/04 12:22:16
++dnl CF_SIZECHANGE version: 9 updated: 2012/10/06 11:17:15
+ dnl -------------
+ dnl Check for definitions & structures needed for window size-changing
+ dnl FIXME: check that this works with "snake" (HP-UX 10.x)
+@@ -5465,7 +5891,7 @@ do
+ done
+ ])
+ if test "$cf_cv_sizechange" != no ; then
+-	AC_DEFINE(HAVE_SIZECHANGE)
++	AC_DEFINE(HAVE_SIZECHANGE,1,[Define to 1 if sizechar declarations are provided])
+ 	case $cf_cv_sizechange in #(vi
+ 	NEED*)
+ 		AC_DEFINE_UNQUOTED($cf_cv_sizechange )
+@@ -5474,7 +5900,7 @@ if test "$cf_cv_sizechange" != no ; then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SRC_MODULES version: 21 updated: 2010/09/04 17:37:40
++dnl CF_SRC_MODULES version: 26 updated: 2012/01/07 15:08:24
+ 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
+@@ -5497,6 +5923,7 @@ else
+ 	TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
+ fi
+ 
++PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
+ cf_cv_src_modules=
+ for cf_dir in $1
+ do
+@@ -5535,6 +5962,7 @@ do
+ 				TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ 				TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
+ 			fi
++			PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
+ 		fi
+ 	fi
+ done
+@@ -5562,10 +5990,18 @@ if test "x$cf_with_tests" != "xno" ; then
+ 	SRC_SUBDIRS="$SRC_SUBDIRS test"
+ fi
+ test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
+-test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
++if test "$cf_with_cxx_binding" != no; then
++	PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
++	SRC_SUBDIRS="$SRC_SUBDIRS c++"
++fi
++
++test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
++test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
++
++AC_SUBST(PC_MODULES_TO_MAKE)
+ 
+ ADA_SUBDIRS=
+-if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
++if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
+ 	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
+ 	ADA_SUBDIRS="gen src"
+ 	if test "x$cf_with_tests" != "xno" ; then
+@@ -5624,13 +6060,13 @@ dnl	Remove "-g" option from the compiler options
+ AC_DEFUN([CF_STRIP_G_OPT],
+ [$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_STRUCT_SIGACTION version: 3 updated: 2000/08/12 23:18:52
++dnl CF_STRUCT_SIGACTION version: 5 updated: 2012/10/06 17:56:13
+ 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.
+-dnl
+-dnl If needed, define SVR4_ACTION.
+ AC_DEFUN([CF_STRUCT_SIGACTION],[
++AC_REQUIRE([CF_XOPEN_SOURCE])
++
+ if test "$ac_cv_func_sigaction" = yes; then
+ AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE)
+ AC_TRY_COMPILE([
+@@ -5645,22 +6081,24 @@ AC_TRY_COMPILE([
+ #include <signal.h>],
+ 	[struct sigaction act],
+ 	[sigact_bad=yes
+-	 AC_DEFINE(SVR4_ACTION)],
++	 AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE])],
+ 	 [sigact_bad=unknown])])
+ AC_MSG_RESULT($sigact_bad)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_STRUCT_TERMIOS version: 5 updated: 2000/11/04 12:22:46
++dnl CF_STRUCT_TERMIOS version: 7 updated: 2012/10/06 17:56:13
+ dnl -----------------
+ dnl Some machines require _POSIX_SOURCE to completely define struct termios.
+-dnl If so, define SVR4_TERMIO
+ AC_DEFUN([CF_STRUCT_TERMIOS],[
++AC_REQUIRE([CF_XOPEN_SOURCE])
++
+ AC_CHECK_HEADERS( \
+ termio.h \
+ termios.h \
+ unistd.h \
+ )
++
+ if test "$ISC" = yes ; then
+ 	AC_CHECK_HEADERS( sys/termio.h )
+ fi
+@@ -5680,7 +6118,7 @@ if test "$ac_cv_header_termios_h" = yes ; then
+ #include <termios.h>],
+ 			[struct termios foo; int x = foo.c_iflag],
+ 			termios_bad=unknown,
+-			termios_bad=yes AC_DEFINE(SVR4_TERMIO))
++			termios_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE]))
+ 			])
+ 	AC_MSG_RESULT($termios_bad)
+ 	fi
+@@ -5704,23 +6142,6 @@ CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
+ CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SUBST version: 4 updated: 2006/06/17 12:33:03
+-dnl --------
+-dnl	Shorthand macro for substituting things that the user may override
+-dnl	with an environment variable.
+-dnl
+-dnl	$1 = long/descriptive name
+-dnl	$2 = environment variable
+-dnl	$3 = default value
+-AC_DEFUN([CF_SUBST],
+-[AC_CACHE_VAL(cf_cv_subst_$2,[
+-AC_MSG_CHECKING(for $1 (symbol $2))
+-CF_SUBST_IF([-z "[$]$2"], [$2], [$3])
+-cf_cv_subst_$2=[$]$2
+-AC_MSG_RESULT([$]$2)
+-])
+-])dnl
+-dnl ---------------------------------------------------------------------------
+ dnl CF_SUBST_IF version: 2 updated: 2006/06/17 12:33:03
+ dnl -----------
+ dnl	Shorthand macro for substituting things that the user may override
+@@ -5766,7 +6187,7 @@ AC_SUBST(cf_cv_header_stdbool_h)
+ AC_SUBST(cf_cv_type_of_bool)dnl
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40
++dnl CF_SYS_TIME_SELECT version: 5 updated: 2012/10/04 05:24:07
+ dnl ------------------
+ dnl Check if we can include <sys/time.h> with <sys/select.h>; this breaks on
+ dnl older SCO configurations.
+@@ -5786,7 +6207,7 @@ AC_TRY_COMPILE([
+      [cf_cv_sys_time_select=no])
+      ])
+ AC_MSG_RESULT($cf_cv_sys_time_select)
+-test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
++test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT,1,[Define to 1 if we can include <sys/time.h> with <sys/select.h>])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+ dnl CF_TOP_BUILDDIR version: 1 updated: 2006/10/15 16:33:23
+@@ -5798,7 +6219,46 @@ top_builddir=`pwd`
+ AC_SUBST(top_builddir)
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_TYPEOF_CHTYPE version: 8 updated: 2006/12/16 12:33:30
++dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
++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],
++	[cf_cv_xopen_source=no],
++	[cf_save="$CPPFLAGS"
++	 CPPFLAGS="$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"
++	])
++])
++
++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)
++fi
++])
++dnl ---------------------------------------------------------------------------
++dnl CF_TYPEOF_CHTYPE version: 9 updated: 2012/10/06 17:56:13
+ 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
+@@ -5847,10 +6307,10 @@ int main()
+ AC_MSG_RESULT($cf_cv_typeof_chtype)
+ 
+ AC_SUBST(cf_cv_typeof_chtype)
+-AC_DEFINE_UNQUOTED(TYPEOF_CHTYPE,$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: 3 updated: 2000/08/12 23:18:52
++dnl CF_TYPE_SIGACTION version: 4 updated: 2012/10/06 17:56:13
+ dnl -----------------
+ dnl
+ AC_DEFUN([CF_TYPE_SIGACTION],
+@@ -5863,7 +6323,7 @@ AC_CACHE_VAL(cf_cv_type_sigaction,[
+ 		[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)
++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
+@@ -5890,7 +6350,7 @@ AC_DEFUN([CF_UPPER],
+ $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
++dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51
+ dnl -----------
+ dnl Check for multibyte support, and if not found, utf8 compatibility library
+ AC_DEFUN([CF_UTF8_LIB],
+@@ -5909,14 +6369,14 @@ AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
+ # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
+ # ncurses/ncursesw:
+ if test "$cf_cv_utf8_lib" = "add-on" ; then
+-	AC_DEFINE(HAVE_LIBUTF8_H)
++	AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h])
+ 	CF_ADD_INCDIR($cf_cv_header_path_utf8)
+ 	CF_ADD_LIBDIR($cf_cv_library_path_utf8)
+ 	CF_ADD_LIBS($cf_cv_library_file_utf8)
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_VA_COPY version: 2 updated: 2010/03/04 05:37:29
++dnl CF_VA_COPY version: 3 updated: 2012/10/06 11:17:15
+ dnl ----------
+ dnl check for va_copy, part of stdarg.h
+ dnl Also, workaround for glibc's __va_copy, by checking for both.
+@@ -5931,7 +6391,7 @@ AC_TRY_LINK([
+ 	cf_cv_have_va_copy=yes,
+ 	cf_cv_have_va_copy=no)])
+ 
+-test "$cf_cv_have_va_copy" = yes && AC_DEFINE(HAVE_VA_COPY)
++test "$cf_cv_have_va_copy" = yes && AC_DEFINE(HAVE_VA_COPY,1,[Define to 1 if we have va_copy])
+ 
+ AC_CACHE_CHECK(for __va_copy, cf_cv_have___va_copy,[
+ AC_TRY_LINK([
+@@ -5943,7 +6403,7 @@ AC_TRY_LINK([
+ 	cf_cv_have___va_copy=yes,
+ 	cf_cv_have___va_copy=no)])
+ 
+-test "$cf_cv_have___va_copy" = yes && AC_DEFINE(HAVE___VA_COPY)
++test "$cf_cv_have___va_copy" = yes && AC_DEFINE(HAVE___VA_COPY,1,[Define to 1 if we have __va_copy])
+ ])
+ dnl ---------------------------------------------------------------------------
+ dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
+@@ -5954,7 +6414,7 @@ AC_DEFUN([CF_VERBOSE],
+ CF_MSG_LOG([$1])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WCHAR_TYPE version: 3 updated: 2010/05/26 16:44:57
++dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58
+ 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
+@@ -5986,7 +6446,7 @@ AC_TRY_COMPILE([
+ 	[cf_cv_$1=unknown])])])
+ 
+ if test "$cf_cv_$1" = yes ; then
+-	AC_DEFINE(NEED_WCHAR_H)
++	AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h])
+ 	NEED_WCHAR_H=1
+ fi
+ 
+@@ -6149,7 +6609,7 @@ if test "$with_dmalloc" = yes ; then
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_GPM version: 7 updated: 2008/03/23 14:48:54
++dnl CF_WITH_GPM version: 8 updated: 2012/10/06 17:56:13
+ dnl -----------
+ dnl
+ dnl The option parameter (if neither yes/no) is assumed to be the name of
+@@ -6165,10 +6625,10 @@ AC_MSG_RESULT($with_gpm)
+ 
+ if test "$with_gpm" != no ; then
+ 	AC_CHECK_HEADER(gpm.h,[
+-		AC_DEFINE(HAVE_GPM_H)
++		AC_DEFINE(HAVE_GPM_H,1,[Define to 1 if we have gpm.h header])
+ 		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
+ 			CF_VERBOSE(assuming we really have GPM library)
+-			AC_DEFINE(HAVE_LIBGPM)
++			AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library])
+ 		else
+ 			AC_CHECK_LIB(gpm,Gpm_Open,[:],[
+ 				AC_MSG_ERROR(Cannot link with GPM library)
+@@ -6182,7 +6642,7 @@ if test "$with_gpm" != no ; then
+ fi
+ ])
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_LIBTOOL version: 26 updated: 2010/10/23 15:55:24
++dnl CF_WITH_LIBTOOL version: 29 updated: 2013/04/06 18:03:09
+ dnl ---------------
+ dnl Provide a configure option to incorporate libtool.  Define several useful
+ dnl symbols for the makefile rules.
+@@ -6252,13 +6712,20 @@ ifdef([AC_PROG_LIBTOOL],[
+ 		CF_PATH_SYNTAX(with_libtool)
+ 		LIBTOOL=$with_libtool
+ 	else
+-		AC_PATH_PROG(LIBTOOL,libtool)
++		AC_CHECK_TOOLS(LIBTOOL,[libtool glibtool],none)
++		CF_LIBTOOL_VERSION
++		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
++		then
++			CF_FORGET_TOOL(LIBTOOL)
++			AC_CHECK_TOOLS(LIBTOOL,[glibtool],none)
++			CF_LIBTOOL_VERSION
++		fi
+ 	fi
+ 	if test -z "$LIBTOOL" ; then
+ 		AC_MSG_ERROR(Cannot find libtool)
+ 	fi
+ ])dnl
+-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
++	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
+ 	LIB_OBJECT='${OBJECTS:.o=.lo}'
+ 	LIB_SUFFIX=.la
+ 	LIB_CLEAN='${LIBTOOL} --mode=clean'
+@@ -6268,22 +6735,12 @@ ifdef([AC_PROG_LIBTOOL],[
+ 	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
+ 	LIB_PREP=:
+ 
+-	# Show the version of libtool
+-	AC_MSG_CHECKING(version of libtool)
+-
+-	# Save the version in a cache variable - this is not entirely a good
+-	# thing, but the version string from libtool is very ugly, and for
+-	# bug reports it might be useful to have the original string. "("
+-	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
+-	AC_MSG_RESULT($cf_cv_libtool_version)
+-	if test -z "$cf_cv_libtool_version" ; then
+-		AC_MSG_ERROR(This is not GNU libtool)
+-	fi
++	CF_CHECK_LIBTOOL_VERSION
+ 
+ 	# special hack to add -no-undefined (which libtool should do for itself)
+ 	LT_UNDEF=
+ 	case "$cf_cv_system_name" in #(vi
+-	cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
++	cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
+ 		LT_UNDEF=-no-undefined
+ 		;;
+ 	esac
+@@ -6323,7 +6780,33 @@ AC_SUBST(LIB_UNINSTALL)
+ 
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18
++dnl CF_WITH_LIB_PREFIX version: 1 updated: 2012/01/21 19:28:10
++dnl ------------------
++dnl Allow the library-prefix to be overridden.  OS/2 EMX originally had no
++dnl "lib" prefix, e.g., because it used the dll naming convention.
++dnl
++dnl $1 = variable to set
++AC_DEFUN([CF_WITH_LIB_PREFIX],
++[
++AC_MSG_CHECKING(if you want to have a library-prefix)
++AC_ARG_WITH(lib-prefix,
++	[  --with-lib-prefix       override library-prefix],
++	[with_lib_prefix=$withval],
++	[with_lib_prefix=auto])
++AC_MSG_RESULT($with_lib_prefix)
++
++if test $with_lib_prefix = auto
++then
++	CF_LIB_PREFIX($1)
++elif test $with_lib_prefix = no
++then
++	LIB_PREFIX=
++else
++	LIB_PREFIX=$with_lib_prefix
++fi
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_WITH_PATH version: 11 updated: 2012/09/29 15:04:19
+ dnl ------------
+ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
+ dnl defaulting to yes/no.
+@@ -6340,11 +6823,11 @@ ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl
+ if ifelse([$5],,true,[test -n "$5"]) ; then
+ CF_PATH_SYNTAX(withval)
+ fi
+-$3="$withval"
++eval $3="$withval"
+ AC_SUBST($3)dnl
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_PATHLIST version: 7 updated: 2010/10/23 16:10:30
++dnl CF_WITH_PATHLIST version: 9 updated: 2012/10/18 05:05:24
+ dnl ----------------
+ dnl Process an option specifying a list of colon-separated paths.
+ dnl
+@@ -6365,7 +6848,7 @@ cf_dst_path=
+ for cf_src_path in $withval
+ do
+   CF_PATH_SYNTAX(cf_src_path)
+-  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
++  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
+   cf_dst_path="${cf_dst_path}${cf_src_path}"
+ done
+ IFS="$ac_save_ifs"
+@@ -6381,12 +6864,65 @@ esac
+ cf_dst_path=`echo "$cf_dst_path" | sed -e 's/\\\\/\\\\\\\\/g'`
+ ])
+ 
+-eval '$3="$cf_dst_path"'
++# This may use the prefix/exec_prefix symbols which will only yield "NONE"
++# so we have to check/work around.  We do prefer the result of "eval"...
++eval cf_dst_eval="$cf_dst_path"
++case "x$cf_dst_eval" in #(vi
++xNONE*) #(vi
++	$3=$cf_dst_path
++	;;
++*)
++	$3="$cf_dst_eval"
++	;;
++esac
+ AC_SUBST($3)dnl
+ 
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_PTHREAD version: 3 updated: 2010/05/29 16:31:02
++dnl CF_WITH_PKG_CONFIG_LIBDIR version: 2 updated: 2011/12/10 18:58:47
++dnl -------------------------
++dnl Allow the choice of the pkg-config library directory to be overridden.
++AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
++if test "$PKG_CONFIG" != none ; then
++	AC_MSG_CHECKING(for $PKG_CONFIG library directory)
++	AC_ARG_WITH(pkg-config-libdir,
++		[  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
++		[PKG_CONFIG_LIBDIR=$withval],
++		[PKG_CONFIG_LIBDIR=yes])
++
++	case x$PKG_CONFIG_LIBDIR in #(vi
++	x/*) #(vi
++		;;
++	xyes) #(vi
++		# look for the library directory using the same prefix as the executable
++		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
++		case x`(arch) 2>/dev/null` in #(vi
++		*64) #(vi
++			for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
++			do
++				if test -d $cf_config/pkgconfig
++				then
++					PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
++					break
++				fi
++			done
++			;;
++		*)
++			PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
++			;;
++		esac
++		;;
++	*)
++		;;
++	esac
++
++	AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
++fi
++
++AC_SUBST(PKG_CONFIG_LIBDIR)
++])dnl
++dnl ---------------------------------------------------------------------------
++dnl CF_WITH_PTHREAD version: 6 updated: 2012/10/06 17:41:51
+ dnl ---------------
+ dnl Check for POSIX thread library.
+ AC_DEFUN([CF_WITH_PTHREAD],
+@@ -6400,25 +6936,30 @@ AC_MSG_RESULT($with_pthread)
+ 
+ if test "$with_pthread" != no ; then
+     AC_CHECK_HEADER(pthread.h,[
+-        AC_DEFINE(HAVE_PTHREADS_H)
++        AC_DEFINE(HAVE_PTHREADS_H,1,[Define to 1 if we have pthreads.h header])
+ 
+-        AC_MSG_CHECKING(if we can link with the pthread library)
+-        cf_save_LIBS="$LIBS"
+-        CF_ADD_LIB(pthread)
+-        AC_TRY_LINK([
++	for cf_lib_pthread in pthread c_r
++	do
++	    AC_MSG_CHECKING(if we can link with the $cf_lib_pthread library)
++	    cf_save_LIBS="$LIBS"
++	    CF_ADD_LIB($cf_lib_pthread)
++	    AC_TRY_LINK([
+ #include <pthread.h>
+ ],[
+-        int rc = pthread_create(0,0,0,0);
++		int rc = pthread_create(0,0,0,0);
++		int r2 = pthread_mutexattr_settype(0, 0);
+ ],[with_pthread=yes],[with_pthread=no])
+-        LIBS="$cf_save_LIBS"
+-        AC_MSG_RESULT($with_pthread)
+-
+-        if test "$with_pthread" = yes ; then
+-            CF_ADD_LIB(pthread)
+-            AC_DEFINE(HAVE_LIBPTHREADS)
+-        else
+-            AC_MSG_ERROR(Cannot link with pthread library)
+-        fi
++	    LIBS="$cf_save_LIBS"
++	    AC_MSG_RESULT($with_pthread)
++	    test "$with_pthread" = yes && break
++	done
++
++	if test "$with_pthread" = yes ; then
++	    CF_ADD_LIB($cf_lib_pthread)
++	    AC_DEFINE(HAVE_LIBPTHREADS,1,[Define to 1 if we have pthreads library])
++	else
++	    AC_MSG_ERROR(Cannot link with pthread library)
++	fi
+     ])
+ fi
+ ])
+@@ -6448,7 +6989,7 @@ ifelse($1,,[
+ ])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_WITH_SYSMOUSE version: 2 updated: 2003/03/22 19:13:43
++dnl CF_WITH_SYSMOUSE version: 3 updated: 2012/10/06 17:56:13
+ dnl ----------------
+ dnl If we can compile with sysmouse, make it available unless it is not wanted.
+ AC_DEFUN([CF_WITH_SYSMOUSE],[
+@@ -6474,10 +7015,30 @@ AC_ARG_WITH(sysmouse,
+ ],[cf_with_sysmouse=yes],[cf_with_sysmouse=no])
+ 	fi
+ AC_MSG_RESULT($cf_with_sysmouse)
+-test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE)
++test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE,1,[Define to 1 if we can/should use the sysmouse interface])
+ fi
+ ])dnl
+ dnl ---------------------------------------------------------------------------
++dnl CF_WITH_SYSTYPE version: 1 updated: 2013/01/26 16:26:12
++dnl ---------------
++dnl For testing, override the derived host system-type which is used to decide
++dnl things such as the linker commands used to build shared libraries.  This is
++dnl normally chosen automatically based on the type of system which you are
++dnl building on.  We use it for testing the configure script.
++dnl
++dnl This is different from the --host option: it is used only for testing parts
++dnl of the configure script which would not be reachable with --host since that
++dnl relies on the build environment being real, rather than mocked up.
++AC_DEFUN([CF_WITH_SYSTYPE],[
++CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
++AC_ARG_WITH(system-type,
++	[  --with-system-type=XXX  test: override derived host system-type],
++[AC_MSG_WARN(overriding system type to $withval)
++	cf_cv_system_name=$withval
++	host_os=$withval
++])
++])dnl
++dnl ---------------------------------------------------------------------------
+ dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
+ dnl ----------------
+ AC_DEFUN([CF_WITH_VALGRIND],[
+@@ -6486,7 +7047,7 @@ CF_NO_LEAKS_OPTION(valgrind,
+ 	[USE_VALGRIND])
+ ])dnl
+ dnl ---------------------------------------------------------------------------
+-dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
++dnl CF_XOPEN_SOURCE version: 43 updated: 2013/02/10 10:41:05
+ 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,
+@@ -6496,13 +7057,14 @@ dnl Parameters:
+ dnl	$1 is the nominal value for _XOPEN_SOURCE
+ dnl	$2 is the nominal value for _POSIX_C_SOURCE
+ AC_DEFUN([CF_XOPEN_SOURCE],[
++AC_REQUIRE([AC_CANONICAL_HOST])
+ 
+ cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
+ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
+ cf_xopen_source=
+ 
+ case $host_os in #(vi
+-aix[[456]]*) #(vi
++aix[[4-7]]*) #(vi
+ 	cf_xopen_source="-D_ALL_SOURCE"
+ 	;;
+ cygwin) #(vi
+@@ -6513,6 +7075,7 @@ darwin[[0-8]].*) #(vi
+ 	;;
+ darwin*) #(vi
+ 	cf_xopen_source="-D_DARWIN_C_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ freebsd*|dragonfly*) #(vi
+ 	# 5.x headers associate
+@@ -6530,15 +7093,23 @@ hpux*) #(vi
+ 	;;
+ irix[[56]].*) #(vi
+ 	cf_xopen_source="-D_SGI_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+ 	CF_GNU_SOURCE
+ 	;;
+ mirbsd*) #(vi
+-	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
++	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
++	cf_XOPEN_SOURCE=
++	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ 	;;
+ netbsd*) #(vi
+-	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
++	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]]*) #(vi
++	# 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
+ 	;;
+ openbsd*) #(vi
+ 	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+@@ -6552,36 +7123,11 @@ nto-qnx*) #(vi
+ sco*) #(vi
+ 	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ 	;;
+-solaris2.1[[0-9]]) #(vi
+-	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	;;
+-solaris2.[[1-9]]) #(vi
++solaris2.*) #(vi
+ 	cf_xopen_source="-D__EXTENSIONS__"
+ 	;;
+ *)
+-	AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+-	AC_TRY_COMPILE([#include <sys/types.h>],[
+-#ifndef _XOPEN_SOURCE
+-make an error
+-#endif],
+-	[cf_cv_xopen_source=no],
+-	[cf_save="$CPPFLAGS"
+-	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	 AC_TRY_COMPILE([#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"
+-	])
+-])
+-	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)
+-	fi
++	CF_TRY_XOPEN_SOURCE
+ 	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ 	;;
+ esac
+@@ -6589,4 +7135,33 @@ esac
+ if test -n "$cf_xopen_source" ; then
+ 	CF_ADD_CFLAGS($cf_xopen_source)
+ fi
++
++dnl In anything but the default case, we may have system-specific setting
++dnl which is still not guaranteed to provide all of the entrypoints that
++dnl _XOPEN_SOURCE would yield.
++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
++#endif],
++	[cf_XOPEN_SOURCE_set=yes],
++	[cf_XOPEN_SOURCE_set=no])
++	AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
++	if test $cf_XOPEN_SOURCE_set = yes
++	then
++		AC_TRY_COMPILE([#include <stdlib.h>],[
++#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
++make an error
++#endif],
++		[cf_XOPEN_SOURCE_set_ok=yes],
++		[cf_XOPEN_SOURCE_set_ok=no])
++		if test $cf_XOPEN_SOURCE_set_ok = no
++		then
++			AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
++		fi
++	else
++		CF_TRY_XOPEN_SOURCE
++	fi
++fi
+ ])
+diff --git a/announce.html.in b/announce.html.in
+index e385204..c73a5dd 100644
+--- a/announce.html.in
++++ b/announce.html.in
+@@ -1,6 +1,6 @@
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+ <!--
+-  $Id: announce.html.in,v 1.85 2011/04/04 00:05:34 tom Exp $
++  $Id: announce.html.in,v 1.86 2011/09/10 18:11:12 tom Exp $
+   ****************************************************************************
+   * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
+   *                                                                          *
+@@ -77,30 +77,38 @@
+   compatible from ncurses 5.0 through 5.8; very few applications
+   will require recompilation, depending on the platform. These are
+   the highlights from the change-log since ncurses 5.8 release.
+-  <p>
+-  This is a bug-fix release, correcting a small number of urgent problems
+-  in the ncurses library from the 5.8 release.
+-  <p>
+-  It also improves the Ada95 binding:
++
++  <p>This is a bug-fix release, correcting a small number of urgent
++  problems in the ncurses library from the 5.8 release.</p>
++
++  <p>It also improves the Ada95 binding:</p>
++
+   <ul>
+-  <li>fixes a longstanding portability problem with its use of the
+-      <a href="http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
+-      function.  Because that function uses variable-length argument lists,
+-      its interface with gnat does not work with certain platforms.
+-  <li>improves configurability and portability, particularly when built
+-      separately from the main ncurses tree.  The 5.8 release introduced
+-      scripts which can be used to construct separate tarballs for the
+-      Ada95 and ncurses examples.
+-      <p>Those were a proof of concept.  For the 5.9 release, those
+-      scripts are augmented with rpm- and dpkg-scripts used in test builds
+-      against a variety of gnat- and system ncurses versions as old as
+-      gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
+-      <a href="http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.
+-  <li>additional improvements were made for portability of the
+-      ncurses examples, adding rpm- and dpkg-scripts for test-builds.
+-      See 
+-      <a href="http://invisible-island.net/ncurses/ncurses-examples.html">this page</a>
+-      for snapshots and other information.
++    <li>fixes a longstanding portability problem with its use of
++    the <a href=
++    "http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
++    function. Because that function uses variable-length argument
++    lists, its interface with gnat does not work with certain
++    platforms.</li>
++
++    <li>improves configurability and portability, particularly when
++    built separately from the main ncurses tree. The 5.8 release
++    introduced scripts which can be used to construct separate
++    tarballs for the Ada95 and ncurses examples.
++
++      <p>Those were a proof of concept. For the 5.9 release, those
++      scripts are augmented with rpm- and dpkg-scripts used in test
++      builds against a variety of gnat- and system ncurses versions
++      as old as gnat 3.15 and ncurses 5.4 (see snapshots and
++      systems tested <a href=
++      "http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.</p>
++    </li>
++
++    <li>additional improvements were made for portability of the
++    ncurses examples, adding rpm- and dpkg-scripts for test-builds.
++    See <a href=
++    "http://invisible-island.net/ncurses/ncurses-examples.html">this
++    page</a> for snapshots and other information.</li>
+   </ul>
+ 
+   <h1>Features of Ncurses</h1>The ncurses package is fully
+@@ -364,6 +372,13 @@
+   are made available at <a href=
+   "ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a> .</p>
+ 
++  <p>There is an archive of the mailing list here:</p>
++
++  <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>
++
+   <h2>Future Plans</h2>
+ 
+   <ul>
+diff --git a/c++/Makefile.in b/c++/Makefile.in
+index 6fd8ffc..62fd4fa 100644
+--- a/c++/Makefile.in
++++ b/c++/Makefile.in
+@@ -1,6 +1,6 @@
+-# $Id: Makefile.in,v 1.93 2010/11/27 21:45:27 tom Exp $
++# $Id: Makefile.in,v 1.104 2013/04/13 18:24:43 tom Exp $
+ ##############################################################################
+-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.                #
++# Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -65,6 +65,9 @@ INSTALL_DATA	= @INSTALL_DATA@
+ 
+ AR		= @AR@
+ ARFLAGS		= @ARFLAGS@
++AWK		= @AWK@
++LD		= @LD@
++LN_S		= @LN_S@
+ 
+ CXX_AR		= @CXX_AR@
+ CXX_ARFLAGS	= @CXX_ARFLAGS@
+@@ -109,35 +112,41 @@ LIBNAME_LIBTOOL	= @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX at .la
+ LIBNAME_NORMAL	= @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX at .a
+ LIBNAME		= @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
+ 
+-MY_LIBRARY	= ../lib/$(LIBNAME)
++LIBRARIES	= @Libs_To_Make@
+ 
+ LINK_FLAGS	= @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)@LIB_SUFFIX@
++RPATH_LIST	= @RPATH_LIST@
++MK_SHARED_LIB	= @MK_SHARED_LIB@
+ 
+-LINK_LIBTOOL	= @EXTRA_LDFLAGS@ -L../lib $(MY_LIBRARY)
++LINK_LIBTOOL	= @EXTRA_LDFLAGS@ -L../lib $(LIBRARIES)
+ LINK_NORMAL	= $(LINK_FLAGS)
+ LINK_DEBUG	= $(LINK_FLAGS)
+ LINK_PROFILE	= $(LINK_FLAGS)
+ LINK_SHARED	= $(LINK_FLAGS)
+ 
++# flags for test-programs
+ TEST_LIBS	= @TEST_LIBS@
+ TEST_ARGS	= @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
+-
+-LDFLAGS		= $(TEST_ARGS) @LDFLAGS@ \
++TEST_LDFLAGS	= $(TEST_ARGS) @LDFLAGS@ \
+ 	@LD_MODEL@ $(TEST_LIBS) @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+ 
+-LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
+-LDFLAGS_NORMAL	= $(LDFLAGS) $(CFLAGS_NORMAL)
+-LDFLAGS_DEBUG	= $(LDFLAGS) $(CFLAGS_DEBUG)
+-LDFLAGS_PROFILE	= $(LDFLAGS) $(CFLAGS_PROFILE)
+-LDFLAGS_SHARED	= $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
++LDFLAGS_LIBTOOL	= $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
++LDFLAGS_NORMAL	= $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
++LDFLAGS_DEBUG	= $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
++LDFLAGS_PROFILE	= $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
++LDFLAGS_SHARED	= $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
+ 
+ LDFLAGS_DEFAULT	= $(LINK_ at DFT_UPR_MODEL@) $(LDFLAGS_ at DFT_UPR_MODEL@)
+ 
++# flags for library built by this makefile
++LDFLAGS		= $(TEST_ARGS) @LDFLAGS@ \
++	@LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
++
+ AUTO_SRC	= \
+ 		etip.h
+ 
+ all \
+-libs ::		$(AUTO_SRC) $(MY_LIBRARY)
++libs ::		$(AUTO_SRC) $(LIBRARIES)
+ 
+ @MAKE_TESTS at all ::		demo$x
+ 
+@@ -148,61 +157,16 @@ depend :
+ tags:
+ 	$(CTAGS) *.[h] *.cc
+ 
+-# Build a conventional library for installing, since a shared library would
+-# pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
+-# dependencies.
+-LIB_OBJS = \
+-	$(MODEL)/cursesf$o \
+-	$(MODEL)/cursesm$o \
+-	$(MODEL)/cursesw$o \
+-	$(MODEL)/cursespad$o \
+-	$(MODEL)/cursesp$o \
+-	$(MODEL)/cursslk$o \
+-	$(MODEL)/cursesapp$o \
+-	$(MODEL)/cursesmain$o
+-
+-../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
+-	$(CXX_AR) $(CXX_ARFLAGS) $@ $?
+-	$(RANLIB) $@
+-
+-../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
+-	cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
+-		-o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
+-		-rpath $(INSTALL_PREFIX)$(libdir) \
+-		$(LIBTOOL_VERSION) $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)
+-
+-OBJS_DEMO = $(MODEL)/demo$o
+-
+-$(MODEL)/demo$o : $(srcdir)/demo.cc \
+-	$(cursesf_h) $(cursesm_h) $(cursesapp_h)
+-
+-demo$x:	$(OBJS_DEMO) \
+-	$(MY_LIBRARY)  \
+-	@TEST_DEPS@
+-	@ECHO_LINK@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
+-
+-etip.h:	$(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
+-	cp $(srcdir)/etip.h.in $@
+-	sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+-
+ $(DESTDIR)$(libdir) :
+ 	mkdir -p $@
+ 
+-install \
+-install.libs:: $(MY_LIBRARY) $(DESTDIR)$(libdir)
+-	$(LIBTOOL_INSTALL) $(INSTALL_LIB) $(MY_LIBRARY) $(DESTDIR)$(libdir)/$(LIBNAME)
+-
+-uninstall \
+-uninstall.libs::
+-	-$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
+-
+ mostlyclean ::
+ 	-rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
+ 
+ clean :: mostlyclean
+ 	-sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
+ 	-rm -rf $(MODEL)/SunWS_cache
+-	-$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(MY_LIBRARY) $(LIB_OBJS) $(OBJS_DEMO)
++	-$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
+ 	-rm -rf .libs
+ 
+ distclean :: clean
+@@ -212,8 +176,16 @@ realclean :: distclean
+ 
+ ###############################################################################
+ 
++internal_h	= $(srcdir)/internal.h \
++		  $(INCDIR)/ncurses_cfg.h \
++		  $(INCDIR)/nc_mingw.h \
++		  $(INCDIR)/nc_string.h
++
++etip_h		= etip.h \
++		  $(INCDIR)/ncurses_dll.h
++
+ cursesw_h	= $(srcdir)/cursesw.h \
+-		  etip.h \
++		  $(etip_h) \
+ 		  $(INCDIR)/curses.h
+ 
+ cursesp_h	= $(srcdir)/cursesp.h \
+@@ -244,5 +216,26 @@ $(INCDIR)/panel.h :
+ 	cd ../panel && $(MAKE) $@
+ 
+ ###############################################################################
++
++OBJS_DEMO = $(MODEL)/demo$o
++
++$(MODEL)/demo$o : $(srcdir)/demo.cc \
++		$(internal_h) \
++		$(cursesf_h) \
++		$(cursesm_h) \
++		$(cursesapp_h)
++	@echo 'compiling demo (obj_s)'
++	@$(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(srcdir)/demo.cc -o $@
++
++demo$x:	$(OBJS_DEMO) \
++	$(LIBRARIES)  \
++	@TEST_DEPS@
++	@ECHO_LD@ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
++
++etip.h:	$(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
++	cp $(srcdir)/etip.h.in $@
++	sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
++
++###############################################################################
+ # The remainder of this file is automatically generated during configuration
+ ###############################################################################
+diff --git a/c++/cursesapp.h b/c++/cursesapp.h
+index 7e995d2..e3cbc04 100644
+--- a/c++/cursesapp.h
++++ b/c++/cursesapp.h
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2005,2011 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+  *   Author: Juergen Pfeifer, 1997                                          *
+  ****************************************************************************/
+ 
+-// $Id: cursesapp.h,v 1.11 2005/05/28 21:57:44 tom Exp $
++// $Id: cursesapp.h,v 1.12 2011/09/17 22:12:10 tom Exp $
+ 
+ #ifndef NCURSES_CURSESAPP_H_incl
+ #define NCURSES_CURSESAPP_H_incl
+@@ -80,6 +80,7 @@ protected:
+   // This method is called to initialize the SLKs. Default is nothing.
+   // You may rewrite this in your derived class
+   virtual void init_labels(Soft_Label_Key_Set& S) const {
++    (void) S;
+   }
+ 
+   // Your derived class must implement this method. The return value must
+@@ -118,6 +119,8 @@ public:
+   // Process the commandline arguments. The default implementation simply
+   // ignores them. Your derived class may rewrite this.
+   virtual void handleArgs(int argc, char* argv[]) {
++    (void) argc;
++    (void) argv;
+   }
+ 
+   // Does this application use colors?
+@@ -138,37 +141,37 @@ public:
+ 
+   // Attributes to use for menu and forms foregrounds
+   virtual chtype foregrounds() const {
+-    return b_Colors ? COLOR_PAIR(1) : A_BOLD;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(1)) : A_BOLD;
+   }
+ 
+   // Attributes to use for menu and forms backgrounds
+   virtual chtype backgrounds() const {
+-    return b_Colors ? COLOR_PAIR(2) : A_NORMAL;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(2)) : A_NORMAL;
+   }
+ 
+   // Attributes to use for inactive (menu) elements
+   virtual chtype inactives() const {
+-    return b_Colors ? (COLOR_PAIR(3)|A_DIM) : A_DIM;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(3)|A_DIM) : A_DIM;
+   }
+ 
+   // Attributes to use for (form) labels and SLKs
+   virtual chtype labels() const {
+-    return b_Colors ? COLOR_PAIR(4) : A_NORMAL;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
+   }
+ 
+   // Attributes to use for form backgrounds
+   virtual chtype dialog_backgrounds() const {
+-    return b_Colors ? COLOR_PAIR(4) : A_NORMAL;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
+   }
+ 
+   // Attributes to use as default for (form) window backgrounds
+   virtual chtype window_backgrounds() const {
+-    return b_Colors ? COLOR_PAIR(5) : A_NORMAL;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(5)) : A_NORMAL;
+   }
+ 
+   // Attributes to use for the title window
+   virtual chtype screen_titles() const {
+-    return b_Colors ? COLOR_PAIR(6) : A_BOLD;
++    return b_Colors ? static_cast<chtype>(COLOR_PAIR(6)) : A_BOLD;
+   }
+ 
+ };
+diff --git a/c++/cursesf.cc b/c++/cursesf.cc
+index aaf1202..7956054 100644
+--- a/c++/cursesf.cc
++++ b/c++/cursesf.cc
+@@ -1,6 +1,6 @@
+ // * this is for making emacs happy: -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2005,2011 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -35,7 +35,7 @@
+ #include "cursesf.h"
+ #include "cursesapp.h"
+ 
+-MODULE_ID("$Id: cursesf.cc,v 1.21 2005/08/13 18:09:06 tom Exp $")
++MODULE_ID("$Id: cursesf.cc,v 1.22 2011/09/17 22:12:10 tom Exp $")
+ 
+ NCursesFormField::~NCursesFormField ()
+ {
+@@ -234,11 +234,13 @@ NCursesForm::On_Form_Termination()
+ void
+ NCursesForm::On_Field_Init(NCursesFormField& field)
+ {
++  (void) field;
+ }
+ 
+ void
+ NCursesForm::On_Field_Termination(NCursesFormField& field)
+ {
++  (void) field;
+ }
+ 
+ // call the form driver and do basic error checking.
+@@ -260,16 +262,19 @@ NCursesForm::driver (int c)
+ 
+ void NCursesForm::On_Request_Denied(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+ void NCursesForm::On_Invalid_Field(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+ void NCursesForm::On_Unknown_Command(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+@@ -373,6 +378,7 @@ NCursesForm::virtualize(int c)
+ //
+ bool _nc_xx_fld_fcheck(FIELD *f, const void *u)
+ {
++  (void) f;
+   NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
+   assert(F != 0);
+   UserDefinedFieldType* udf = reinterpret_cast<UserDefinedFieldType*>(F->fieldtype());
+@@ -405,6 +411,7 @@ FIELDTYPE* UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice =
+ 
+ bool _nc_xx_next_choice(FIELD *f, const void *u)
+ {
++  (void) f;
+   NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
+   assert(F != 0);
+   UserDefinedFieldType_With_Choice* udf =
+@@ -415,6 +422,7 @@ bool _nc_xx_next_choice(FIELD *f, const void *u)
+ 
+ bool _nc_xx_prev_choice(FIELD *f, const void *u)
+ {
++  (void) f;
+   NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
+   assert(F != 0);
+   UserDefinedFieldType_With_Choice* udf =
+diff --git a/c++/cursesf.h b/c++/cursesf.h
+index 70a30c3..ef70541 100644
+--- a/c++/cursesf.h
++++ b/c++/cursesf.h
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+  *   Author: Juergen Pfeifer, 1997                                          *
+  ****************************************************************************/
+ 
+-// $Id: cursesf.h,v 1.28 2005/08/13 18:08:24 tom Exp $
++// $Id: cursesf.h,v 1.31 2012/12/29 21:49:58 tom Exp $
+ 
+ #ifndef NCURSES_CURSESF_H_incl
+ #define NCURSES_CURSESF_H_incl 1
+@@ -61,7 +61,7 @@ class NCURSES_IMPEXP NCursesFieldType
+ protected:
+   FIELDTYPE* fieldtype;
+ 
+-  inline void OnError(int err) const THROWS(NCursesFormException) {
++  inline void OnError(int err) const THROW2(NCursesException const, NCursesFormException) {
+     if (err!=E_OK)
+       THROW(new NCursesFormException (err));
+   }
+@@ -109,7 +109,7 @@ protected:
+   NCursesFieldType* ftype;   // Associated field type
+ 
+   // Error handler
+-  inline void OnError (int err) const THROWS(NCursesFormException) {
++  inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
+     if (err != E_OK)
+       THROW(new NCursesFormException (err));
+   }
+@@ -391,7 +391,7 @@ protected:
+ 		 bool with_frame,
+ 		 bool autoDeleteFields);
+ 
+-  inline void OnError (int err) const THROWS(NCursesFormException) {
++  inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
+     if (err != E_OK)
+       THROW(new NCursesFormException (err));
+   }
+@@ -677,7 +677,7 @@ protected:
+   }
+ 
+ public:
+-  NCursesUserForm (NCursesFormField Fields[],
++  NCursesUserForm (NCursesFormField* Fields[],
+ 		   const T* p_UserData = STATIC_CAST(T*)(0),
+ 		   bool with_frame=FALSE,
+ 		   bool autoDelete_Fields=FALSE)
+@@ -686,7 +686,7 @@ public:
+ 	set_user (const_cast<void *>(p_UserData));
+   };
+ 
+-  NCursesUserForm (NCursesFormField Fields[],
++  NCursesUserForm (NCursesFormField* Fields[],
+ 		   int nlines,
+ 		   int ncols,
+ 		   int begin_y = 0,
+diff --git a/c++/cursesm.cc b/c++/cursesm.cc
+index c253a67..222de46 100644
+--- a/c++/cursesm.cc
++++ b/c++/cursesm.cc
+@@ -1,6 +1,6 @@
+ // * this is for making emacs happy: -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2005,2011 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -35,7 +35,7 @@
+ #include "cursesm.h"
+ #include "cursesapp.h"
+ 
+-MODULE_ID("$Id: cursesm.cc,v 1.22 2005/04/02 20:39:05 tom Exp $")
++MODULE_ID("$Id: cursesm.cc,v 1.23 2011/09/17 22:11:32 tom Exp $")
+ 
+ NCursesMenuItem::~NCursesMenuItem()
+ {
+@@ -375,33 +375,39 @@ NCursesMenu::On_Menu_Termination()
+ void
+ NCursesMenu::On_Item_Init(NCursesMenuItem& item)
+ {
++  (void) item;
+ }
+ 
+ void
+ NCursesMenu::On_Item_Termination(NCursesMenuItem& item)
+ {
++  (void) item;
+ }
+ 
+ void
+ NCursesMenu::On_Request_Denied(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+ void
+ NCursesMenu::On_Not_Selectable(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+ void
+ NCursesMenu::On_No_Match(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+ 
+ void
+ NCursesMenu::On_Unknown_Command(int c) const
+ {
++  (void) c;
+   ::beep();
+ }
+diff --git a/c++/cursesm.h b/c++/cursesm.h
+index d9c2273..259d107 100644
+--- a/c++/cursesm.h
++++ b/c++/cursesm.h
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+  *   Author: Juergen Pfeifer, 1997                                          *
+  ****************************************************************************/
+ 
+-// $Id: cursesm.h,v 1.25 2005/08/13 18:10:36 tom Exp $
++// $Id: cursesm.h,v 1.29 2012/12/29 21:48:33 tom Exp $
+ 
+ #ifndef NCURSES_CURSESM_H_incl
+ #define NCURSES_CURSESM_H_incl 1
+@@ -53,7 +53,7 @@ class NCURSES_IMPEXP NCursesMenuItem
+ protected:
+   ITEM *item;
+ 
+-  inline void OnError (int err) const THROWS(NCursesMenuException) {
++  inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
+     if (err != E_OK)
+       THROW(new NCursesMenuException (err));
+   }
+@@ -82,6 +82,7 @@ public:
+   NCursesMenuItem(const NCursesMenuItem& rhs)
+     : item(0)
+   {
++    (void) rhs;
+   }
+ 
+   virtual ~NCursesMenuItem ();
+@@ -252,7 +253,7 @@ protected:
+ 		 bool with_frame,
+ 		 bool autoDeleteItems);
+ 
+-  inline void OnError (int err) const THROWS(NCursesMenuException) {
++  inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
+     if (err != E_OK)
+       THROW(new NCursesMenuException (this, err));
+   }
+@@ -635,7 +636,7 @@ protected:
+   }
+ 
+ public:
+-  NCursesUserMenu (NCursesMenuItem Items[],
++  NCursesUserMenu (NCursesMenuItem* Items[],
+ 		   const T* p_UserData = STATIC_CAST(T*)(0),
+ 		   bool with_frame=FALSE,
+ 		   bool autoDelete_Items=FALSE)
+@@ -644,7 +645,7 @@ public:
+ 	set_user (const_cast<void *>(p_UserData));
+   };
+ 
+-  NCursesUserMenu (NCursesMenuItem Items[],
++  NCursesUserMenu (NCursesMenuItem* Items[],
+ 		   int nlines,
+ 		   int ncols,
+ 		   int begin_y = 0,
+diff --git a/c++/cursesp.h b/c++/cursesp.h
+index 9b63d6d..699ec28 100644
+--- a/c++/cursesp.h
++++ b/c++/cursesp.h
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -34,7 +34,7 @@
+ #ifndef NCURSES_CURSESP_H_incl
+ #define NCURSES_CURSESP_H_incl 1
+ 
+-// $Id: cursesp.h,v 1.29 2008/08/16 17:20:23 tom Exp $
++// $Id: cursesp.h,v 1.30 2012/12/29 21:50:55 tom Exp $
+ 
+ #include <cursesw.h>
+ 
+@@ -86,7 +86,7 @@ protected:
+     return result;
+   }
+ 
+-  void OnError (int err) const THROWS(NCursesPanelException)
++  void OnError (int err) const THROW2(NCursesException const, NCursesPanelException)
+   {
+     if (err==ERR)
+       THROW(new NCursesPanelException (this, err));
+diff --git a/c++/cursespad.cc b/c++/cursespad.cc
+index 28c58fa..a534713 100644
+--- a/c++/cursespad.cc
++++ b/c++/cursespad.cc
+@@ -1,6 +1,6 @@
+ // * this is for making emacs happy: -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -33,10 +33,9 @@
+ 
+ #include "internal.h"
+ 
+-#include <etip.h>
+ #include <cursesw.h>
+ 
+-MODULE_ID("$Id: cursespad.cc,v 1.13 2008/08/04 18:59:22 tom Exp $")
++MODULE_ID("$Id: cursespad.cc,v 1.17 2013/03/30 19:45:36 tom Exp $")
+ 
+ NCursesPad::NCursesPad(int nlines, int ncols)
+   : NCursesWindow(),
+@@ -220,6 +219,7 @@ void NCursesPad::setSubWindow(NCursesWindow& sub)
+ 
+ void NCursesFramedPad::OnOperation(int pad_req)
+ {
++  (void) pad_req;
+   NCursesWindow* W = Win();
+   NCursesWindow* W2 = getWindow();
+ 
+@@ -228,25 +228,45 @@ void NCursesFramedPad::OnOperation(int pad_req)
+     int Height = W->height();
+     int i, row, col, h_len, v_len;
+ 
+-    h_len = (Width*Width + width() - 1)/width();
+-    if (h_len==0)
++    int my_width = width();
++
++    if (my_width != 0) {
++      h_len = (Width*Width + my_width - 1) / my_width;
++      if (h_len==0)
++	h_len = 1;
++      if (h_len > Width)
++	h_len = Width;
++    } else {
+       h_len = 1;
+-    if (h_len > Width)
+-      h_len = Width;
++    }
++
++    int my_height = height();
+ 
+-    v_len = (Height*Height + height() - 1)/height();
+-    if (v_len==0)
++    if (my_height != 0) {
++      v_len = (Height*Height + my_height - 1) / my_height;
++      if (v_len==0)
++	v_len = 1;
++      if (v_len > Height)
++	v_len = Height;
++    } else {
+       v_len = 1;
+-    if (v_len > Height)
+-      v_len = Height;
++    }
+ 
+-    col  = (min_col * Width + width() - 1)  / width();
+-    if (col + h_len > Width)
+-      col = Width - h_len;
++    if (my_width != 0) {
++      col  = (min_col * Width + my_width - 1) / my_width;
++      if (col + h_len > Width)
++        col = Width - h_len;
++    } else {
++      col = 0;
++    }
+ 
+-    row  = (min_row * Height + height() - 1) / height();
+-    if (row + v_len > Height)
+-      row = Height - v_len;
++    if (my_height != 0) {
++      row  = (min_row * Height + my_height - 1) / my_height;
++      if (row + v_len > Height)
++        row = Height - v_len;
++    } else {
++      row = 0;
++    }
+ 
+     W2->vline(1,Width+1,Height);
+     W2->attron(A_REVERSE);
+diff --git a/c++/cursesw.cc b/c++/cursesw.cc
+index 47e5cf6..adbcf6e 100644
+--- a/c++/cursesw.cc
++++ b/c++/cursesw.cc
+@@ -1,6 +1,6 @@
+ // * this is for making emacs happy: -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.              *
++ * Copyright (c) 2007-2011,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -42,7 +42,7 @@
+ #include "internal.h"
+ #include "cursesw.h"
+ 
+-MODULE_ID("$Id: cursesw.cc,v 1.51 2009/03/28 21:31:37 tom Exp $")
++MODULE_ID("$Id: cursesw.cc,v 1.53 2012/12/08 22:06:41 tom Exp $")
+ 
+ #define COLORS_NEED_INITIALIZATION  -1
+ #define COLORS_NOT_INITIALIZED       0
+@@ -192,7 +192,6 @@ NCursesWindow::NCursesWindow()
+     constructing();
+ 
+     w = static_cast<WINDOW *>(0);
+-    set_keyboard();
+ }
+ 
+ NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x)
+@@ -285,12 +284,14 @@ static RIPOFFINIT* prip = R_INIT;
+ NCursesWindow::NCursesWindow(WINDOW *win, int ncols)
+   : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
+ {
++    (void) ncols;
+     initialize();
+     w = win;
+ }
+ 
+ int _nc_xx_ripoff_init(WINDOW *w, int ncols)
+ {
++    (void) ncols;
+     int res = ERR;
+ 
+     RIPOFFINIT init = *prip++;
+diff --git a/c++/cursesw.h b/c++/cursesw.h
+index b8e921a..4472ea9 100644
+--- a/c++/cursesw.h
++++ b/c++/cursesw.h
+@@ -1,7 +1,7 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ // vile:cppmode
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2008,2011 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+ #ifndef NCURSES_CURSESW_H_incl
+ #define NCURSES_CURSESW_H_incl 1
+ 
+-// $Id: cursesw.h,v 1.48 2008/01/19 21:09:10 tom Exp $
++// $Id: cursesw.h,v 1.49 2011/09/17 22:12:10 tom Exp $
+ 
+ #include <etip.h>
+ 
+@@ -1438,16 +1438,19 @@ protected:
+   // The driver translates the keystroke c into an Pad_Request
+ 
+   virtual void OnUnknownOperation(int pad_req) {
++    (void) pad_req;
+     ::beep();
+   }
+   // This is called if the driver returns an unknown op-code
+ 
+   virtual void OnNavigationError(int pad_req) {
++    (void) pad_req;
+     ::beep();
+   }
+   // This is called if a navigation request couldn't be satisfied
+ 
+   virtual void OnOperation(int pad_req) {
++    (void) pad_req;
+   };
+   // OnOperation is called if a Pad_Operation was executed and just before
+   // the refresh() operation is done.
+@@ -1542,11 +1545,15 @@ public:
+   }
+ 
+   void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1) {
++    (void) view;
++    (void) v_grid;
++    (void) h_grid;
+     err_handler("Operation not allowed");
+   }
+   // Disable this call; the viewport is already defined
+ 
+   void setSubWindow(NCursesWindow& sub) {
++    (void) sub;
+     err_handler("Operation not allowed");
+   }
+   // Disable this call; the viewport subwindow is already defined
+diff --git a/c++/cursslk.cc b/c++/cursslk.cc
+index cfbc9da..23785df 100644
+--- a/c++/cursslk.cc
++++ b/c++/cursslk.cc
+@@ -1,6 +1,6 @@
+ // * this is for making emacs happy: -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2005,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -35,14 +35,15 @@
+ #include "cursslk.h"
+ #include "cursesapp.h"
+ 
+-MODULE_ID("$Id: cursslk.cc,v 1.15 2005/08/06 22:12:36 tom Exp $")
++MODULE_ID("$Id: cursslk.cc,v 1.16 2012/02/23 10:41:56 tom Exp $")
+ 
+ Soft_Label_Key_Set::Soft_Label_Key&
+   Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text)
+ {
+   delete[] label;
+-  label = new char[1 + ::strlen(text)];
+-  (::strcpy)(label,text);
++  size_t need = 1 + ::strlen(text);
++  label = new char[need];
++  ::_nc_STRCPY(label,text,need);
+   return *this;
+ }
+ 
+diff --git a/c++/demo.cc b/c++/demo.cc
+index 3543342..8bcfb14 100644
+--- a/c++/demo.cc
++++ b/c++/demo.cc
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -35,7 +35,7 @@
+  *   Demo code for NCursesMenu and NCursesForm written by
+  *   Juergen Pfeifer
+  *
+- * $Id: demo.cc,v 1.39 2008/12/07 02:07:34 juergen Exp $
++ * $Id: demo.cc,v 1.41 2012/02/23 10:41:56 tom Exp $
+  */
+ 
+ #include "internal.h"
+@@ -220,6 +220,7 @@ private:
+   int chk;
+ protected:
+   bool field_check(NCursesFormField& f) {
++    (void) f;
+     return TRUE;
+   }
+   bool char_check(int c) {
+@@ -319,7 +320,7 @@ public:
+     for(int i=1; i <= S->labels(); i++) {
+       char buf[8];
+       assert(i < 100);
+-      ::sprintf(buf, "Frm%02d", i);
++      ::_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf)) "Frm%02d", i);
+       (*S)[i] = buf;                                      // Text
+       (*S)[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
+     }
+@@ -539,7 +540,7 @@ void TestApplication::init_labels(Soft_Label_Key_Set& S) const
+   for(int i=1; i <= S.labels(); i++) {
+     char buf[8];
+     assert(i < 100);
+-    ::sprintf(buf, "Key%02d", i);
++    ::_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf)) "Key%02d", i);
+     S[i] = buf;                                      // Text
+     S[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
+   }
+diff --git a/c++/etip.h.in b/c++/etip.h.in
+index 20642a6..9f642ee 100644
+--- a/c++/etip.h.in
++++ b/c++/etip.h.in
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+  *   Author: Juergen Pfeifer, 1997                                          *
+  ****************************************************************************/
+ 
+-// $Id: etip.h.in,v 1.37 2008/08/30 19:27:32 tom Exp $
++// $Id: etip.h.in,v 1.39 2012/12/29 21:50:44 tom Exp $
+ 
+ #ifndef NCURSES_ETIP_H_incl
+ #define NCURSES_ETIP_H_incl 1
+@@ -184,7 +184,7 @@ public:
+ 
+   NCursesPanelException (const char *msg, int err) :
+     NCursesException (msg, err),
+-    p (NULL)
++    p (0)
+     {};
+ 
+   NCursesPanelException (const NCursesPanel* panel,
+@@ -196,7 +196,7 @@ public:
+ 
+   NCursesPanelException (int err) :
+     NCursesException ("panel library error", err),
+-    p (NULL)
++    p (0)
+     {};
+ 
+   NCursesPanelException (const NCursesPanel* panel,
+@@ -235,7 +235,7 @@ public:
+ 
+   NCursesMenuException (const char *msg, int err) :
+     NCursesException (msg, err),
+-    m (NULL)
++    m (0)
+     {};
+ 
+   NCursesMenuException (const NCursesMenu* menu,
+@@ -247,7 +247,7 @@ public:
+ 
+   NCursesMenuException (int err) :
+     NCursesException ("menu library error", err),
+-    m (NULL)
++    m (0)
+     {};
+ 
+   NCursesMenuException (const NCursesMenu* menu,
+@@ -286,7 +286,7 @@ public:
+ 
+   NCursesFormException (const char *msg, int err) :
+     NCursesException (msg, err),
+-    f (NULL)
++    f (0)
+     {};
+ 
+   NCursesFormException (const NCursesForm* form,
+@@ -298,7 +298,7 @@ public:
+ 
+   NCursesFormException (int err) :
+     NCursesException ("form library error", err),
+-    f (NULL)
++    f (0)
+     {};
+ 
+   NCursesFormException (const NCursesForm* form,
+@@ -367,11 +367,13 @@ inline void THROW(const NCursesException *e) {
+ #define NCURSES_CPP_TRY		/* nothing */
+ #define NCURSES_CPP_CATCH(e)	if (false)
+ #define THROWS(s)		/* nothing */
++#define THROW2(s,t)		/* nothing */
+ #elif CPP_HAS_TRY_CATCH
+   throw *e;
+ #define NCURSES_CPP_TRY		try
+ #define NCURSES_CPP_CATCH(e)	catch(e)
+ #define THROWS(s)		throw(s)
++#define THROW2(s,t)		throw(s,t)
+ #endif
+ }
+ 
+diff --git a/c++/internal.h b/c++/internal.h
+index 64d57cd..1f6b4a6 100644
+--- a/c++/internal.h
++++ b/c++/internal.h
+@@ -1,6 +1,6 @@
+ // * This makes emacs happy -*-Mode: C++;-*-
+ /****************************************************************************
+- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
++ * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc.              *
+  *                                                                          *
+  * Permission is hereby granted, free of charge, to any person obtaining a  *
+  * copy of this software and associated documentation files (the            *
+@@ -31,7 +31,7 @@
+  *   Author: Juergen Pfeifer, 1997                                          *
+  ****************************************************************************/
+ 
+-// $Id: internal.h,v 1.17 2008/12/07 02:07:34 juergen Exp $
++// $Id: internal.h,v 1.18 2012/02/23 10:41:56 tom Exp $
+ 
+ #ifndef NCURSES_CPLUS_INTERNAL_H
+ #define NCURSES_CPLUS_INTERNAL_H 1
+@@ -62,4 +62,6 @@
+ #define NULL 0
+ #endif
+ 
++#include <nc_string.h>
++
+ #endif /* NCURSES_CPLUS_INTERNAL_H */
+diff --git a/c++/modules b/c++/modules
+index bc4fae5..56ddad5 100644
+--- a/c++/modules
++++ b/c++/modules
+@@ -1,7 +1,7 @@
+ # Program modules
+-# $Id: modules,v 1.7 2006/12/24 00:53:08 tom Exp $
++# $Id: modules,v 1.11 2013/03/30 19:41:11 tom Exp $
+ ##############################################################################
+-# Copyright (c) 1998,2006 Free Software Foundation, Inc.                     #
++# Copyright (c) 1998-2006,2013 Free Software Foundation, Inc.                #
+ #                                                                            #
+ # Permission is hereby granted, free of charge, to any person obtaining a    #
+ # copy of this software and associated documentation files (the "Software"), #
+@@ -32,14 +32,13 @@
+ #
+ 
+ @ base
+-cursesf		c++		$(srcdir)	$(cursesf_h) $(cursesapp_h)
+-cursesm		c++		$(srcdir)	$(cursesm_h) $(cursesapp_h)
+-cursesp		c++		$(srcdir)	$(cursesp_h)
+-cursesw		c++		$(srcdir)	$(cursesw_h)
+-cursespad	c++		$(srcdir)	$(cursesw_h)
+-cursslk		c++		$(srcdir)	$(cursslk_h) $(cursesapp_h)
+-cursesapp	c++		$(srcdir)	$(cursesapp_h)
+-cursesmain	c++		$(srcdir)	$(cursesapp_h)
+-demo		c++		$(srcdir)	$(cursesf_h) $(cursesm_h) $(cursesapp_h)
++cursesf		c++		$(srcdir)	$(internal_h) $(cursesf_h) $(cursesapp_h)
++cursesm		c++		$(srcdir)	$(internal_h) $(cursesm_h) $(cursesapp_h)
++cursesw		c++		$(srcdir)	$(internal_h) $(cursesw_h)
++cursespad	c++		$(srcdir)	$(internal_h) $(cursesw_h)
++cursesp		c++		$(srcdir)	$(internal_h) $(cursesp_h)
++cursslk		c++		$(srcdir)	$(internal_h) $(cursesapp_h)
++cursesapp	c++		$(srcdir)	$(internal_h) $(cursesapp_h)
++cursesmain	c++		$(srcdir)	$(internal_h) $(cursesapp_h) $(INCDIR)/nc_alloc.h
+ 
+ # vile:makemode
+diff --git a/config.guess b/config.guess
+index bec935b..6ea3454 100755
+--- a/config.guess
++++ b/config.guess
+@@ -1,14 +1,12 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+-#   Free Software Foundation, Inc.
++#   Copyright 1992-2013 Free Software Foundation, Inc.
+ 
+-timestamp='2010-09-24'
++timestamp='2013-02-04'
+ 
+ # 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 2 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
+@@ -17,26 +15,22 @@ timestamp='2010-09-24'
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-
+-# Originally written by Per Bothner.  Please send patches (context
+-# diff format) to <config-patches at gnu.org> and include a ChangeLog
+-# entry.
++# the same distribution terms that you use for the rest of that
++# program.  This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub.  If it succeeds, it prints the system name on stdout, and
+-# exits with 0.  Otherwise, it exits with 1.
++# Originally written by Per Bothner.
+ #
+ # You can get the latest version of this script from:
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++#
++# Please send patches with a ChangeLog entry to config-patches at gnu.org.
++
+ 
+ me=`echo "$0" | sed -e 's,.*/,,'`
+ 
+@@ -56,9 +50,7 @@ version="\
+ GNU config.guess ($timestamp)
+ 
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+-Software Foundation, Inc.
++Copyright 1992-2013 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."
+@@ -92,7 +84,7 @@ if test $# != 0; then
+   exit 1
+ fi
+ 
+-trap 'exit 1' HUP INT TERM
++trap 'exit 1' 1 2 15
+ 
+ # 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
+@@ -106,7 +98,7 @@ trap 'exit 1' HUP INT TERM
+ 
+ set_cc_for_build='
+ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+ : ${TMPDIR=/tmp} ;
+  { 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) ; } ||
+@@ -145,7 +137,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     *:NetBSD:*:*)
+ 	# NetBSD (nbsd) targets should (where applicable) match one or
+-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+ 	# switched to ELF, *-*-netbsd* would select the old
+ 	# object file format.  This provides both forward
+@@ -202,6 +194,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ 	echo "${machine}-${os}${release}"
+ 	exit ;;
++    *:Bitrig:*:*)
++	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++	exit ;;
+     *:OpenBSD:*:*)
+ 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -220,10 +216,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	exit ;;
+     alpha:OSF1:*:*)
+ 	case $UNAME_RELEASE in
+-	    *4.0)
++	*4.0)
+ 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ 		;;
+-	    *5.*)
++	*5.*)
+ 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ 		;;
+ 	esac
+@@ -270,7 +266,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	# 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'`
+-	exit ;;
++	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++	exitcode=$?
++	trap '' 0
++	exit $exitcode ;;
+     Alpha\ *:Windows_NT*:*)
+ 	# How do we know it's Interix rather than the generic POSIX subsystem?
+ 	# Should we change UNAME_MACHINE based on the output of uname instead
+@@ -301,7 +300,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ 	echo arm-acorn-riscix${UNAME_RELEASE}
+ 	exit ;;
+-    arm:riscos:*:*|arm:RISCOS:*:*)
++    arm*:riscos:*:*|arm*:RISCOS:*:*)
+ 	echo arm-unknown-riscos
+ 	exit ;;
+     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -326,8 +325,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	    sparc) echo sparc-icl-nx7; exit ;;
+ 	esac ;;
+     s390x:SunOS:*:*)
+-    	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-    	exit ;;
++	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	exit ;;
+     sun4H:SunOS:5.*:*)
+ 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 	exit ;;
+@@ -495,7 +494,7 @@ EOF
+ 	else
+ 	    echo i586-dg-dgux${UNAME_RELEASE}
+ 	fi
+- 	exit ;;
++	exit ;;
+     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+ 	echo m88k-dolphin-sysv3
+ 	exit ;;
+@@ -597,50 +596,50 @@ EOF
+ 		    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
+-                      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
+-                          32) HP_ARCH="hppa2.0n" ;;
+-                          64) HP_ARCH="hppa2.0w" ;;
++		      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
++			  32) HP_ARCH="hppa2.0n" ;;
++			  64) HP_ARCH="hppa2.0w" ;;
+ 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+-                        esac ;;
+-                    esac
++			esac ;;
++		    esac
+ 		fi
+ 		if [ "${HP_ARCH}" = "" ]; then
+ 		    eval $set_cc_for_build
+-		    sed 's/^              //' << EOF >$dummy.c
++		    sed 's/^		//' << EOF >$dummy.c
+ 
+-              #define _HPUX_SOURCE
+-              #include <stdlib.h>
+-              #include <unistd.h>
++		#define _HPUX_SOURCE
++		#include <stdlib.h>
++		#include <unistd.h>
+ 
+-              int main ()
+-              {
+-              #if defined(_SC_KERNEL_BITS)
+-                  long bits = sysconf(_SC_KERNEL_BITS);
+-              #endif
+-                  long cpu  = sysconf (_SC_CPU_VERSION);
++		int main ()
++		{
++		#if defined(_SC_KERNEL_BITS)
++		    long bits = sysconf(_SC_KERNEL_BITS);
++		#endif
++		    long cpu  = sysconf (_SC_CPU_VERSION);
+ 
+-                  switch (cpu)
+-              	{
+-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+-              	case CPU_PA_RISC2_0:
+-              #if defined(_SC_KERNEL_BITS)
+-              	    switch (bits)
+-              		{
+-              		case 64: puts ("hppa2.0w"); break;
+-              		case 32: puts ("hppa2.0n"); break;
+-              		default: puts ("hppa2.0"); break;
+-              		} break;
+-              #else  /* !defined(_SC_KERNEL_BITS) */
+-              	    puts ("hppa2.0"); break;
+-              #endif
+-              	default: puts ("hppa1.0"); break;
+-              	}
+-                  exit (0);
+-              }
++		    switch (cpu)
++			{
++			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++			case CPU_PA_RISC2_0:
++		#if defined(_SC_KERNEL_BITS)
++			    switch (bits)
++				{
++				case 64: puts ("hppa2.0w"); break;
++				case 32: puts ("hppa2.0n"); break;
++				default: puts ("hppa2.0"); break;
++				} break;
++		#else  /* !defined(_SC_KERNEL_BITS) */
++			    puts ("hppa2.0"); break;
++		#endif
++			default: puts ("hppa1.0"); break;
++			}
++		    exit (0);
++		}
+ EOF
+ 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ 		    test -z "$HP_ARCH" && HP_ARCH=hppa
+@@ -789,21 +788,26 @@ EOF
+ 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ 	exit ;;
+     *:FreeBSD:*:*)
+-	case ${UNAME_MACHINE} in
+-	    pc98)
+-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++	UNAME_PROCESSOR=`/usr/bin/uname -p`
++	case ${UNAME_PROCESSOR} in
+ 	    amd64)
+ 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	    *)
+-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	esac
+ 	exit ;;
+     i*:CYGWIN*:*)
+ 	echo ${UNAME_MACHINE}-pc-cygwin
+ 	exit ;;
++    *:MINGW64*:*)
++	echo ${UNAME_MACHINE}-pc-mingw64
++	exit ;;
+     *:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+ 	exit ;;
++    i*:MSYS*:*)
++	echo ${UNAME_MACHINE}-pc-msys
++	exit ;;
+     i*:windows32*:*)
+ 	# uname -m includes "-pc" on this system.
+ 	echo ${UNAME_MACHINE}-mingw32
+@@ -820,8 +824,8 @@ EOF
+ 		echo x86_64-unknown-interix${UNAME_RELEASE}
+ 		exit ;;
+ 	    IA64)
+-	    	echo ia64-unknown-interix${UNAME_RELEASE}
+-	    	exit ;;
++		echo ia64-unknown-interix${UNAME_RELEASE}
++		exit ;;
+ 	esac ;;
+     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ 	echo i${UNAME_MACHINE}-pc-mks
+@@ -858,15 +862,22 @@ EOF
+     i*86:Minix:*:*)
+ 	echo ${UNAME_MACHINE}-pc-minix
+ 	exit ;;
++    aarch64:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    aarch64_be:Linux:*:*)
++	UNAME_MACHINE=aarch64_be
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
+     alpha:Linux:*:*)
+ 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+-	    EV5)   UNAME_MACHINE=alphaev5 ;;
+-	    EV56)  UNAME_MACHINE=alphaev56 ;;
+-	    PCA56) UNAME_MACHINE=alphapca56 ;;
+-	    PCA57) UNAME_MACHINE=alphapca56 ;;
+-	    EV6)   UNAME_MACHINE=alphaev6 ;;
+-	    EV67)  UNAME_MACHINE=alphaev67 ;;
+-	    EV68*) UNAME_MACHINE=alphaev68 ;;
++	  EV5)   UNAME_MACHINE=alphaev5 ;;
++	  EV56)  UNAME_MACHINE=alphaev56 ;;
++	  PCA56) UNAME_MACHINE=alphapca56 ;;
++	  PCA57) UNAME_MACHINE=alphapca56 ;;
++	  EV6)   UNAME_MACHINE=alphaev6 ;;
++	  EV67)  UNAME_MACHINE=alphaev67 ;;
++	  EV68*) UNAME_MACHINE=alphaev68 ;;
+ 	esac
+ 	objdump --private-headers /bin/sh | grep -q ld.so.1
+ 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+@@ -874,30 +885,39 @@ EOF
+ 	exit ;;
+     arm*:Linux:*:*)
+ 	eval $set_cc_for_build
+-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null | \
+-	    grep -q __ARM_EABI__
++	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++	    | grep -q __ARM_EABI__
+ 	then
+ 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	else
+-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++		| grep -q __ARM_PCS_VFP
++	    then
++		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    else
++		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++	    fi
+ 	fi
+ 	exit ;;
+     avr32*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     cris:Linux:*:*)
+-	echo cris-axis-linux-gnu
++	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     crisv32:Linux:*:*)
+-	echo crisv32-axis-linux-gnu
++	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     frv:Linux:*:*)
+-	echo frv-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    hexagon:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     i*86:Linux:*:*)
+ 	LIBC=gnu
+ 	eval $set_cc_for_build
+-	sed 's/^        //' << EOF >$dummy.c
++	sed 's/^	//' << EOF >$dummy.c
+ 	#ifdef __dietlibc__
+ 	LIBC=dietlibc
+ 	#endif
+@@ -934,14 +954,14 @@ EOF
+ 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ 	;;
+     or32:Linux:*:*)
+-    	echo or32-unknown-linux-gnu
+-    	exit ;;
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
+     padre:Linux:*:*)
+ 	echo sparc-unknown-linux-gnu
+ 	exit ;;
+     parisc64:Linux:*:* | hppa64:Linux:*:*)
+-    	echo hppa64-unknown-linux-gnu
+-    	exit ;;
++	echo hppa64-unknown-linux-gnu
++	exit ;;
+     parisc:Linux:*:* | hppa:Linux:*:*)
+ 	# Look for CPU level
+ 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -969,13 +989,13 @@ EOF
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     tile*:Linux:*:*)
+-	echo ${UNAME_MACHINE}-tilera-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     vax:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-dec-linux-gnu
+ 	exit ;;
+     x86_64:Linux:*:*)
+-	echo x86_64-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     xtensa*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -1093,7 +1113,7 @@ EOF
+ 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+-	   && { echo i486-ncr-sysv4; exit; } ;;
++	  && { echo i486-ncr-sysv4; exit; } ;;
+     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ 	OS_REL='.3'
+ 	test -r /etc/.relid \
+@@ -1136,8 +1156,8 @@ EOF
+ 		echo ns32k-sni-sysv
+ 	fi
+ 	exit ;;
+-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+-	              # says <Richard.M.Bartel at ccMail.Census.GOV>
++    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++			# says <Richard.M.Bartel at ccMail.Census.GOV>
+ 	echo i586-unisys-sysv4
+ 	exit ;;
+     *:UNIX_System_V:4*:FTX*)
+@@ -1165,9 +1185,9 @@ EOF
+ 	exit ;;
+     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ 	if [ -d /usr/nec ]; then
+-	        echo mips-nec-sysv${UNAME_RELEASE}
++		echo mips-nec-sysv${UNAME_RELEASE}
+ 	else
+-	        echo mips-unknown-sysv${UNAME_RELEASE}
++		echo mips-unknown-sysv${UNAME_RELEASE}
+ 	fi
+ 	exit ;;
+     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+@@ -1182,6 +1202,9 @@ EOF
+     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+ 	echo i586-pc-haiku
+ 	exit ;;
++    x86_64:Haiku:*:*)
++	echo x86_64-unknown-haiku
++	exit ;;
+     SX-4:SUPER-UX:*:*)
+ 	echo sx4-nec-superux${UNAME_RELEASE}
+ 	exit ;;
+@@ -1212,12 +1235,12 @@ EOF
+ 	    i386)
+ 		eval $set_cc_for_build
+ 		if [ "$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
+-		    then
+-			UNAME_PROCESSOR="x86_64"
+-		    fi
++		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++		      grep IS_64BIT_ARCH >/dev/null
++		  then
++		      UNAME_PROCESSOR="x86_64"
++		  fi
+ 		fi ;;
+ 	    unknown) UNAME_PROCESSOR=powerpc ;;
+ 	esac
+@@ -1226,8 +1249,8 @@ EOF
+     *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ 	UNAME_PROCESSOR=`uname -p`
+ 	if test "$UNAME_PROCESSOR" = "x86"; then
+-	    UNAME_PROCESSOR=i386
+-	    UNAME_MACHINE=pc
++		UNAME_PROCESSOR=i386
++		UNAME_MACHINE=pc
+ 	fi
+ 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ 	exit ;;
+@@ -1237,7 +1260,7 @@ EOF
+     NEO-?:NONSTOP_KERNEL:*:*)
+ 	echo neo-tandem-nsk${UNAME_RELEASE}
+ 	exit ;;
+-    NSE-?:NONSTOP_KERNEL:*:*)
++    NSE-*:NONSTOP_KERNEL:*:*)
+ 	echo nse-tandem-nsk${UNAME_RELEASE}
+ 	exit ;;
+     NSR-?:NONSTOP_KERNEL:*:*)
+@@ -1306,11 +1329,11 @@ EOF
+     i*86:AROS:*:*)
+ 	echo ${UNAME_MACHINE}-pc-aros
+ 	exit ;;
++    x86_64:VMkernel:*:*)
++	echo ${UNAME_MACHINE}-unknown-esx
++	exit ;;
+ esac
+ 
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c <<EOF
+ #ifdef _SEQUENT_
+@@ -1328,11 +1351,11 @@ main ()
+ #include <sys/param.h>
+   printf ("m68k-sony-newsos%s\n",
+ #ifdef NEWSOS4
+-          "4"
++	"4"
+ #else
+-	  ""
++	""
+ #endif
+-         ); exit (0);
++	); exit (0);
+ #endif
+ #endif
+ 
+diff --git a/config.sub b/config.sub
+index de11910..80211d0 100755
+--- a/config.sub
++++ b/config.sub
+@@ -1,38 +1,31 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+-#   Free Software Foundation, Inc.
++#   Copyright 1992-2013 Free Software Foundation, Inc.
+ 
+-timestamp='2010-09-11'
++timestamp='2013-02-04'
+ 
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine.  It does not imply ALL GNU software can.
+-#
+-# 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 2 of the License, or
++# 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
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-# GNU General Public License for more details.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# the same distribution terms that you use for the rest of that
++# program.  This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ 
+ 
+-# Please send patches to <config-patches at gnu.org>.  Submit a context
+-# diff and a properly formatted GNU ChangeLog entry.
++# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches at gnu.org>."
+ version="\
+ GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+-Software Foundation, Inc.
++Copyright 1992-2013 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."
+@@ -125,13 +116,17 @@ esac
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+   knetbsd*-gnu* | netbsd*-gnu* | \
+   kopensolaris*-gnu* | \
+   storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
++  android-linux)
++    os=-linux-android
++    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++    ;;
+   *)
+     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+     if [ $basic_machine != $1 ]
+@@ -154,7 +149,7 @@ case $os in
+ 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+-	-apple | -axis | -knuth | -cray | -microblaze)
++	-apple | -axis | -knuth | -cray | -microblaze*)
+ 		os=
+ 		basic_machine=$1
+ 		;;
+@@ -175,10 +170,10 @@ case $os in
+ 		os=-chorusos
+ 		basic_machine=$1
+ 		;;
+- 	-chorusrdb)
+- 		os=-chorusrdb
++	-chorusrdb)
++		os=-chorusrdb
+ 		basic_machine=$1
+- 		;;
++		;;
+ 	-hiux*)
+ 		os=-hiuxwe2
+ 		;;
+@@ -223,6 +218,12 @@ case $os in
+ 	-isc*)
+ 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ 		;;
++	-lynx*178)
++		os=-lynxos178
++		;;
++	-lynx*5)
++		os=-lynxos5
++		;;
+ 	-lynx*)
+ 		os=-lynxos
+ 		;;
+@@ -247,20 +248,27 @@ case $basic_machine in
+ 	# Some are omitted here because they have special meanings below.
+ 	1750a | 580 \
+ 	| a29k \
++	| aarch64 | aarch64_be \
+ 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ 	| am33_2.0 \
+-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++	| arc \
++	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
++	| avr | avr32 \
++	| be32 | be64 \
+ 	| bfin \
+ 	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
++	| epiphany \
+ 	| fido | fr30 | frv \
+ 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++	| hexagon \
+ 	| i370 | i860 | i960 | ia64 \
+ 	| ip2k | iq2000 \
++	| le32 | le64 \
+ 	| lm32 \
+ 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+-	| maxq | mb | microblaze | mcore | mep | metag \
++	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ 	| mips | mipsbe | mipseb | mipsel | mipsle \
+ 	| mips16 \
+ 	| mips64 | mips64el \
+@@ -278,30 +286,32 @@ case $basic_machine in
+ 	| mipsisa64r2 | mipsisa64r2el \
+ 	| mipsisa64sb1 | mipsisa64sb1el \
+ 	| mipsisa64sr71k | mipsisa64sr71kel \
++	| mipsr5900 | mipsr5900el \
+ 	| mipstx39 | mipstx39el \
+ 	| mn10200 | mn10300 \
+ 	| moxie \
+ 	| mt \
+ 	| msp430 \
+-	| nds32 | nds32le | nds32be\
+-	| nios | nios2 \
++	| nds32 | nds32le | nds32be \
++	| nios | nios2 | nios2eb | nios2el \
+ 	| ns16k | ns32k \
++	| open8 \
+ 	| or32 \
+ 	| pdp10 | pdp11 | pj | pjl \
+-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++	| powerpc | powerpc64 | powerpc64le | powerpcle \
+ 	| pyramid \
+-	| rx \
++	| rl78 | rx \
+ 	| score \
+ 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ 	| sh64 | sh64le \
+ 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+-	| spu | strongarm \
+-	| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++	| spu \
++	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ 	| ubicom32 \
+-	| v850 | v850e \
++	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ 	| we32k \
+-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| x86 | xc16x | xstormy16 | xtensa \
+ 	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+@@ -314,8 +324,7 @@ case $basic_machine in
+ 	c6x)
+ 		basic_machine=tic6x-unknown
+ 		;;
+-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+-		# Motorola 68HC11/12.
++	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ 		basic_machine=$basic_machine-unknown
+ 		os=-none
+ 		;;
+@@ -325,12 +334,27 @@ case $basic_machine in
+ 		basic_machine=mt-unknown
+ 		;;
+ 
++	strongarm | thumb | xscale)
++		basic_machine=arm-unknown
++		;;
++	xgate)
++		basic_machine=$basic_machine-unknown
++		os=-none
++		;;
++	xscaleeb)
++		basic_machine=armeb-unknown
++		;;
++
++	xscaleel)
++		basic_machine=armel-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)
+-		basic_machine=$basic_machine-pc
+-		;;
++	  basic_machine=$basic_machine-pc
++	  ;;
+ 	# Object if more than one company name word.
+ 	*-*-*)
+ 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+@@ -339,11 +363,13 @@ case $basic_machine in
+ 	# Recognize the basic CPU types with company name.
+ 	580-* \
+ 	| a29k-* \
++	| aarch64-* | aarch64_be-* \
+ 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+ 	| avr-* | avr32-* \
++	| be32-* | be64-* \
+ 	| bfin-* | bs2000-* \
+ 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+ 	| clipper-* | craynv-* | cydra-* \
+@@ -352,12 +378,15 @@ case $basic_machine in
+ 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ 	| h8300-* | h8500-* \
+ 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++	| hexagon-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+ 	| ip2k-* | iq2000-* \
++	| le32-* | le64-* \
+ 	| lm32-* \
+ 	| m32c-* | m32r-* | m32rle-* \
+ 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
++	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++	| microblaze-* | microblazeel-* \
+ 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ 	| mips16-* \
+ 	| mips64-* | mips64el-* \
+@@ -375,31 +404,34 @@ case $basic_machine in
+ 	| mipsisa64r2-* | mipsisa64r2el-* \
+ 	| mipsisa64sb1-* | mipsisa64sb1el-* \
+ 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
++	| mipsr5900-* | mipsr5900el-* \
+ 	| mipstx39-* | mipstx39el-* \
+ 	| mmix-* \
+ 	| mt-* \
+ 	| msp430-* \
+ 	| nds32-* | nds32le-* | nds32be-* \
+-	| nios-* | nios2-* \
++	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+ 	| none-* | np1-* | ns16k-* | ns32k-* \
++	| open8-* \
+ 	| orion-* \
+ 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ 	| pyramid-* \
+-	| romp-* | rs6000-* | rx-* \
++	| rl78-* | romp-* | rs6000-* | rx-* \
+ 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ 	| sparclite-* \
+-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+-	| tahoe-* | thumb-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
++	| tahoe-* \
+ 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+-	| tile-* | tilegx-* \
++	| tile*-* \
+ 	| tron-* \
+ 	| ubicom32-* \
+-	| v850-* | v850e-* | vax-* \
++	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++	| vax-* \
+ 	| we32k-* \
+-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| x86-* | x86_64-* | xc16x-* | xps100-* \
+ 	| xstormy16-* | xtensa*-* \
+ 	| ymp-* \
+ 	| z8k-* | z80-*)
+@@ -539,7 +571,7 @@ case $basic_machine in
+ 		basic_machine=craynv-cray
+ 		os=-unicosmp
+ 		;;
+-	cr16)
++	cr16 | cr16-*)
+ 		basic_machine=cr16-unknown
+ 		os=-elf
+ 		;;
+@@ -697,7 +729,6 @@ case $basic_machine in
+ 	i370-ibm* | ibm*)
+ 		basic_machine=i370-ibm
+ 		;;
+-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+ 	i*86v32)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-sysv32
+@@ -755,9 +786,13 @@ case $basic_machine in
+ 		basic_machine=ns32k-utek
+ 		os=-sysv
+ 		;;
+-	microblaze)
++	microblaze*)
+ 		basic_machine=microblaze-xilinx
+ 		;;
++	mingw64)
++		basic_machine=x86_64-pc
++		os=-mingw64
++		;;
+ 	mingw32)
+ 		basic_machine=i386-pc
+ 		os=-mingw32
+@@ -794,10 +829,18 @@ case $basic_machine in
+ 	ms1-*)
+ 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ 		;;
++	msys)
++		basic_machine=i386-pc
++		os=-msys
++		;;
+ 	mvs)
+ 		basic_machine=i370-ibm
+ 		os=-mvs
+ 		;;
++	nacl)
++		basic_machine=le32-unknown
++		os=-nacl
++		;;
+ 	ncr3000)
+ 		basic_machine=i486-ncr
+ 		os=-sysv4
+@@ -950,9 +993,10 @@ case $basic_machine in
+ 		;;
+ 	power)	basic_machine=power-ibm
+ 		;;
+-	ppc)	basic_machine=powerpc-unknown
++	ppc | ppcbe)	basic_machine=powerpc-unknown
+ 		;;
+-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++	ppc-* | ppcbe-*)
++		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	ppcle | powerpclittle | ppc-le | powerpc-little)
+ 		basic_machine=powerpcle-unknown
+@@ -977,7 +1021,11 @@ case $basic_machine in
+ 		basic_machine=i586-unknown
+ 		os=-pw32
+ 		;;
+-	rdos)
++	rdos | rdos64)
++		basic_machine=x86_64-pc
++		os=-rdos
++		;;
++	rdos32)
+ 		basic_machine=i386-pc
+ 		os=-rdos
+ 		;;
+@@ -1046,6 +1094,9 @@ case $basic_machine in
+ 		basic_machine=i860-stratus
+ 		os=-sysv4
+ 		;;
++	strongarm-* | thumb-*)
++		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	sun2)
+ 		basic_machine=m68000-sun
+ 		;;
+@@ -1102,13 +1153,8 @@ case $basic_machine in
+ 		basic_machine=t90-cray
+ 		os=-unicos
+ 		;;
+-	# This must be matched before tile*.
+-	tilegx*)
+-		basic_machine=tilegx-unknown
+-		os=-linux-gnu
+-		;;
+ 	tile*)
+-		basic_machine=tile-unknown
++		basic_machine=$basic_machine-unknown
+ 		os=-linux-gnu
+ 		;;
+ 	tx39)
+@@ -1178,6 +1224,9 @@ case $basic_machine in
+ 	xps | xps100)
+ 		basic_machine=xps100-honeywell
+ 		;;
++	xscale-* | xscalee[bl]-*)
++		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++		;;
+ 	ymp)
+ 		basic_machine=ymp-cray
+ 		os=-unicos
+@@ -1303,21 +1352,21 @@ case $os in
+ 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+-	      | -sym* | -kopensolaris* \
++	      | -sym* | -kopensolaris* | -plan9* \
+ 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ 	      | -aos* | -aros* \
+ 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+-	      | -openbsd* | -solidbsd* \
++	      | -bitrig* | -openbsd* | -solidbsd* \
+ 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ 	      | -chorusos* | -chorusrdb* | -cegcc* \
+-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-	      | -mingw32* | -linux-gnu* | -linux-android* \
+-	      | -linux-newlib* | -linux-uclibc* \
++	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ 	      | -uxpv* | -beos* | -mpeix* | -udk* \
+ 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+@@ -1449,9 +1498,6 @@ case $os in
+ 	-aros*)
+ 		os=-aros
+ 		;;
+-	-kaos*)
+-		os=-kaos
+-		;;
+ 	-zvmoe)
+ 		os=-zvmoe
+ 		;;
+@@ -1500,6 +1546,9 @@ case $basic_machine in
+ 	c4x-* | tic4x-*)
+ 		os=-coff
+ 		;;
++	hexagon-*)
++		os=-elf
++		;;
+ 	tic54x-*)
+ 		os=-coff
+ 		;;
+@@ -1527,9 +1576,6 @@ case $basic_machine in
+ 		;;
+ 	m68000-sun)
+ 		os=-sunos3
+-		# This also exists in the configure program, but was not the
+-		# default.
+-		# os=-sunos4
+ 		;;
+ 	m68*-cisco)
+ 		os=-aout
+diff --git a/configure b/configure
+index 639b790..9209d02 100755
+--- a/configure
++++ b/configure
+@@ -1,7 +1,7 @@
+ #! /bin/sh
+-# From configure.in Revision: 1.520 .
++# From configure.in Revision: 1.565 .
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by Autoconf 2.52.20101002.
++# Generated by Autoconf 2.52.20121002.
+ #
+ # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+ # Free Software Foundation, Inc.
+@@ -171,15 +171,16 @@ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+-datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datarootdir}/info'
++mandir='${datarootdir}/man'
+ 
+ # Identity of this package.
+ PACKAGE_NAME=
+@@ -230,6 +231,13 @@ do
+   | --da=*)
+     datadir=$ac_optarg ;;
+ 
++  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++  | --dataroo | --dataro | --datar)
++    ac_prev=datarootdir ;;
++  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++    datarootdir=$ac_optarg ;;
++
+   -disable-* | --disable-*)
+     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+@@ -505,7 +513,7 @@ do
+ done
+ 
+ # Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
++for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
+               localstatedir libdir includedir oldincludedir infodir mandir
+ do
+   eval ac_val=$`echo $ac_var`
+@@ -654,15 +662,16 @@ Fine tuning of the installation directories:
+   --bindir=DIR            user executables [EPREFIX/bin]
+   --sbindir=DIR           system admin executables [EPREFIX/sbin]
+   --libexecdir=DIR        program executables [EPREFIX/libexec]
+-  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
++  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
++  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+   --libdir=DIR            object code libraries [EPREFIX/lib]
+   --includedir=DIR        C header files [PREFIX/include]
+   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+-  --infodir=DIR           info documentation [PREFIX/info]
+-  --mandir=DIR            man documentation [PREFIX/man]
++  --infodir=DIR           info documentation [DATAROOTDIR/info]
++  --mandir=DIR            man documentation [DATAROOTDIR/man]
+ EOF
+ 
+   cat <<\EOF
+@@ -694,14 +703,15 @@ 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
++  --without-ada           suppress check for Ada95, don't build demo
+   --without-cxx           do not adjust ncurses bool to match C++
+   --without-cxx-binding   do not build C++ binding and demo
+-  --without-ada           suppress check for Ada95, don't build demo
+   --without-manpages      suppress install of manpages
+   --without-progs         suppress build with programs (e.g., tic)
+   --without-tests         suppress build with test-programs
+   --without-curses-h      install curses.h as ncurses.h only
+   --with-pkg-config{=path} enable/disable use of pkg-config
++  --with-pkg-config-libdir=XXX use given directory for installing pc-files
+   --enable-pc-files       generate and install .pc files for pkg-config
+   --enable-mixed-case     tic should assume mixed-case filenames
+   --with-install-prefix   prefixes actual install-location ($DESTDIR)
+@@ -719,6 +729,8 @@ Options to Specify the Libraries Built/Used:
+   --with-normal           generate normal-libraries (default)
+   --with-debug            generate debug-libraries (default)
+   --with-profile          generate profile-libraries
++  --with-cxx-shared       generate C++ shared-libraries
++  --with-lib-prefix       override library-prefix
+   --with-termlib          generate separate terminfo library
+   --with-ticlib           generate separate tic library
+   --with-gpm              use Alessandro Rubini's GPM library
+@@ -735,6 +747,7 @@ Fine-Tuning Your Configuration:
+   --with-hashed-db        specify hashed-database library
+   --with-fallbacks=XXX    specify list of fallback terminal descriptions
+   --without-xterm-new     specify if xterm terminfo should be old version
++  --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
+@@ -759,6 +772,7 @@ Fine-Tuning Your Configuration:
+   --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
++  --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
+@@ -796,8 +810,9 @@ Experimental Code:
+   --disable-scroll-hints  compile without scroll-hints code
+   --enable-wgetch-events  compile with experimental wgetch-events code
+ Testing/development Options:
+-  --enable-echo           build: display "compiling" commands (default)
++  --disable-echo          do not display "compiling" commands
+   --enable-warnings       build: turn on GCC compiler warnings
++  --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
+   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
+@@ -883,7 +898,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.20101002.  Invocation command line was
++generated by GNU Autoconf 2.52.20121002.  Invocation command line was
+ 
+   $ $0 $@
+ 
+@@ -1007,7 +1022,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:1010: loading site script $ac_site_file" >&5
++    { echo "$as_me:1025: 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"
+@@ -1018,7 +1033,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:1021: loading cache $cache_file" >&5
++    { echo "$as_me:1036: loading cache $cache_file" >&5
+ echo "$as_me: loading cache $cache_file" >&6;}
+     case $cache_file in
+       [\\/]* | ?:[\\/]* ) . $cache_file;;
+@@ -1026,7 +1041,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
+     esac
+   fi
+ else
+-  { echo "$as_me:1029: creating cache $cache_file" >&5
++  { echo "$as_me:1044: creating cache $cache_file" >&5
+ echo "$as_me: creating cache $cache_file" >&6;}
+   >$cache_file
+ fi
+@@ -1042,21 +1057,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:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++      { echo "$as_me:1060: 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:1049: error: \`$ac_var' was not set in the previous run" >&5
++      { echo "$as_me:1064: 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:1055: error: \`$ac_var' has changed since the previous run:" >&5
++        { echo "$as_me:1070: 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:1057:   former value:  $ac_old_val" >&5
++        { echo "$as_me:1072:   former value:  $ac_old_val" >&5
+ echo "$as_me:   former value:  $ac_old_val" >&2;}
+-        { echo "$as_me:1059:   current value: $ac_new_val" >&5
++        { echo "$as_me:1074:   current value: $ac_new_val" >&5
+ echo "$as_me:   current value: $ac_new_val" >&2;}
+         ac_cache_corrupted=:
+       fi;;
+@@ -1075,9 +1090,9 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
+   fi
+ done
+ if $ac_cache_corrupted; then
+-  { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
++  { echo "$as_me:1093: 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:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++  { { echo "$as_me:1095: 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
+@@ -1098,10 +1113,10 @@ esac
+ echo "#! $SHELL" >conftest.sh
+ echo  "exit 0"   >>conftest.sh
+ chmod +x conftest.sh
+-if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
++if { (echo "$as_me:1116: PATH=\".;.\"; conftest.sh") >&5
+   (PATH=".;."; conftest.sh) 2>&5
+   ac_status=$?
+-  echo "$as_me:1104: \$? = $ac_status" >&5
++  echo "$as_me:1119: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+   ac_path_separator=';'
+ else
+@@ -1114,7 +1129,7 @@ ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.
+ 
+ top_builddir=`pwd`
+ 
+-echo "$as_me:1117: checking for egrep" >&5
++echo "$as_me:1132: checking for egrep" >&5
+ echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+ if test "${ac_cv_prog_egrep+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -1124,11 +1139,11 @@ else
+     else ac_cv_prog_egrep='egrep'
+     fi
+ fi
+-echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
++echo "$as_me:1142: result: $ac_cv_prog_egrep" >&5
+ echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+  EGREP=$ac_cv_prog_egrep
+ 
+-test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
++test -z "$EGREP" && { { echo "$as_me:1146: error: No egrep program found" >&5
+ echo "$as_me: error: No egrep program found" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+@@ -1138,7 +1153,7 @@ NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -
+ cf_cv_abi_version=${NCURSES_MAJOR}
+ cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+ cf_cv_timestamp=`date`
+-echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
++echo "$as_me:1156: 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
+ 
+ test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+@@ -1146,7 +1161,7 @@ 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:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
++  { echo "$as_me:1164: 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;
+@@ -1159,13 +1174,13 @@ if test -n "$NCURSES_MAJOR" ; then
+   [0-9]*) #(vi
+  	;;
+   *)
+-	{ { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
++	{ { echo "$as_me:1177: 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:1168: error: Release major-version value is empty" >&5
++  { { echo "$as_me:1183: error: Release major-version value is empty" >&5
+ echo "$as_me: error: Release major-version value is empty" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -1175,13 +1190,13 @@ if test -n "$NCURSES_MINOR" ; then
+   [0-9]*) #(vi
+  	;;
+   *)
+-	{ { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
++	{ { echo "$as_me:1193: 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:1184: error: Release minor-version value is empty" >&5
++  { { echo "$as_me:1199: error: Release minor-version value is empty" >&5
+ echo "$as_me: error: Release minor-version value is empty" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -1191,7 +1206,7 @@ test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+ # Check whether --with-abi-version or --without-abi-version was given.
+ if test "${with_abi_version+set}" = set; then
+   withval="$with_abi_version"
+-  { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
++  { echo "$as_me:1209: 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;}
+  cf_cv_abi_version=$withval
+ fi;
+@@ -1201,13 +1216,13 @@ if test -n "$cf_cv_abi_version" ; then
+   [0-9]*) #(vi
+  	;;
+   *)
+-	{ { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
++	{ { echo "$as_me:1219: 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:1210: error: ABI version value is empty" >&5
++  { { echo "$as_me:1225: error: ABI version value is empty" >&5
+ echo "$as_me: error: ABI version value is empty" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -1229,7 +1244,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+   fi
+ done
+ if test -z "$ac_aux_dir"; then
+-  { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
++  { { echo "$as_me:1247: 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
+@@ -1239,11 +1254,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:1242: error: cannot run $ac_config_sub" >&5
++  { { echo "$as_me:1257: error: cannot run $ac_config_sub" >&5
+ echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+-echo "$as_me:1246: checking build system type" >&5
++echo "$as_me:1261: 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
+@@ -1252,23 +1267,23 @@ else
+ test -z "$ac_cv_build_alias" &&
+   ac_cv_build_alias=`$ac_config_guess`
+ test -z "$ac_cv_build_alias" &&
+-  { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
++  { { echo "$as_me:1270: 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:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
++  { { echo "$as_me:1274: 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:1264: result: $ac_cv_build" >&5
++echo "$as_me:1279: 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:1271: checking host system type" >&5
++echo "$as_me:1286: 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
+@@ -1277,12 +1292,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:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
++  { { echo "$as_me:1295: 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:1285: result: $ac_cv_host" >&5
++echo "$as_me:1300: 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/'`
+@@ -1290,7 +1305,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:1293: checking target system type" >&5
++	echo "$as_me:1308: 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
+@@ -1299,12 +1314,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:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
++  { { echo "$as_me:1317: 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:1307: result: $ac_cv_target" >&5
++echo "$as_me:1322: 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/'`
+@@ -1324,7 +1339,8 @@ else
+ 		system_name="`(hostname) 2>/dev/null`"
+ 	fi
+ fi
+-test -n "$system_name" && cat >>confdefs.h <<EOF
++test -n "$system_name" &&
++cat >>confdefs.h <<EOF
+ #define SYSTEM_NAME "$system_name"
+ EOF
+ 
+@@ -1335,13 +1351,13 @@ else
+ fi
+ 
+ test -z "$system_name" && system_name="$cf_cv_system_name"
+-test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
++test -n "$cf_cv_system_name" && echo "$as_me:1354: 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:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
++	echo "$as_me:1358: 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:1344: error: \"Please remove config.cache and try again.\"" >&5
++	{ { echo "$as_me:1360: 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
+@@ -1349,9 +1365,11 @@ 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:1352: WARNING: overriding system type to $withval" >&5
++  { echo "$as_me:1368: WARNING: overriding system type to $withval" >&5
+ echo "$as_me: WARNING: overriding system type to $withval" >&2;}
+- cf_cv_system_name=$withval
++	cf_cv_system_name=$withval
++	host_os=$withval
++
+ fi;
+ 
+ ###	Save the given $CFLAGS to allow user-override.
+@@ -1359,23 +1377,23 @@ cf_user_CFLAGS="$CFLAGS"
+ 
+ ###	Default install-location
+ 
+-echo "$as_me:1362: checking for prefix" >&5
++echo "$as_me:1380: 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
+ 		# non-vendor systems don't have a conflict
+-	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
++	openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
+ 		prefix=/usr
+ 		;;
+ 	*)	prefix=$ac_default_prefix
+ 		;;
+ 	esac
+ fi
+-echo "$as_me:1374: result: $prefix" >&5
++echo "$as_me:1392: result: $prefix" >&5
+ echo "${ECHO_T}$prefix" >&6
+ 
+ if test "x$prefix" = "xNONE" ; then
+-echo "$as_me:1378: checking for default include-directory" >&5
++echo "$as_me:1396: 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 \
+@@ -1398,11 +1416,26 @@ do
+ 	fi
+ 	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
+ done
+-echo "$as_me:1401: result: $includedir" >&5
++echo "$as_me:1419: result: $includedir" >&5
+ echo "${ECHO_T}$includedir" >&6
+ fi
+ 
+ ###	Checks for programs.
++
++# Check whether --with-ada or --without-ada was given.
++if test "${with_ada+set}" = set; then
++  withval="$with_ada"
++  cf_with_ada=$withval
++else
++  cf_with_ada=yes
++fi;
++if test "x$cf_with_ada" = xyes
++then
++	cf_PROG_CC="gnatgcc gcc cc"
++else
++	cf_PROG_CC="gcc cc"
++fi
++
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -1410,213 +1443,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_main_return=return
+ if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}gcc; ac_word=$2
+-echo "$as_me:1415: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}gcc"
+-echo "$as_me:1430: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1438: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1441: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+-  ac_ct_CC=$CC
+-  # Extract the first word of "gcc", so it can be a program name with args.
+-set dummy gcc; ac_word=$2
+-echo "$as_me:1450: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$ac_ct_CC"; then
+-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="gcc"
+-echo "$as_me:1465: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1473: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
+-else
+-  echo "$as_me:1476: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-  CC=$ac_ct_CC
+-else
+-  CC="$ac_cv_prog_CC"
+-fi
+-
+-if test -z "$CC"; then
+-  if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}cc; ac_word=$2
+-echo "$as_me:1489: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}cc"
+-echo "$as_me:1504: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1512: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1515: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+-  ac_ct_CC=$CC
+-  # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:1524: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$ac_ct_CC"; then
+-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="cc"
+-echo "$as_me:1539: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1547: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
+-else
+-  echo "$as_me:1550: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-  CC=$ac_ct_CC
+-else
+-  CC="$ac_cv_prog_CC"
+-fi
+-
+-fi
+-if test -z "$CC"; then
+-  # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:1563: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$CC"; then
+-  ac_cv_prog_CC="$CC" # Let the user override the test.
+-else
+-  ac_prog_rejected=no
+-  ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+-  IFS=$ac_save_IFS
+-  test -z "$ac_dir" && ac_dir=.
+-  $as_executable_p "$ac_dir/$ac_word" || continue
+-if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+-  ac_prog_rejected=yes
+-  continue
+-fi
+-ac_cv_prog_CC="cc"
+-echo "$as_me:1583: found $ac_dir/$ac_word" >&5
+-break
+-done
+-
+-if test $ac_prog_rejected = yes; then
+-  # We found a bogon in the path, so make sure we never use it.
+-  set dummy $ac_cv_prog_CC
+-  shift
+-  if test $# != 0; then
+-    # We chose a different compiler from the bogus one.
+-    # However, it has the same basename, so the bogon will be chosen
+-    # first if we set CC to just the basename; use the full file name.
+-    shift
+-    set dummy "$ac_dir/$ac_word" ${1+"$@"}
+-    shift
+-    ac_cv_prog_CC="$@"
+-  fi
+-fi
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+-  echo "$as_me:1605: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+-  echo "$as_me:1608: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$CC"; then
+-  if test -n "$ac_tool_prefix"; then
+-  for ac_prog in cl
++  for ac_prog in $cf_PROG_CC
+   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:1619: checking for $ac_word" >&5
++echo "$as_me:1450: 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
+@@ -1631,7 +1462,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:1634: found $ac_dir/$ac_word" >&5
++echo "$as_me:1465: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -1639,10 +1470,10 @@ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  echo "$as_me:1642: result: $CC" >&5
++  echo "$as_me:1473: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+-  echo "$as_me:1645: result: no" >&5
++  echo "$as_me:1476: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -1651,11 +1482,11 @@ fi
+ fi
+ if test -z "$CC"; then
+   ac_ct_CC=$CC
+-  for ac_prog in cl
++  for ac_prog in $cf_PROG_CC
+ 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:1658: checking for $ac_word" >&5
++echo "$as_me:1489: 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
+@@ -1670,7 +1501,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:1673: found $ac_dir/$ac_word" >&5
++echo "$as_me:1504: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -1678,10 +1509,10 @@ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+-  echo "$as_me:1681: result: $ac_ct_CC" >&5
++  echo "$as_me:1512: result: $ac_ct_CC" >&5
+ echo "${ECHO_T}$ac_ct_CC" >&6
+ else
+-  echo "$as_me:1684: result: no" >&5
++  echo "$as_me:1515: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -1691,34 +1522,32 @@ done
+   CC=$ac_ct_CC
+ fi
+ 
+-fi
+-
+-test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
++test -z "$CC" && { { echo "$as_me:1525: 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:1701:" \
++echo "$as_me:1530:" \
+      "checking for C compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1533: \"$ac_compiler --version </dev/null >&5\"") >&5
+   (eval $ac_compiler --version </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1707: \$? = $ac_status" >&5
++  echo "$as_me:1536: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1538: \"$ac_compiler -v </dev/null >&5\"") >&5
+   (eval $ac_compiler -v </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1712: \$? = $ac_status" >&5
++  echo "$as_me:1541: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
++{ (eval echo "$as_me:1543: \"$ac_compiler -V </dev/null >&5\"") >&5
+   (eval $ac_compiler -V </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:1717: \$? = $ac_status" >&5
++  echo "$as_me:1546: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1721 "configure"
++#line 1550 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1734,13 +1563,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:1737: checking for C compiler default output" >&5
++echo "$as_me:1566: 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:1740: \"$ac_link_default\"") >&5
++if { (eval echo "$as_me:1569: \"$ac_link_default\"") >&5
+   (eval $ac_link_default) 2>&5
+   ac_status=$?
+-  echo "$as_me:1743: \$? = $ac_status" >&5
++  echo "$as_me:1572: \$? = $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
+@@ -1763,34 +1592,34 @@ done
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1766: error: C compiler cannot create executables" >&5
++{ { echo "$as_me:1595: 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:1772: result: $ac_file" >&5
++echo "$as_me:1601: 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:1777: checking whether the C compiler works" >&5
++echo "$as_me:1606: 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:1783: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1612: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1786: \$? = $ac_status" >&5
++  echo "$as_me:1615: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+     cross_compiling=no
+   else
+     if test "$cross_compiling" = maybe; then
+ 	cross_compiling=yes
+     else
+-	{ { echo "$as_me:1793: error: cannot run C compiled programs.
++	{ { echo "$as_me:1622: 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;}
+@@ -1798,24 +1627,24 @@ If you meant to cross compile, use \`--host'." >&2;}
+     fi
+   fi
+ fi
+-echo "$as_me:1801: result: yes" >&5
++echo "$as_me:1630: 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:1808: checking whether we are cross compiling" >&5
++echo "$as_me:1637: checking whether we are cross compiling" >&5
+ echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+-echo "$as_me:1810: result: $cross_compiling" >&5
++echo "$as_me:1639: result: $cross_compiling" >&5
+ echo "${ECHO_T}$cross_compiling" >&6
+ 
+-echo "$as_me:1813: checking for executable suffix" >&5
++echo "$as_me:1642: checking for executable suffix" >&5
+ echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+-if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
++if { (eval echo "$as_me:1644: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:1818: \$? = $ac_status" >&5
++  echo "$as_me:1647: \$? = $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
+@@ -1831,25 +1660,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+   esac
+ done
+ else
+-  { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
++  { { echo "$as_me:1663: 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:1840: result: $ac_cv_exeext" >&5
++echo "$as_me:1669: 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:1846: checking for object suffix" >&5
++echo "$as_me:1675: 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 1852 "configure"
++#line 1681 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1861,10 +1690,10 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1693: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1867: \$? = $ac_status" >&5
++  echo "$as_me:1696: \$? = $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
+@@ -1876,24 +1705,24 @@ done
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
++{ { echo "$as_me:1708: 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:1886: result: $ac_cv_objext" >&5
++echo "$as_me:1715: result: $ac_cv_objext" >&5
+ echo "${ECHO_T}$ac_cv_objext" >&6
+ OBJEXT=$ac_cv_objext
+ ac_objext=$OBJEXT
+-echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
++echo "$as_me:1719: 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 1896 "configure"
++#line 1725 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1908,16 +1737,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1914: \$? = $ac_status" >&5
++  echo "$as_me:1743: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1917: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1746: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1920: \$? = $ac_status" >&5
++  echo "$as_me:1749: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_compiler_gnu=yes
+ else
+@@ -1929,19 +1758,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ 
+ fi
+-echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
++echo "$as_me:1761: 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:1938: checking whether $CC accepts -g" >&5
++echo "$as_me:1767: 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 1944 "configure"
++#line 1773 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -1953,16 +1782,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:1959: \$? = $ac_status" >&5
++  echo "$as_me:1788: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:1962: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1791: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:1965: \$? = $ac_status" >&5
++  echo "$as_me:1794: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_prog_cc_g=yes
+ else
+@@ -1972,7 +1801,7 @@ ac_cv_prog_cc_g=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
++echo "$as_me:1804: 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
+@@ -1999,16 +1828,16 @@ cat >conftest.$ac_ext <<_ACEOF
+ #endif
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2005: \$? = $ac_status" >&5
++  echo "$as_me:1834: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2008: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1837: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2011: \$? = $ac_status" >&5
++  echo "$as_me:1840: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   for ac_declaration in \
+    ''\
+@@ -2020,7 +1849,7 @@ if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
+    'void exit (int);'
+ do
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 2023 "configure"
++#line 1852 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ $ac_declaration
+@@ -2033,16 +1862,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2039: \$? = $ac_status" >&5
++  echo "$as_me:1868: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2042: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1871: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2045: \$? = $ac_status" >&5
++  echo "$as_me:1874: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -2052,7 +1881,7 @@ continue
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 2055 "configure"
++#line 1884 "configure"
+ #include "confdefs.h"
+ $ac_declaration
+ int
+@@ -2064,16 +1893,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2070: \$? = $ac_status" >&5
++  echo "$as_me:1899: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2073: \"$ac_try\"") >&5
++  { (eval echo "$as_me:1902: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2076: \$? = $ac_status" >&5
++  echo "$as_me:1905: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -2103,55 +1932,246 @@ ac_main_return=return
+ 
+ GCC_VERSION=none
+ if test "$GCC" = yes ; then
+-	echo "$as_me:2106: checking version of $CC" >&5
++	echo "$as_me:1935: 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/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
++	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.].*//'`"
+ 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
+-	echo "$as_me:2110: result: $GCC_VERSION" >&5
++	echo "$as_me:1939: result: $GCC_VERSION" >&5
+ echo "${ECHO_T}$GCC_VERSION" >&6
+ fi
+ 
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-ac_main_return=return
+-echo "$as_me:2120: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+-# On Suns, sometimes $CPP names a directory.
+-if test -n "$CPP" && test -d "$CPP"; then
+-  CPP=
+-fi
+-if test -z "$CPP"; then
+-  if test "${ac_cv_prog_CPP+set}" = set; then
++echo "$as_me:1943: 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
+ else
+-      # Double quotes because CPP needs to be expanded
+-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+-    do
+-      ac_preproc_ok=false
+-for ac_c_preproc_warn_flag in '' yes
+-do
+-  # Use a header file that comes with gcc, so configuring glibc
+-  # with a fresh cross-compiler works.
+-  # On the NeXT, cc -E runs the code through the compiler's parser,
+-  # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-#line 2141 "configure"
++  ac_cv_prog_cc_stdc=no
++ac_save_CC=$CC
++cat >conftest.$ac_ext <<_ACEOF
++#line 1951 "configure"
+ #include "confdefs.h"
+-#include <assert.h>
+-                     Syntax error
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* 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;
++{
++  return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++  char *s;
++  va_list v;
++  va_start (v,p);
++  s = g (p, va_arg (v,int));
++  va_end (v);
++  return s;
++}
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
++  ;
++  return 0;
++}
+ _ACEOF
+-if { (eval echo "$as_me:2146: \"$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:2152: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
++# Don't try gcc -ansi; that turns off useful extensions and
++# breaks some systems' header files.
++# AIX			-qlanglvl=ansi
++# Ultrix and OSF/1	-std1
++# HP-UX 10.20 and later	-Ae
++# HP-UX older versions	-Aa -D_HPUX_SOURCE
++# SVR4			-Xc -D__EXTENSIONS__
++for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++  CC="$ac_save_CC $ac_arg"
++  rm -f conftest.$ac_objext
++if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:2003: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:2006: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:2009: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  ac_cv_prog_cc_stdc=$ac_arg
++break
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext
++done
++rm -f conftest.$ac_ext conftest.$ac_objext
++CC=$ac_save_CC
++
++fi
++
++case "x$ac_cv_prog_cc_stdc" in
++  x|xno)
++    echo "$as_me:2026: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6 ;;
++  *)
++    echo "$as_me:2029: result: $ac_cv_prog_cc_stdc" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
++    CC="$CC $ac_cv_prog_cc_stdc" ;;
++esac
++
++# This should have been defined by AC_PROG_CC
++: ${CC:=cc}
++
++echo "$as_me:2037: checking \$CC variable" >&5
++echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
++case "$CC" in #(vi
++*[\ \	]-[IUD]*)
++	echo "$as_me:2041: result: broken" >&5
++echo "${ECHO_T}broken" >&6
++	{ echo "$as_me:2043: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
++echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
++	# humor him...
++	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
++	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_flags
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
++
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
++fi
++
++	;;
++*)
++	echo "$as_me:2129: result: ok" >&5
++echo "${ECHO_T}ok" >&6
++	;;
++esac
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++ac_main_return=return
++echo "$as_me:2140: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++  CPP=
++fi
++if test -z "$CPP"; then
++  if test "${ac_cv_prog_CPP+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++      # Double quotes because CPP needs to be expanded
++    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++    do
++      ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat >conftest.$ac_ext <<_ACEOF
++#line 2161 "configure"
++#include "confdefs.h"
++#include <assert.h>
++                     Syntax error
++_ACEOF
++if { (eval echo "$as_me:2166: \"$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:2172: \$? = $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=
+@@ -2172,17 +2192,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 2175 "configure"
++#line 2195 "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:2199: \"$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:2185: \$? = $ac_status" >&5
++  echo "$as_me:2205: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2219,7 +2239,7 @@ fi
+ else
+   ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:2222: result: $CPP" >&5
++echo "$as_me:2242: result: $CPP" >&5
+ echo "${ECHO_T}$CPP" >&6
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+@@ -2229,18 +2249,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 2232 "configure"
++#line 2252 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+                      Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:2257: \"$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:2243: \$? = $ac_status" >&5
++  echo "$as_me:2263: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2263,17 +2283,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 2266 "configure"
++#line 2286 "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:2290: \"$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:2276: \$? = $ac_status" >&5
++  echo "$as_me:2296: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2301,7 +2321,7 @@ rm -f conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then
+   :
+ else
+-  { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
++  { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+@@ -2314,14 +2334,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:2317: checking whether $CC needs -traditional" >&5
++    echo "$as_me:2337: 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 2324 "configure"
++#line 2344 "configure"
+ #include "confdefs.h"
+ #include <sgtty.h>
+ int Autoconf = TIOCGETP;
+@@ -2336,7 +2356,7 @@ rm -rf conftest*
+ 
+   if test $ac_cv_prog_gcc_traditional = no; then
+     cat >conftest.$ac_ext <<_ACEOF
+-#line 2339 "configure"
++#line 2359 "configure"
+ #include "confdefs.h"
+ #include <termio.h>
+ int Autoconf = TCGETA;
+@@ -2349,14 +2369,14 @@ rm -rf conftest*
+ 
+   fi
+ fi
+-echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
++echo "$as_me:2372: 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:2359: checking whether $CC understands -c and -o together" >&5
++echo "$as_me:2379: 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
+@@ -2372,15 +2392,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 -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+-if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
++if { (eval echo "$as_me:2395: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2378: \$? = $ac_status" >&5
++  echo "$as_me:2398: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-  test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
++  test -f conftest2.$ac_objext && { (eval echo "$as_me:2400: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2383: \$? = $ac_status" >&5
++  echo "$as_me:2403: \$? = $ac_status" >&5
+   (exit $ac_status); };
+ then
+   eval cf_cv_prog_CC_c_o=yes
+@@ -2391,318 +2411,24 @@ rm -rf conftest*
+ 
+ fi
+ if test $cf_cv_prog_CC_c_o = yes; then
+-  echo "$as_me:2394: result: yes" >&5
++  echo "$as_me:2414: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+-  echo "$as_me:2397: result: no" >&5
++  echo "$as_me:2417: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+-echo "$as_me:2401: checking for POSIXized ISC" >&5
+-echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
+-if test -d /etc/conf/kconfig.d &&
+-   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+-then
+-  echo "$as_me:2406: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+-  ISC=yes # If later tests want to check for ISC.
+-
+-cat >>confdefs.h <<\EOF
+-#define _POSIX_SOURCE 1
+-EOF
+-
+-  if test "$GCC" = yes; then
+-    CC="$CC -posix"
+-  else
+-    CC="$CC -Xp"
+-  fi
+-else
+-  echo "$as_me:2420: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-  ISC=
+-fi
+-
+-echo "$as_me:2425: checking for ${CC:-cc} option to accept ANSI C" >&5
+-echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
+-if test "${cf_cv_ansi_cc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-
+-cf_cv_ansi_cc=no
+-cf_save_CFLAGS="$CFLAGS"
+-cf_save_CPPFLAGS="$CPPFLAGS"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX			-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc
+-# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
+-for cf_arg in "-DCC_HAS_PROTOS" \
+-	"" \
+-	-qlanglvl=ansi \
+-	-std1 \
+-	-Ae \
+-	"-Aa -D_HPUX_SOURCE" \
+-	-Xc
+-do
+-
+-cf_fix_cppflags=no
+-cf_new_cflags=
+-cf_new_cppflags=
+-cf_new_extra_cppflags=
+-
+-for cf_add_cflags in $cf_arg
+-do
+-case $cf_fix_cppflags in
+-no)
+-	case $cf_add_cflags in #(vi
+-	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+-		case $cf_add_cflags in
+-		-D*)
+-			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+-
+-			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-				&& test -z "${cf_tst_cflags}" \
+-				&& cf_fix_cppflags=yes
+-
+-			if test $cf_fix_cppflags = yes ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			elif test "${cf_tst_cflags}" = "\"'" ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			fi
+-			;;
+-		esac
+-		case "$CPPFLAGS" in
+-		*$cf_add_cflags) #(vi
+-			;;
+-		*) #(vi
+-			case $cf_add_cflags in #(vi
+-			-D*)
+-				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+-
+-CPPFLAGS=`echo "$CPPFLAGS" | \
+-	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
+-		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
+-
+-				;;
+-			esac
+-			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+-			;;
+-		esac
+-		;;
+-	*)
+-		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+-		;;
+-	esac
+-	;;
+-yes)
+-	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-
+-	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+-
+-	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-		&& test -z "${cf_tst_cflags}" \
+-		&& cf_fix_cppflags=no
+-	;;
+-esac
+-done
+-
+-if test -n "$cf_new_cflags" ; then
+-
+-	CFLAGS="$CFLAGS $cf_new_cflags"
+-fi
+-
+-if test -n "$cf_new_cppflags" ; then
+-
+-	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+-fi
+-
+-if test -n "$cf_new_extra_cppflags" ; then
+-
+-	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+-fi
+-
+-	cat >conftest.$ac_ext <<_ACEOF
+-#line 2529 "configure"
+-#include "confdefs.h"
+-
+-#ifndef CC_HAS_PROTOS
+-#if !defined(__STDC__) || (__STDC__ != 1)
+-choke me
+-#endif
+-#endif
+-
+-int
+-main ()
+-{
+-
+-	int test (int i, double x);
+-	struct s1 {int (*f) (int a);};
+-	struct s2 {int (*f) (double a);};
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
+-  (eval $ac_compile) 2>&5
+-  ac_status=$?
+-  echo "$as_me:2553: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-         { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2556: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:2559: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  cf_cv_ansi_cc="$cf_arg"; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
+-done
+-CFLAGS="$cf_save_CFLAGS"
+-CPPFLAGS="$cf_save_CPPFLAGS"
+-
+-fi
+-echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
+-echo "${ECHO_T}$cf_cv_ansi_cc" >&6
+-
+-if test "$cf_cv_ansi_cc" != "no"; then
+-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+-
+-cf_fix_cppflags=no
+-cf_new_cflags=
+-cf_new_cppflags=
+-cf_new_extra_cppflags=
+-
+-for cf_add_cflags in $cf_cv_ansi_cc
+-do
+-case $cf_fix_cppflags in
+-no)
+-	case $cf_add_cflags in #(vi
+-	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+-		case $cf_add_cflags in
+-		-D*)
+-			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+-
+-			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-				&& test -z "${cf_tst_cflags}" \
+-				&& cf_fix_cppflags=yes
+-
+-			if test $cf_fix_cppflags = yes ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			elif test "${cf_tst_cflags}" = "\"'" ; then
+-				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-				continue
+-			fi
+-			;;
+-		esac
+-		case "$CPPFLAGS" in
+-		*$cf_add_cflags) #(vi
+-			;;
+-		*) #(vi
+-			case $cf_add_cflags in #(vi
+-			-D*)
+-				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+-
+-CPPFLAGS=`echo "$CPPFLAGS" | \
+-	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
+-		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
+-
+-				;;
+-			esac
+-			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+-			;;
+-		esac
+-		;;
+-	*)
+-		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+-		;;
+-	esac
+-	;;
+-yes)
+-	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+-
+-	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+-
+-	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+-		&& test -z "${cf_tst_cflags}" \
+-		&& cf_fix_cppflags=no
+-	;;
+-esac
+-done
+-
+-if test -n "$cf_new_cflags" ; then
+-
+-	CFLAGS="$CFLAGS $cf_new_cflags"
+-fi
+-
+-if test -n "$cf_new_cppflags" ; then
+-
+-	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+-fi
+-
+-if test -n "$cf_new_extra_cppflags" ; then
+-
+-	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+-fi
+-
+-else
+-	cat >>confdefs.h <<\EOF
+-#define CC_HAS_PROTOS 1
+-EOF
+-
+-fi
+-fi
+-
+-if test "$cf_cv_ansi_cc" = "no"; then
+-	{ { echo "$as_me:2665: error: Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto" >&5
+-echo "$as_me: error: Your compiler does not appear to recognize prototypes.
+-You have the following choices:
+-	a. adjust your compiler options
+-	b. get an up-to-date compiler
+-	c. use a wrapper such as unproto" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-case $cf_cv_system_name in
+-os2*)
+-    CFLAGS="$CFLAGS -Zmt"
+-    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+-    CXXFLAGS="$CXXFLAGS -Zmt"
+-    # autoconf's macro sets -Zexe and suffix both, which conflict:w
+-    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+-    ac_cv_exeext=.exe
+-    ;;
+-esac
+-
+-PROG_EXT="$EXEEXT"
+-
+-test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
+-#define PROG_EXT "$PROG_EXT"
+-EOF
+-
+ if test "$cross_compiling" = yes ; then
+   LDCONFIG=:
+ else
+ case "$cf_cv_system_name" in #(vi
+-dragonfly*|freebsd*) #(vi
++dragonfly*|mirbsd*|freebsd*) #(vi
+   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
+   ;;
+ *) 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:2705: checking for $ac_word" >&5
++echo "$as_me:2431: 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
+@@ -2719,7 +2445,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:2722: found $ac_dir/$ac_word" >&5
++   echo "$as_me:2448: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -2730,10 +2456,10 @@ fi
+ LDCONFIG=$ac_cv_path_LDCONFIG
+ 
+ if test -n "$LDCONFIG"; then
+-  echo "$as_me:2733: result: $LDCONFIG" >&5
++  echo "$as_me:2459: result: $LDCONFIG" >&5
+ echo "${ECHO_T}$LDCONFIG" >&6
+ else
+-  echo "$as_me:2736: result: no" >&5
++  echo "$as_me:2462: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -2741,7 +2467,7 @@ fi
+ esac
+ fi
+ 
+-echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
++echo "$as_me:2470: 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.
+@@ -2751,7 +2477,7 @@ if test "${with_cxx+set}" = set; then
+ else
+   cf_with_cxx=yes
+ fi;
+-echo "$as_me:2754: result: $cf_with_cxx" >&5
++echo "$as_me:2480: result: $cf_with_cxx" >&5
+ echo "${ECHO_T}$cf_with_cxx" >&6
+ if test "X$cf_with_cxx" = Xno ; then
+ 	CXX=""
+@@ -2769,7 +2495,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:2772: checking for $ac_word" >&5
++echo "$as_me:2498: 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
+@@ -2784,7 +2510,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:2787: found $ac_dir/$ac_word" >&5
++echo "$as_me:2513: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -2792,10 +2518,10 @@ fi
+ fi
+ CXX=$ac_cv_prog_CXX
+ if test -n "$CXX"; then
+-  echo "$as_me:2795: result: $CXX" >&5
++  echo "$as_me:2521: result: $CXX" >&5
+ echo "${ECHO_T}$CXX" >&6
+ else
+-  echo "$as_me:2798: result: no" >&5
++  echo "$as_me:2524: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -2808,7 +2534,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:2811: checking for $ac_word" >&5
++echo "$as_me:2537: 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
+@@ -2823,7 +2549,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:2826: found $ac_dir/$ac_word" >&5
++echo "$as_me:2552: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -2831,10 +2557,10 @@ fi
+ fi
+ ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+ if test -n "$ac_ct_CXX"; then
+-  echo "$as_me:2834: result: $ac_ct_CXX" >&5
++  echo "$as_me:2560: result: $ac_ct_CXX" >&5
+ echo "${ECHO_T}$ac_ct_CXX" >&6
+ else
+-  echo "$as_me:2837: result: no" >&5
++  echo "$as_me:2563: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -2846,32 +2572,32 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+ fi
+ 
+ # Provide some information about the compiler.
+-echo "$as_me:2849:" \
++echo "$as_me:2575:" \
+      "checking for C++ compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
++{ (eval echo "$as_me:2578: \"$ac_compiler --version </dev/null >&5\"") >&5
+   (eval $ac_compiler --version </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:2855: \$? = $ac_status" >&5
++  echo "$as_me:2581: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
++{ (eval echo "$as_me:2583: \"$ac_compiler -v </dev/null >&5\"") >&5
+   (eval $ac_compiler -v </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:2860: \$? = $ac_status" >&5
++  echo "$as_me:2586: \$? = $ac_status" >&5
+   (exit $ac_status); }
+-{ (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
++{ (eval echo "$as_me:2588: \"$ac_compiler -V </dev/null >&5\"") >&5
+   (eval $ac_compiler -V </dev/null >&5) 2>&5
+   ac_status=$?
+-  echo "$as_me:2865: \$? = $ac_status" >&5
++  echo "$as_me:2591: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ 
+-echo "$as_me:2868: checking whether we are using the GNU C++ compiler" >&5
++echo "$as_me:2594: 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 2874 "configure"
++#line 2600 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -2886,16 +2612,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:2615: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2892: \$? = $ac_status" >&5
++  echo "$as_me:2618: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2895: \"$ac_try\"") >&5
++  { (eval echo "$as_me:2621: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2898: \$? = $ac_status" >&5
++  echo "$as_me:2624: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_compiler_gnu=yes
+ else
+@@ -2907,19 +2633,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+ 
+ fi
+-echo "$as_me:2910: result: $ac_cv_cxx_compiler_gnu" >&5
++echo "$as_me:2636: 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:2916: checking whether $CXX accepts -g" >&5
++echo "$as_me:2642: 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 2922 "configure"
++#line 2648 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -2931,16 +2657,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:2660: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2937: \$? = $ac_status" >&5
++  echo "$as_me:2663: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2940: \"$ac_try\"") >&5
++  { (eval echo "$as_me:2666: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:2943: \$? = $ac_status" >&5
++  echo "$as_me:2669: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_prog_cxx_g=yes
+ else
+@@ -2950,7 +2676,7 @@ ac_cv_prog_cxx_g=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:2953: result: $ac_cv_prog_cxx_g" >&5
++echo "$as_me:2679: 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
+@@ -2977,7 +2703,7 @@ for ac_declaration in \
+    'void exit (int);'
+ do
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 2980 "configure"
++#line 2706 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ $ac_declaration
+@@ -2990,16 +2716,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:2996: \$? = $ac_status" >&5
++  echo "$as_me:2722: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:2999: \"$ac_try\"") >&5
++  { (eval echo "$as_me:2725: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3002: \$? = $ac_status" >&5
++  echo "$as_me:2728: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+@@ -3009,7 +2735,7 @@ continue
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 3012 "configure"
++#line 2738 "configure"
+ #include "confdefs.h"
+ $ac_declaration
+ int
+@@ -3021,16 +2747,16 @@ exit (42);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:3027: \$? = $ac_status" >&5
++  echo "$as_me:2753: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:3030: \"$ac_try\"") >&5
++  { (eval echo "$as_me:2756: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:3033: \$? = $ac_status" >&5
++  echo "$as_me:2759: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -3053,11 +2779,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_main_return=return
+ 
+-		# autoconf 2.5x removed the error - by hardcoding it to g++.
++		# autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
+ 	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:3060: checking for $ac_word" >&5
++echo "$as_me:2786: 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
+@@ -3074,7 +2800,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:3077: found $ac_dir/$ac_word" >&5
++   echo "$as_me:2803: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -3085,28 +2811,30 @@ fi
+ CXX=$ac_cv_path_CXX
+ 
+ if test -n "$CXX"; then
+-  echo "$as_me:3088: result: $CXX" >&5
++  echo "$as_me:2814: result: $CXX" >&5
+ echo "${ECHO_T}$CXX" >&6
+ else
+-  echo "$as_me:3091: result: no" >&5
++  echo "$as_me:2817: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+ 	fi
+-	if test "$CXX" = "g++" ; then
+-		{ echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
+-echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
++	case "x$CXX" in #(vi
++	x|xg++)
++		{ echo "$as_me:2824: 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="";
+-	fi
++		;;
++	esac
+ fi
+ 
+ GXX_VERSION=none
+ if test "$GXX" = yes; then
+-	echo "$as_me:3105: checking version of g++" >&5
+-echo $ECHO_N "checking version of g++... $ECHO_C" >&6
++	echo "$as_me:2833: 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.].*//'`"
+ 	test -z "$GXX_VERSION" && GXX_VERSION=unknown
+-	echo "$as_me:3109: result: $GXX_VERSION" >&5
++	echo "$as_me:2837: result: $GXX_VERSION" >&5
+ echo "${ECHO_T}$GXX_VERSION" >&6
+ fi
+ 
+@@ -3114,12 +2842,12 @@ case $GXX_VERSION in
+ 1*|2.[0-6]*)
+ 	# GXX=""; CXX=""; ac_cv_prog_gxx=no
+ 	# cf_cxx_library=no
+-	{ echo "$as_me:3117: WARNING: templates do not work" >&5
++	{ echo "$as_me:2845: WARNING: templates do not work" >&5
+ echo "$as_me: WARNING: templates do not work" >&2;}
+ 	;;
+ esac
+ 
+-echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
++echo "$as_me:2850: 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.
+@@ -3129,23 +2857,15 @@ if test "${with_cxx_binding+set}" = set; then
+ else
+   cf_with_cxx_binding=$cf_with_cxx
+ fi;
+-echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
++echo "$as_me:2860: result: $cf_with_cxx_binding" >&5
+ echo "${ECHO_T}$cf_with_cxx_binding" >&6
+ 
+-echo "$as_me:3135: checking if you want to build with Ada95" >&5
++echo "$as_me:2863: checking if you want to build with Ada95" >&5
+ echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
+-
+-# Check whether --with-ada or --without-ada was given.
+-if test "${with_ada+set}" = set; then
+-  withval="$with_ada"
+-  cf_with_ada=$withval
+-else
+-  cf_with_ada=yes
+-fi;
+-echo "$as_me:3145: result: $cf_with_ada" >&5
++echo "$as_me:2865: result: $cf_with_ada" >&5
+ echo "${ECHO_T}$cf_with_ada" >&6
+ 
+-echo "$as_me:3148: checking if you want to install manpages" >&5
++echo "$as_me:2868: 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.
+@@ -3155,10 +2875,10 @@ if test "${with_manpages+set}" = set; then
+ else
+   cf_with_manpages=yes
+ fi;
+-echo "$as_me:3158: result: $cf_with_manpages" >&5
++echo "$as_me:2878: result: $cf_with_manpages" >&5
+ echo "${ECHO_T}$cf_with_manpages" >&6
+ 
+-echo "$as_me:3161: checking if you want to build programs such as tic" >&5
++echo "$as_me:2881: 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.
+@@ -3168,10 +2888,10 @@ if test "${with_progs+set}" = set; then
+ else
+   cf_with_progs=yes
+ fi;
+-echo "$as_me:3171: result: $cf_with_progs" >&5
++echo "$as_me:2891: result: $cf_with_progs" >&5
+ echo "${ECHO_T}$cf_with_progs" >&6
+ 
+-echo "$as_me:3174: checking if you want to build test-programs" >&5
++echo "$as_me:2894: 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.
+@@ -3181,10 +2901,10 @@ if test "${with_tests+set}" = set; then
+ else
+   cf_with_tests=yes
+ fi;
+-echo "$as_me:3184: result: $cf_with_tests" >&5
++echo "$as_me:2904: result: $cf_with_tests" >&5
+ echo "${ECHO_T}$cf_with_tests" >&6
+ 
+-echo "$as_me:3187: checking if you wish to install curses.h" >&5
++echo "$as_me:2907: 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.
+@@ -3194,7 +2914,7 @@ if test "${with_curses_h+set}" = set; then
+ else
+   with_curses_h=yes
+ fi;
+-echo "$as_me:3197: result: $with_curses_h" >&5
++echo "$as_me:2917: result: $with_curses_h" >&5
+ echo "${ECHO_T}$with_curses_h" >&6
+ 
+ modules_to_build="ncurses"
+@@ -3220,7 +2940,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:3223: checking for $ac_word" >&5
++echo "$as_me:2943: 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
+@@ -3235,7 +2955,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:3238: found $ac_dir/$ac_word" >&5
++echo "$as_me:2958: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3243,21 +2963,21 @@ fi
+ fi
+ AWK=$ac_cv_prog_AWK
+ if test -n "$AWK"; then
+-  echo "$as_me:3246: result: $AWK" >&5
++  echo "$as_me:2966: result: $AWK" >&5
+ echo "${ECHO_T}$AWK" >&6
+ else
+-  echo "$as_me:3249: result: no" >&5
++  echo "$as_me:2969: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+   test -n "$AWK" && break
+ done
+ 
+-test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
++test -z "$AWK" && { { echo "$as_me:2976: error: No awk program found" >&5
+ echo "$as_me: error: No awk program found" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+-echo "$as_me:3260: checking for egrep" >&5
++echo "$as_me:2980: checking for egrep" >&5
+ echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+ if test "${ac_cv_prog_egrep+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -3267,11 +2987,11 @@ else
+     else ac_cv_prog_egrep='egrep'
+     fi
+ fi
+-echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
++echo "$as_me:2990: result: $ac_cv_prog_egrep" >&5
+ echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+  EGREP=$ac_cv_prog_egrep
+ 
+-test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
++test -z "$EGREP" && { { echo "$as_me:2994: error: No egrep program found" >&5
+ echo "$as_me: error: No egrep program found" >&2;}
+    { (exit 1); exit 1; }; }
+ 
+@@ -3287,7 +3007,7 @@ echo "$as_me: error: No egrep 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:3290: checking for a BSD compatible install" >&5
++echo "$as_me:3010: 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
+@@ -3336,7 +3056,7 @@ fi
+     INSTALL=$ac_install_sh
+   fi
+ fi
+-echo "$as_me:3339: result: $INSTALL" >&5
++echo "$as_me:3059: result: $INSTALL" >&5
+ echo "${ECHO_T}$INSTALL" >&6
+ 
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+@@ -3361,7 +3081,7 @@ for ac_prog in tdlint lint alint splint lclint
+ 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:3364: checking for $ac_word" >&5
++echo "$as_me:3084: 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
+@@ -3376,7 +3096,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:3379: found $ac_dir/$ac_word" >&5
++echo "$as_me:3099: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3384,28 +3104,28 @@ fi
+ fi
+ LINT=$ac_cv_prog_LINT
+ if test -n "$LINT"; then
+-  echo "$as_me:3387: result: $LINT" >&5
++  echo "$as_me:3107: result: $LINT" >&5
+ echo "${ECHO_T}$LINT" >&6
+ else
+-  echo "$as_me:3390: result: no" >&5
++  echo "$as_me:3110: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+   test -n "$LINT" && break
+ done
+ 
+-echo "$as_me:3397: checking whether ln -s works" >&5
++echo "$as_me:3117: 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:3401: result: yes" >&5
++  echo "$as_me:3121: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ else
+-  echo "$as_me:3404: result: no, using $LN_S" >&5
++  echo "$as_me:3124: result: no, using $LN_S" >&5
+ echo "${ECHO_T}no, using $LN_S" >&6
+ fi
+ 
+-echo "$as_me:3408: checking if $LN_S -f options work" >&5
++echo "$as_me:3128: 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
+@@ -3417,12 +3137,12 @@ else
+ 	cf_prog_ln_sf=no
+ fi
+ rm -f conf$$.dst conf$$src
+-echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
++echo "$as_me:3140: 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:3425: checking for long file names" >&5
++echo "$as_me:3145: 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
+@@ -3461,7 +3181,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:3464: result: $ac_cv_sys_long_file_names" >&5
++echo "$as_me:3184: 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
+ 
+@@ -3473,7 +3193,7 @@ fi
+ 
+ # if we find pkg-config, check if we should install the ".pc" files.
+ 
+-echo "$as_me:3476: checking if you want to use pkg-config" >&5
++echo "$as_me:3196: 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.
+@@ -3483,7 +3203,7 @@ if test "${with_pkg_config+set}" = set; then
+ else
+   cf_pkg_config=yes
+ fi;
+-echo "$as_me:3486: result: $cf_pkg_config" >&5
++echo "$as_me:3206: result: $cf_pkg_config" >&5
+ echo "${ECHO_T}$cf_pkg_config" >&6
+ 
+ case $cf_pkg_config in #(vi
+@@ -3491,10 +3211,11 @@ no) #(vi
+ 	PKG_CONFIG=none
+ 	;;
+ yes) #(vi
+-	if test -n "$ac_tool_prefix"; then
++
++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:3497: checking for $ac_word" >&5
++echo "$as_me:3218: 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
+@@ -3511,7 +3232,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:3514: found $ac_dir/$ac_word" >&5
++   echo "$as_me:3235: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -3522,10 +3243,10 @@ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ 
+ if test -n "$PKG_CONFIG"; then
+-  echo "$as_me:3525: result: $PKG_CONFIG" >&5
++  echo "$as_me:3246: result: $PKG_CONFIG" >&5
+ echo "${ECHO_T}$PKG_CONFIG" >&6
+ else
+-  echo "$as_me:3528: result: no" >&5
++  echo "$as_me:3249: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3534,7 +3255,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:3537: checking for $ac_word" >&5
++echo "$as_me:3258: 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
+@@ -3551,7 +3272,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:3554: found $ac_dir/$ac_word" >&5
++   echo "$as_me:3275: found $ac_dir/$ac_word" >&5
+    break
+ fi
+ done
+@@ -3563,10 +3284,10 @@ fi
+ ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+ 
+ if test -n "$ac_pt_PKG_CONFIG"; then
+-  echo "$as_me:3566: result: $ac_pt_PKG_CONFIG" >&5
++  echo "$as_me:3287: result: $ac_pt_PKG_CONFIG" >&5
+ echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+ else
+-  echo "$as_me:3569: result: no" >&5
++  echo "$as_me:3290: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3597,7 +3318,7 @@ case ".$PKG_CONFIG" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval PKG_CONFIG="$PKG_CONFIG"
+   case ".$PKG_CONFIG" in #(vi
+   .NONE/*)
+@@ -3609,7 +3330,7 @@ case ".$PKG_CONFIG" in #(vi
+   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:3612: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
++  { { echo "$as_me:3333: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+@@ -3617,16 +3338,51 @@ esac
+ 
+ fi
+ 
+-if test "$PKG_CONFIG" != no ; then
+-	echo "$as_me:3621: 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
++if test "$PKG_CONFIG" != none ; then
++	echo "$as_me:3342: checking for $PKG_CONFIG library directory" >&5
++echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
+ 
+-	# Leave this as something that can be overridden in the environment.
+-	if test -z "$PKG_CONFIG_LIBDIR" ; then
+-		PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
+-	fi
+-	PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
+-	if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
++# 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
++else
++  PKG_CONFIG_LIBDIR=yes
++fi;
++
++	case x$PKG_CONFIG_LIBDIR in #(vi
++	x/*) #(vi
++		;;
++	xyes) #(vi
++		# look for the library directory using the same prefix as the executable
++		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
++		case x`(arch) 2>/dev/null` in #(vi
++		*64) #(vi
++			for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
++			do
++				if test -d $cf_config/pkgconfig
++				then
++					PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
++					break
++				fi
++			done
++			;;
++		*)
++			PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
++			;;
++		esac
++		;;
++	*)
++		;;
++	esac
++
++	echo "$as_me:3379: result: $PKG_CONFIG_LIBDIR" >&5
++echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
++fi
++
++if test "$PKG_CONFIG" != none ; then
++	echo "$as_me:3384: 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
+ 
+ # Check whether --enable-pc-files or --disable-pc-files was given.
+ if test "${enable_pc_files+set}" = set; then
+@@ -3635,18 +3391,48 @@ if test "${enable_pc_files+set}" = set; then
+ else
+   enable_pc_files=no
+ fi;
+-		echo "$as_me:3638: result: $enable_pc_files" >&5
++	echo "$as_me:3394: result: $enable_pc_files" >&5
+ echo "${ECHO_T}$enable_pc_files" >&6
+-	else
+-		echo "$as_me:3641: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-		{ echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
+-echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
+-		enable_pc_files=no
++	if test "$enable_pc_files" != no
++	then
++
++if test "x$prefix" != xNONE; then
++  cf_path_syntax="$prefix"
++else
++  cf_path_syntax="$ac_default_prefix"
++fi
++
++case ".$PKG_CONFIG_LIBDIR" in #(vi
++.\$\(*\)*|.\'*\'*) #(vi
++  ;;
++..|./*|.\\*) #(vi
++  ;;
++.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
++  ;;
++.\${*prefix}*|.\${*dir}*) #(vi
++  eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
++  case ".$PKG_CONFIG_LIBDIR" in #(vi
++  .NONE/*)
++    PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
++    ;;
++  esac
++  ;; #(vi
++.no|.NONE/*)
++  PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
++  ;;
++*)
++  { { echo "$as_me:3424: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
++echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
++   { (exit 1); exit 1; }; }
++  ;;
++esac
++
+ 	fi
++else
++	enable_pc_files=no
+ fi
+ 
+-echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
++echo "$as_me:3435: 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.
+@@ -3656,11 +3442,11 @@ if test "${enable_mixed_case+set}" = set; then
+ else
+   enable_mixedcase=auto
+ fi;
+-echo "$as_me:3659: result: $enable_mixedcase" >&5
++echo "$as_me:3445: result: $enable_mixedcase" >&5
+ echo "${ECHO_T}$enable_mixedcase" >&6
+ if test "$enable_mixedcase" = "auto" ; then
+ 
+-echo "$as_me:3663: checking if filesystem supports mixed-case filenames" >&5
++echo "$as_me:3449: 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
+@@ -3687,16 +3473,18 @@ else
+ fi
+ 
+ fi
+-echo "$as_me:3690: result: $cf_cv_mixedcase" >&5
++echo "$as_me:3476: result: $cf_cv_mixedcase" >&5
+ echo "${ECHO_T}$cf_cv_mixedcase" >&6
+-test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
++test "$cf_cv_mixedcase" = yes &&
++cat >>confdefs.h <<\EOF
+ #define MIXEDCASE_FILENAMES 1
+ EOF
+ 
+ else
+     cf_cv_mixedcase=$enable_mixedcase
+-    if test "$enable_mixedcase" = "yes" ; then
+-        cat >>confdefs.h <<\EOF
++    if test "x$enable_mixedcase" = "xyes" ; then
++
++cat >>confdefs.h <<\EOF
+ #define MIXEDCASE_FILENAMES 1
+ EOF
+ 
+@@ -3704,7 +3492,7 @@ EOF
+ fi
+ 
+ # do this after mixed-case option (tags/TAGS is not as important as tic).
+-echo "$as_me:3707: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "$as_me:3495: 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
+@@ -3724,11 +3512,11 @@ fi
+ rm -f conftest.make
+ fi
+ if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+-  echo "$as_me:3727: result: yes" >&5
++  echo "$as_me:3515: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+   SET_MAKE=
+ else
+-  echo "$as_me:3731: result: no" >&5
++  echo "$as_me:3519: result: no" >&5
+ echo "${ECHO_T}no" >&6
+   SET_MAKE="MAKE=${MAKE-make}"
+ fi
+@@ -3737,7 +3525,7 @@ 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:3740: checking for $ac_word" >&5
++echo "$as_me:3528: 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
+@@ -3752,7 +3540,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:3755: found $ac_dir/$ac_word" >&5
++echo "$as_me:3543: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3760,10 +3548,10 @@ fi
+ fi
+ CTAGS=$ac_cv_prog_CTAGS
+ if test -n "$CTAGS"; then
+-  echo "$as_me:3763: result: $CTAGS" >&5
++  echo "$as_me:3551: result: $CTAGS" >&5
+ echo "${ECHO_T}$CTAGS" >&6
+ else
+-  echo "$as_me:3766: result: no" >&5
++  echo "$as_me:3554: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3774,7 +3562,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:3777: checking for $ac_word" >&5
++echo "$as_me:3565: 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
+@@ -3789,7 +3577,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:3792: found $ac_dir/$ac_word" >&5
++echo "$as_me:3580: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3797,10 +3585,10 @@ fi
+ fi
+ ETAGS=$ac_cv_prog_ETAGS
+ if test -n "$ETAGS"; then
+-  echo "$as_me:3800: result: $ETAGS" >&5
++  echo "$as_me:3588: result: $ETAGS" >&5
+ echo "${ECHO_T}$ETAGS" >&6
+ else
+-  echo "$as_me:3803: result: no" >&5
++  echo "$as_me:3591: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3809,7 +3597,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:3812: checking for $ac_word" >&5
++echo "$as_me:3600: 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
+@@ -3824,7 +3612,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:3827: found $ac_dir/$ac_word" >&5
++echo "$as_me:3615: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3833,17 +3621,17 @@ fi
+ fi
+ MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
+ if test -n "$MAKE_LOWER_TAGS"; then
+-  echo "$as_me:3836: result: $MAKE_LOWER_TAGS" >&5
++  echo "$as_me:3624: result: $MAKE_LOWER_TAGS" >&5
+ echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
+ else
+-  echo "$as_me:3839: result: no" >&5
++  echo "$as_me:3627: 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:3846: checking for $ac_word" >&5
++echo "$as_me:3634: 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
+@@ -3858,7 +3646,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:3861: found $ac_dir/$ac_word" >&5
++echo "$as_me:3649: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3867,10 +3655,10 @@ fi
+ fi
+ MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
+ if test -n "$MAKE_UPPER_TAGS"; then
+-  echo "$as_me:3870: result: $MAKE_UPPER_TAGS" >&5
++  echo "$as_me:3658: result: $MAKE_UPPER_TAGS" >&5
+ echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
+ else
+-  echo "$as_me:3873: result: no" >&5
++  echo "$as_me:3661: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3890,7 +3678,7 @@ else
+ 	MAKE_LOWER_TAGS="#"
+ fi
+ 
+-echo "$as_me:3893: checking for makeflags variable" >&5
++echo "$as_me:3681: 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
+@@ -3924,13 +3712,13 @@ CF_EOF
+ 	rm -f cf_makeflags.tmp
+ 
+ fi
+-echo "$as_me:3927: result: $cf_cv_makeflags" >&5
++echo "$as_me:3715: 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:3933: checking for $ac_word" >&5
++echo "$as_me:3721: 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
+@@ -3945,7 +3733,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:3948: found $ac_dir/$ac_word" >&5
++echo "$as_me:3736: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3953,10 +3741,10 @@ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+-  echo "$as_me:3956: result: $RANLIB" >&5
++  echo "$as_me:3744: result: $RANLIB" >&5
+ echo "${ECHO_T}$RANLIB" >&6
+ else
+-  echo "$as_me:3959: result: no" >&5
++  echo "$as_me:3747: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -3965,7 +3753,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:3968: checking for $ac_word" >&5
++echo "$as_me:3756: 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
+@@ -3980,7 +3768,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:3983: found $ac_dir/$ac_word" >&5
++echo "$as_me:3771: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -3989,10 +3777,10 @@ fi
+ fi
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+-  echo "$as_me:3992: result: $ac_ct_RANLIB" >&5
++  echo "$as_me:3780: result: $ac_ct_RANLIB" >&5
+ echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ else
+-  echo "$as_me:3995: result: no" >&5
++  echo "$as_me:3783: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4004,7 +3792,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:4007: checking for $ac_word" >&5
++echo "$as_me:3795: 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
+@@ -4019,7 +3807,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:4022: found $ac_dir/$ac_word" >&5
++echo "$as_me:3810: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4027,10 +3815,10 @@ fi
+ fi
+ LD=$ac_cv_prog_LD
+ if test -n "$LD"; then
+-  echo "$as_me:4030: result: $LD" >&5
++  echo "$as_me:3818: result: $LD" >&5
+ echo "${ECHO_T}$LD" >&6
+ else
+-  echo "$as_me:4033: result: no" >&5
++  echo "$as_me:3821: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4039,7 +3827,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:4042: checking for $ac_word" >&5
++echo "$as_me:3830: 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
+@@ -4054,7 +3842,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:4057: found $ac_dir/$ac_word" >&5
++echo "$as_me:3845: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4063,10 +3851,10 @@ fi
+ fi
+ ac_ct_LD=$ac_cv_prog_ac_ct_LD
+ if test -n "$ac_ct_LD"; then
+-  echo "$as_me:4066: result: $ac_ct_LD" >&5
++  echo "$as_me:3854: result: $ac_ct_LD" >&5
+ echo "${ECHO_T}$ac_ct_LD" >&6
+ else
+-  echo "$as_me:4069: result: no" >&5
++  echo "$as_me:3857: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4078,7 +3866,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:4081: checking for $ac_word" >&5
++echo "$as_me:3869: 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
+@@ -4093,7 +3881,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:4096: found $ac_dir/$ac_word" >&5
++echo "$as_me:3884: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4101,10 +3889,10 @@ fi
+ fi
+ AR=$ac_cv_prog_AR
+ if test -n "$AR"; then
+-  echo "$as_me:4104: result: $AR" >&5
++  echo "$as_me:3892: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6
+ else
+-  echo "$as_me:4107: result: no" >&5
++  echo "$as_me:3895: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4113,7 +3901,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:4116: checking for $ac_word" >&5
++echo "$as_me:3904: 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
+@@ -4128,7 +3916,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:4131: found $ac_dir/$ac_word" >&5
++echo "$as_me:3919: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4137,10 +3925,10 @@ fi
+ fi
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
+ if test -n "$ac_ct_AR"; then
+-  echo "$as_me:4140: result: $ac_ct_AR" >&5
++  echo "$as_me:3928: result: $ac_ct_AR" >&5
+ echo "${ECHO_T}$ac_ct_AR" >&6
+ else
+-  echo "$as_me:4143: result: no" >&5
++  echo "$as_me:3931: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4152,7 +3940,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:4155: checking for $ac_word" >&5
++echo "$as_me:3943: 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
+@@ -4167,7 +3955,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:4170: found $ac_dir/$ac_word" >&5
++echo "$as_me:3958: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4175,10 +3963,10 @@ fi
+ fi
+ AR=$ac_cv_prog_AR
+ if test -n "$AR"; then
+-  echo "$as_me:4178: result: $AR" >&5
++  echo "$as_me:3966: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6
+ else
+-  echo "$as_me:4181: result: no" >&5
++  echo "$as_me:3969: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4187,7 +3975,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:4190: checking for $ac_word" >&5
++echo "$as_me:3978: 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
+@@ -4202,7 +3990,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:4205: found $ac_dir/$ac_word" >&5
++echo "$as_me:3993: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4211,10 +3999,10 @@ fi
+ fi
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
+ if test -n "$ac_ct_AR"; then
+-  echo "$as_me:4214: result: $ac_ct_AR" >&5
++  echo "$as_me:4002: result: $ac_ct_AR" >&5
+ echo "${ECHO_T}$ac_ct_AR" >&6
+ else
+-  echo "$as_me:4217: result: no" >&5
++  echo "$as_me:4005: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4223,7 +4011,7 @@ else
+   AR="$ac_cv_prog_AR"
+ fi
+ 
+-echo "$as_me:4226: checking for options to update archives" >&5
++echo "$as_me:4014: 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
+@@ -4246,13 +4034,13 @@ else
+ 		rm -f conftest.a
+ 
+ 		cat >conftest.$ac_ext <<EOF
+-#line 4249 "configure"
++#line 4037 "configure"
+ int	testdata[3] = { 123, 456, 789 };
+ EOF
+-		if { (eval echo "$as_me:4252: \"$ac_compile\"") >&5
++		if { (eval echo "$as_me:4040: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:4255: \$? = $ac_status" >&5
++  echo "$as_me:4043: \$? = $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
+@@ -4263,7 +4051,7 @@ EOF
+ 		else
+ 			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
+ 
+-echo "${as_me:-configure}:4266: testing cannot compile test-program ..." 1>&5
++echo "${as_me:-configure}:4054: testing cannot compile test-program ..." 1>&5
+ 
+ 			break
+ 		fi
+@@ -4271,7 +4059,7 @@ echo "${as_me:-configure}:4266: testing cannot compile test-program ..." 1>&5
+ 	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+ 
+ fi
+-echo "$as_me:4274: result: $cf_cv_ar_flags" >&5
++echo "$as_me:4062: result: $cf_cv_ar_flags" >&5
+ echo "${ECHO_T}$cf_cv_ar_flags" >&6
+ 
+ if test -n "$ARFLAGS" ; then
+@@ -4282,20 +4070,20 @@ else
+ 	ARFLAGS=$cf_cv_ar_flags
+ fi
+ 
+-echo "$as_me:4285: checking if you have specified an install-prefix" >&5
++echo "$as_me:4073: checking if you have specified an install-prefix" >&5
+ echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
+ 
+ # Check whether --with-install-prefix or --without-install-prefix was given.
+ if test "${with_install_prefix+set}" = set; then
+   withval="$with_install_prefix"
+-  case "$withval" in #(vi
+-	yes|no) #(vi
++  case "x$withval" in #(vi
++	xyes|xno) #(vi
+ 		;;
+ 	*)	DESTDIR="$withval"
+ 		;;
+ 	esac
+ fi;
+-echo "$as_me:4298: result: $DESTDIR" >&5
++echo "$as_me:4086: result: $DESTDIR" >&5
+ echo "${ECHO_T}$DESTDIR" >&6
+ 
+ ###############################################################################
+@@ -4323,7 +4111,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:4326: checking for $ac_word" >&5
++echo "$as_me:4114: 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
+@@ -4338,7 +4126,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:4341: found $ac_dir/$ac_word" >&5
++echo "$as_me:4129: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -4346,10 +4134,10 @@ fi
+ fi
+ BUILD_CC=$ac_cv_prog_BUILD_CC
+ if test -n "$BUILD_CC"; then
+-  echo "$as_me:4349: result: $BUILD_CC" >&5
++  echo "$as_me:4137: result: $BUILD_CC" >&5
+ echo "${ECHO_T}$BUILD_CC" >&6
+ else
+-  echo "$as_me:4352: result: no" >&5
++  echo "$as_me:4140: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -4357,12 +4145,12 @@ fi
+ done
+ 
+ fi;
+-	echo "$as_me:4360: checking for native build C compiler" >&5
++	echo "$as_me:4148: checking for native build C compiler" >&5
+ echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
+-	echo "$as_me:4362: result: $BUILD_CC" >&5
++	echo "$as_me:4150: result: $BUILD_CC" >&5
+ echo "${ECHO_T}$BUILD_CC" >&6
+ 
+-	echo "$as_me:4365: checking for native build C preprocessor" >&5
++	echo "$as_me:4153: 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.
+@@ -4372,10 +4160,10 @@ if test "${with_build_cpp+set}" = set; then
+ else
+   BUILD_CPP='${BUILD_CC} -E'
+ fi;
+-	echo "$as_me:4375: result: $BUILD_CPP" >&5
++	echo "$as_me:4163: result: $BUILD_CPP" >&5
+ echo "${ECHO_T}$BUILD_CPP" >&6
+ 
+-	echo "$as_me:4378: checking for native build C flags" >&5
++	echo "$as_me:4166: 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.
+@@ -4383,10 +4171,10 @@ if test "${with_build_cflags+set}" = set; then
+   withval="$with_build_cflags"
+   BUILD_CFLAGS="$withval"
+ fi;
+-	echo "$as_me:4386: result: $BUILD_CFLAGS" >&5
++	echo "$as_me:4174: result: $BUILD_CFLAGS" >&5
+ echo "${ECHO_T}$BUILD_CFLAGS" >&6
+ 
+-	echo "$as_me:4389: checking for native build C preprocessor-flags" >&5
++	echo "$as_me:4177: 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.
+@@ -4394,10 +4182,10 @@ if test "${with_build_cppflags+set}" = set; then
+   withval="$with_build_cppflags"
+   BUILD_CPPFLAGS="$withval"
+ fi;
+-	echo "$as_me:4397: result: $BUILD_CPPFLAGS" >&5
++	echo "$as_me:4185: result: $BUILD_CPPFLAGS" >&5
+ echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
+ 
+-	echo "$as_me:4400: checking for native build linker-flags" >&5
++	echo "$as_me:4188: 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.
+@@ -4405,10 +4193,10 @@ if test "${with_build_ldflags+set}" = set; then
+   withval="$with_build_ldflags"
+   BUILD_LDFLAGS="$withval"
+ fi;
+-	echo "$as_me:4408: result: $BUILD_LDFLAGS" >&5
++	echo "$as_me:4196: result: $BUILD_LDFLAGS" >&5
+ echo "${ECHO_T}$BUILD_LDFLAGS" >&6
+ 
+-	echo "$as_me:4411: checking for native build linker-libraries" >&5
++	echo "$as_me:4199: 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.
+@@ -4416,7 +4204,7 @@ if test "${with_build_libs+set}" = set; then
+   withval="$with_build_libs"
+   BUILD_LIBS="$withval"
+ fi;
+-	echo "$as_me:4419: result: $BUILD_LIBS" >&5
++	echo "$as_me:4207: result: $BUILD_LIBS" >&5
+ echo "${ECHO_T}$BUILD_LIBS" >&6
+ 
+ 	# this assumes we're on Unix.
+@@ -4426,7 +4214,7 @@ echo "${ECHO_T}$BUILD_LIBS" >&6
+ 	: ${BUILD_CC:='${CC}'}
+ 
+ 	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
+-		{ { echo "$as_me:4429: error: Cross-build requires two compilers.
++		{ { echo "$as_me:4217: 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;}
+@@ -4451,7 +4239,7 @@ fi
+ ### shared, for example.
+ cf_list_models=""
+ 
+-echo "$as_me:4454: checking if libtool -version-number should be used" >&5
++echo "$as_me:4242: 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.
+@@ -4468,7 +4256,7 @@ else
+   cf_libtool_version=yes
+ 
+ fi;
+-echo "$as_me:4471: result: $cf_libtool_version" >&5
++echo "$as_me:4259: result: $cf_libtool_version" >&5
+ echo "${ECHO_T}$cf_libtool_version" >&6
+ 
+ if test "$cf_libtool_version" = yes ; then
+@@ -4493,7 +4281,7 @@ LIB_LINK='${CC}'
+ LIB_INSTALL=
+ LIB_UNINSTALL=
+ 
+-echo "$as_me:4496: checking if you want to build libraries with libtool" >&5
++echo "$as_me:4284: 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.
+@@ -4503,7 +4291,7 @@ if test "${with_libtool+set}" = set; then
+ else
+   with_libtool=no
+ fi;
+-echo "$as_me:4506: result: $with_libtool" >&5
++echo "$as_me:4294: result: $with_libtool" >&5
+ echo "${ECHO_T}$with_libtool" >&6
+ if test "$with_libtool" != "no"; then
+ 
+@@ -4522,7 +4310,7 @@ case ".$with_libtool" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval with_libtool="$with_libtool"
+   case ".$with_libtool" in #(vi
+   .NONE/*)
+@@ -4534,7 +4322,7 @@ case ".$with_libtool" in #(vi
+   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:4537: error: expected a pathname, not \"$with_libtool\"" >&5
++  { { echo "$as_me:4325: error: expected a pathname, not \"$with_libtool\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+@@ -4542,50 +4330,199 @@ esac
+ 
+ 		LIBTOOL=$with_libtool
+ 	else
+-		# Extract the first word of "libtool", so it can be a program name with args.
+-set dummy libtool; ac_word=$2
+-echo "$as_me:4547: checking for $ac_word" >&5
++		if test -n "$ac_tool_prefix"; then
++  for ac_prog in libtool glibtool
++  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:4338: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_path_LIBTOOL+set}" = set; then
++if test "${ac_cv_prog_LIBTOOL+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  case $LIBTOOL in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
+-  ;;
+-  *)
++  if test -n "$LIBTOOL"; then
++  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
++else
+   ac_save_IFS=$IFS; IFS=$ac_path_separator
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+   IFS=$ac_save_IFS
+   test -z "$ac_dir" && ac_dir=.
+-  if $as_executable_p "$ac_dir/$ac_word"; then
+-   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
+-   echo "$as_me:4564: found $ac_dir/$ac_word" >&5
+-   break
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
++echo "$as_me:4353: found $ac_dir/$ac_word" >&5
++break
++done
++
++fi
++fi
++LIBTOOL=$ac_cv_prog_LIBTOOL
++if test -n "$LIBTOOL"; then
++  echo "$as_me:4361: result: $LIBTOOL" >&5
++echo "${ECHO_T}$LIBTOOL" >&6
++else
++  echo "$as_me:4364: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++    test -n "$LIBTOOL" && break
++  done
++fi
++if test -z "$LIBTOOL"; then
++  ac_ct_LIBTOOL=$LIBTOOL
++  for ac_prog in libtool glibtool
++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:4377: 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
++else
++  if test -n "$ac_ct_LIBTOOL"; then
++  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
++echo "$as_me:4392: found $ac_dir/$ac_word" >&5
++break
++done
++
++fi
+ fi
++ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
++if test -n "$ac_ct_LIBTOOL"; then
++  echo "$as_me:4400: result: $ac_ct_LIBTOOL" >&5
++echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
++else
++  echo "$as_me:4403: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++  test -n "$ac_ct_LIBTOOL" && break
+ done
++test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
+ 
+-  ;;
+-esac
++  LIBTOOL=$ac_ct_LIBTOOL
++fi
++
++if test -n "$LIBTOOL" && test "$LIBTOOL" != none
++then
++	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
++else
++	cf_cv_libtool_version=
+ fi
+-LIBTOOL=$ac_cv_path_LIBTOOL
++test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
++
++		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
++		then
++
++unset ac_cv_prog_ac_ct_LIBTOOL
++unset ac_ct_LIBTOOL
++unset LIBTOOL
++
++			if test -n "$ac_tool_prefix"; then
++  for ac_prog in glibtool
++  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:4434: 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
++else
++  if test -n "$LIBTOOL"; then
++  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
++echo "$as_me:4449: found $ac_dir/$ac_word" >&5
++break
++done
+ 
++fi
++fi
++LIBTOOL=$ac_cv_prog_LIBTOOL
+ if test -n "$LIBTOOL"; then
+-  echo "$as_me:4575: result: $LIBTOOL" >&5
++  echo "$as_me:4457: result: $LIBTOOL" >&5
+ echo "${ECHO_T}$LIBTOOL" >&6
+ else
+-  echo "$as_me:4578: result: no" >&5
++  echo "$as_me:4460: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++    test -n "$LIBTOOL" && break
++  done
++fi
++if test -z "$LIBTOOL"; then
++  ac_ct_LIBTOOL=$LIBTOOL
++  for ac_prog in glibtool
++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:4473: 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
++else
++  if test -n "$ac_ct_LIBTOOL"; then
++  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
++else
++  ac_save_IFS=$IFS; IFS=$ac_path_separator
++ac_dummy="$PATH"
++for ac_dir in $ac_dummy; do
++  IFS=$ac_save_IFS
++  test -z "$ac_dir" && ac_dir=.
++  $as_executable_p "$ac_dir/$ac_word" || continue
++ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
++echo "$as_me:4488: found $ac_dir/$ac_word" >&5
++break
++done
++
++fi
++fi
++ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
++if test -n "$ac_ct_LIBTOOL"; then
++  echo "$as_me:4496: result: $ac_ct_LIBTOOL" >&5
++echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
++else
++  echo "$as_me:4499: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
++  test -n "$ac_ct_LIBTOOL" && break
++done
++test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
++
++  LIBTOOL=$ac_ct_LIBTOOL
++fi
++
++if test -n "$LIBTOOL" && test "$LIBTOOL" != none
++then
++	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
++else
++	cf_cv_libtool_version=
++fi
++test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
++
++		fi
+ 	fi
+ 	if test -z "$LIBTOOL" ; then
+-		{ { echo "$as_me:4584: error: Cannot find libtool" >&5
++		{ { echo "$as_me:4521: error: Cannot find libtool" >&5
+ echo "$as_me: error: Cannot find libtool" >&2;}
+    { (exit 1); exit 1; }; }
+ 	fi
+-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
++	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
+ 	LIB_OBJECT='${OBJECTS:.o=.lo}'
+ 	LIB_SUFFIX=.la
+ 	LIB_CLEAN='${LIBTOOL} --mode=clean'
+@@ -4595,26 +4532,36 @@ echo "$as_me: error: Cannot find libtool" >&2;}
+ 	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
+ 	LIB_PREP=:
+ 
+-	# Show the version of libtool
+-	echo "$as_me:4599: checking version of libtool" >&5
+-echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
++if test -n "$LIBTOOL" && test "$LIBTOOL" != none
++then
++	echo "$as_me:4537: checking version of $LIBTOOL" >&5
++echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
+ 
+-	# Save the version in a cache variable - this is not entirely a good
+-	# thing, but the version string from libtool is very ugly, and for
+-	# bug reports it might be useful to have the original string. "("
++if test -n "$LIBTOOL" && test "$LIBTOOL" != none
++then
+ 	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
+-	echo "$as_me:4606: result: $cf_cv_libtool_version" >&5
++else
++	cf_cv_libtool_version=
++fi
++test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
++
++	echo "$as_me:4548: 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:4609: error: This is not GNU libtool" >&5
++		{ { echo "$as_me:4551: error: This is not GNU libtool" >&5
+ echo "$as_me: error: This is not GNU libtool" >&2;}
+    { (exit 1); exit 1; }; }
+ 	fi
++else
++	{ { echo "$as_me:4556: error: GNU libtool has not been found" >&5
++echo "$as_me: error: GNU libtool has not been found" >&2;}
++   { (exit 1); exit 1; }; }
++fi
+ 
+ 	# special hack to add -no-undefined (which libtool should do for itself)
+ 	LT_UNDEF=
+ 	case "$cf_cv_system_name" in #(vi
+-	cygwin*|mingw32*|uwin*|aix[456]) #(vi
++	cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
+ 		LT_UNDEF=-no-undefined
+ 		;;
+ 	esac
+@@ -4642,7 +4589,7 @@ cf_list_models="$cf_list_models libtool"
+ 
+ else
+ 
+-echo "$as_me:4645: checking if you want to build shared libraries" >&5
++echo "$as_me:4592: 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.
+@@ -4652,11 +4599,11 @@ if test "${with_shared+set}" = set; then
+ else
+   with_shared=no
+ fi;
+-echo "$as_me:4655: result: $with_shared" >&5
++echo "$as_me:4602: result: $with_shared" >&5
+ echo "${ECHO_T}$with_shared" >&6
+-test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
++test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
+ 
+-echo "$as_me:4659: checking if you want to build static libraries" >&5
++echo "$as_me:4606: 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.
+@@ -4666,11 +4613,11 @@ if test "${with_normal+set}" = set; then
+ else
+   with_normal=yes
+ fi;
+-echo "$as_me:4669: result: $with_normal" >&5
++echo "$as_me:4616: result: $with_normal" >&5
+ echo "${ECHO_T}$with_normal" >&6
+-test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
++test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
+ 
+-echo "$as_me:4673: checking if you want to build debug libraries" >&5
++echo "$as_me:4620: 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.
+@@ -4680,11 +4627,11 @@ if test "${with_debug+set}" = set; then
+ else
+   with_debug=yes
+ fi;
+-echo "$as_me:4683: result: $with_debug" >&5
++echo "$as_me:4630: result: $with_debug" >&5
+ echo "${ECHO_T}$with_debug" >&6
+-test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
++test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
+ 
+-echo "$as_me:4687: checking if you want to build profiling libraries" >&5
++echo "$as_me:4634: 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.
+@@ -4694,27 +4641,44 @@ if test "${with_profile+set}" = set; then
+ else
+   with_profile=no
+ fi;
+-echo "$as_me:4697: result: $with_profile" >&5
++echo "$as_me:4644: result: $with_profile" >&5
+ echo "${ECHO_T}$with_profile" >&6
+-test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
++test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
++
++fi
+ 
++if test "X$cf_with_cxx_binding" != Xno; then
++if test "x$with_shared" = "xyes"; then
++echo "$as_me:4652: 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.
++if test "${with_cxx_shared+set}" = set; then
++  withval="$with_cxx_shared"
++  with_shared_cxx=$withval
++else
++  with_shared_cxx=no
++fi;
++echo "$as_me:4662: result: $with_shared_cxx" >&5
++echo "${ECHO_T}$with_shared_cxx" >&6
++fi
+ fi
+ 
+ ###############################################################################
+ 
+-echo "$as_me:4705: checking for specified models" >&5
++echo "$as_me:4669: 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:4709: result: $cf_list_models" >&5
++echo "$as_me:4673: 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:4714: checking for default model" >&5
++echo "$as_me:4678: 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:4717: result: $DFT_LWR_MODEL" >&5
++echo "$as_me:4681: result: $DFT_LWR_MODEL" >&5
+ echo "${ECHO_T}$DFT_LWR_MODEL" >&6
+ 
+ DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+@@ -4728,6 +4692,22 @@ LIB_NAME=ncurses
+ LIB_DIR=../lib
+ LIB_2ND=../../lib
+ 
++echo "$as_me:4695: 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.
++if test "${with_lib_prefix+set}" = set; then
++  withval="$with_lib_prefix"
++  with_lib_prefix=$withval
++else
++  with_lib_prefix=auto
++fi;
++echo "$as_me:4705: result: $with_lib_prefix" >&5
++echo "${ECHO_T}$with_lib_prefix" >&6
++
++if test $with_lib_prefix = auto
++then
++
+ 	case $cf_cv_system_name in #(vi
+ 	OS/2*|os2*) #(vi
+         LIB_PREFIX=''
+@@ -4737,13 +4717,28 @@ LIB_2ND=../../lib
+ 	esac
+ cf_prefix=$LIB_PREFIX
+ 
+-LIB_PREFIX=$cf_prefix
++elif test $with_lib_prefix = no
++then
++	LIB_PREFIX=
++else
++	LIB_PREFIX=$with_lib_prefix
++fi
+ 
+ LIB_SUFFIX=
+ 
++	echo "$as_me:4729: 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:4736: result: $PATH_SEPARATOR" >&5
++echo "${ECHO_T}$PATH_SEPARATOR" >&6
++
+ ###############################################################################
+ 
+-echo "$as_me:4746: checking if you want to build a separate terminfo library" >&5
++echo "$as_me:4741: 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.
+@@ -4753,10 +4748,10 @@ if test "${with_termlib+set}" = set; then
+ else
+   with_termlib=no
+ fi;
+-echo "$as_me:4756: result: $with_termlib" >&5
++echo "$as_me:4751: result: $with_termlib" >&5
+ echo "${ECHO_T}$with_termlib" >&6
+ 
+-echo "$as_me:4759: checking if you want to build a separate tic library" >&5
++echo "$as_me:4754: 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.
+@@ -4766,13 +4761,13 @@ if test "${with_ticlib+set}" = set; then
+ else
+   with_ticlib=no
+ fi;
+-echo "$as_me:4769: result: $with_ticlib" >&5
++echo "$as_me:4764: result: $with_ticlib" >&5
+ echo "${ECHO_T}$with_ticlib" >&6
+ 
+ ### Checks for special libraries, must be done up-front.
+ SHLIB_LIST=""
+ 
+-echo "$as_me:4775: checking if you want to link with the GPM mouse library" >&5
++echo "$as_me:4770: 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.
+@@ -4782,27 +4777,27 @@ if test "${with_gpm+set}" = set; then
+ else
+   with_gpm=maybe
+ fi;
+-echo "$as_me:4785: result: $with_gpm" >&5
++echo "$as_me:4780: result: $with_gpm" >&5
+ echo "${ECHO_T}$with_gpm" >&6
+ 
+ if test "$with_gpm" != no ; then
+-	echo "$as_me:4789: checking for gpm.h" >&5
++	echo "$as_me:4784: 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 4795 "configure"
++#line 4790 "configure"
+ #include "confdefs.h"
+ #include <gpm.h>
+ _ACEOF
+-if { (eval echo "$as_me:4799: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:4794: \"$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:4805: \$? = $ac_status" >&5
++  echo "$as_me:4800: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -4821,25 +4816,25 @@ else
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ fi
+-echo "$as_me:4824: result: $ac_cv_header_gpm_h" >&5
++echo "$as_me:4819: 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
+ 
+-		cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define HAVE_GPM_H 1
+ 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}:4835: testing assuming we really have GPM library ..." 1>&5
++echo "${as_me:-configure}:4830: testing assuming we really have GPM library ..." 1>&5
+ 
+-			cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define HAVE_LIBGPM 1
+ EOF
+ 
+ 		else
+-			echo "$as_me:4842: checking for Gpm_Open in -lgpm" >&5
++			echo "$as_me:4837: 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
+@@ -4847,7 +4842,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4850 "configure"
++#line 4845 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -4866,16 +4861,16 @@ Gpm_Open ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
++if { (eval echo "$as_me:4864: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:4872: \$? = $ac_status" >&5
++  echo "$as_me:4867: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:4875: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4870: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4878: \$? = $ac_status" >&5
++  echo "$as_me:4873: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_Gpm_Open=yes
+ else
+@@ -4886,13 +4881,13 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:4889: result: $ac_cv_lib_gpm_Gpm_Open" >&5
++echo "$as_me:4884: 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
+   :
+ else
+ 
+-				{ { echo "$as_me:4895: error: Cannot link with GPM library" >&5
++				{ { echo "$as_me:4890: error: Cannot link with GPM library" >&5
+ echo "$as_me: error: Cannot link with GPM library" >&2;}
+    { (exit 1); exit 1; }; }
+ 		fi
+@@ -4902,7 +4897,7 @@ fi
+ 
+ else
+ 
+-		test "$with_gpm" != maybe && { echo "$as_me:4905: WARNING: Cannot find GPM header" >&5
++		test "$with_gpm" != maybe && { echo "$as_me:4900: WARNING: Cannot find GPM header" >&5
+ echo "$as_me: WARNING: Cannot find GPM header" >&2;}
+ 		with_gpm=no
+ 
+@@ -4911,7 +4906,7 @@ fi
+ fi
+ 
+ if test "$with_gpm" != no ; then
+-	echo "$as_me:4914: checking if you want to load GPM dynamically" >&5
++	echo "$as_me:4909: 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.
+@@ -4921,18 +4916,18 @@ if test "${with_dlsym+set}" = set; then
+ else
+   with_dlsym=yes
+ fi;
+-	echo "$as_me:4924: result: $with_dlsym" >&5
++	echo "$as_me:4919: result: $with_dlsym" >&5
+ echo "${ECHO_T}$with_dlsym" >&6
+-	if test "$with_dlsym" = yes ; then
++	if test "x$with_dlsym" = xyes ; then
+ 
+ cf_have_dlsym=no
+-echo "$as_me:4929: checking for dlsym" >&5
++echo "$as_me:4924: 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 4935 "configure"
++#line 4930 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char dlsym (); below.  */
+@@ -4955,7 +4950,7 @@ main ()
+ #if defined (__stub_dlsym) || defined (__stub___dlsym)
+ choke me
+ #else
+-f = dlsym;
++f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -4963,16 +4958,16 @@ f = dlsym;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
++if { (eval echo "$as_me:4961: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:4969: \$? = $ac_status" >&5
++  echo "$as_me:4964: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:4972: \"$ac_try\"") >&5
++  { (eval echo "$as_me:4967: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:4975: \$? = $ac_status" >&5
++  echo "$as_me:4970: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_func_dlsym=yes
+ else
+@@ -4982,14 +4977,14 @@ ac_cv_func_dlsym=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:4985: result: $ac_cv_func_dlsym" >&5
++echo "$as_me:4980: 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:4992: checking for dlsym in -ldl" >&5
++echo "$as_me:4987: 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
+@@ -4997,7 +4992,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldl  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5000 "configure"
++#line 4995 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -5016,16 +5011,16 @@ dlsym ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5022: \$? = $ac_status" >&5
++  echo "$as_me:5017: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5025: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5020: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5028: \$? = $ac_status" >&5
++  echo "$as_me:5023: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_dl_dlsym=yes
+ else
+@@ -5036,7 +5031,7 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:5039: result: $ac_cv_lib_dl_dlsym" >&5
++echo "$as_me:5034: 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
+ 
+@@ -5049,10 +5044,10 @@ fi
+ if test "$cf_have_dlsym" = yes ; then
+ 	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+ 
+-	echo "$as_me:5052: checking whether able to link to dl*() functions" >&5
++	echo "$as_me:5047: 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 5055 "configure"
++#line 5050 "configure"
+ #include "confdefs.h"
+ #include <dlfcn.h>
+ int
+@@ -5070,19 +5065,19 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5076: \$? = $ac_status" >&5
++  echo "$as_me:5071: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5079: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5074: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5082: \$? = $ac_status" >&5
++  echo "$as_me:5077: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+-		cat >>confdefs.h <<\EOF
++cat >>confdefs.h <<\EOF
+ #define HAVE_LIBDL 1
+ EOF
+ 
+@@ -5090,28 +5085,28 @@ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ 
+-		{ { echo "$as_me:5093: error: Cannot link test program for libdl" >&5
++		{ { echo "$as_me:5088: 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:5098: result: ok" >&5
++	echo "$as_me:5093: result: ok" >&5
+ echo "${ECHO_T}ok" >&6
+ else
+-	{ { echo "$as_me:5101: error: Cannot find dlsym function" >&5
++	{ { echo "$as_me:5096: error: Cannot find dlsym function" >&5
+ echo "$as_me: error: Cannot find dlsym function" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ 
+-		if test "$with_gpm" != yes ; then
++		if test "x$with_gpm" != xyes ; then
+ 			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
+ 
+-echo "${as_me:-configure}:5109: testing assuming soname for gpm is $with_gpm ..." 1>&5
++echo "${as_me:-configure}:5104: testing assuming soname for gpm is $with_gpm ..." 1>&5
+ 
+ 			cf_cv_gpm_soname="$with_gpm"
+ 		else
+ 
+-echo "$as_me:5114: checking for soname of gpm library" >&5
++echo "$as_me:5109: 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
+@@ -5129,15 +5124,15 @@ if (Gpm_Open(0,0)) Gpm_Close();
+ CF_EOF
+ cf_save_LIBS="$LIBS"
+ 	LIBS="-lgpm $LIBS"
+-	if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
++	if { (eval echo "$as_me:5127: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5135: \$? = $ac_status" >&5
++  echo "$as_me:5130: \$? = $ac_status" >&5
+   (exit $ac_status); } ; then
+-		if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
++		if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5140: \$? = $ac_status" >&5
++  echo "$as_me:5135: \$? = $ac_status" >&5
+   (exit $ac_status); } ; then
+ 			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
+ 			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
+@@ -5148,11 +5143,12 @@ LIBS="$cf_save_LIBS"
+ fi
+ 
+ fi
+-echo "$as_me:5151: result: $cf_cv_gpm_soname" >&5
++echo "$as_me:5146: result: $cf_cv_gpm_soname" >&5
+ echo "${ECHO_T}$cf_cv_gpm_soname" >&6
+ 
+ 		fi
+-		test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
++		test "$cf_cv_gpm_soname" != "unknown" &&
++cat >>confdefs.h <<EOF
+ #define LIBGPM_SONAME "$cf_cv_gpm_soname"
+ EOF
+ 
+@@ -5161,11 +5157,12 @@ EOF
+ 		SHLIB_LIST="-lgpm $SHLIB_LIST"
+ 		TEST_LIBS="-lgpm $TEST_LIBS"
+ 	fi
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define HAVE_LIBGPM 1
+ EOF
+ 
+-echo "$as_me:5168: checking for Gpm_Wgetch in -lgpm" >&5
++echo "$as_me:5165: 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
+@@ -5173,7 +5170,7 @@ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgpm  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5176 "configure"
++#line 5173 "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+@@ -5192,16 +5189,16 @@ Gpm_Wgetch ();
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5195: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5192: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5198: \$? = $ac_status" >&5
++  echo "$as_me:5195: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5201: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5198: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5204: \$? = $ac_status" >&5
++  echo "$as_me:5201: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_gpm_Gpm_Wgetch=yes
+ else
+@@ -5212,11 +5209,11 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:5215: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
++echo "$as_me:5212: 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:5219: checking if GPM is weakly bound to curses library" >&5
++echo "$as_me:5216: 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
+@@ -5240,15 +5237,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:5243: \"$ac_compile\"") >&5
++	if { (eval echo "$as_me:5240: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5246: \$? = $ac_status" >&5
++  echo "$as_me:5243: \$? = $ac_status" >&5
+   (exit $ac_status); } ; then
+-		if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
++		if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5251: \$? = $ac_status" >&5
++  echo "$as_me:5248: \$? = $ac_status" >&5
+   (exit $ac_status); } ; then
+ 			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
+ 			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
+@@ -5260,11 +5257,11 @@ CF_EOF
+ fi
+ 
+ fi
+-echo "$as_me:5263: result: $cf_cv_check_gpm_wgetch" >&5
++echo "$as_me:5260: 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:5267: WARNING: GPM library is already linked with curses - read the FAQ" >&5
++	{ echo "$as_me:5264: 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
+ 
+@@ -5274,7 +5271,7 @@ fi
+ 
+ # not everyone has "test -c"
+ if test -c /dev/sysmouse 2>/dev/null ; then
+-echo "$as_me:5277: checking if you want to use sysmouse" >&5
++echo "$as_me:5274: 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.
+@@ -5286,7 +5283,7 @@ else
+ fi;
+ 	if test "$cf_with_sysmouse" != no ; then
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 5289 "configure"
++#line 5286 "configure"
+ #include "confdefs.h"
+ 
+ #include <osreldate.h>
+@@ -5309,16 +5306,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5309: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5315: \$? = $ac_status" >&5
++  echo "$as_me:5312: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5318: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5315: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5321: \$? = $ac_status" >&5
++  echo "$as_me:5318: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_with_sysmouse=yes
+ else
+@@ -5328,9 +5325,10 @@ cf_with_sysmouse=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 	fi
+-echo "$as_me:5331: result: $cf_with_sysmouse" >&5
++echo "$as_me:5328: result: $cf_with_sysmouse" >&5
+ echo "${ECHO_T}$cf_with_sysmouse" >&6
+-test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
++test "$cf_with_sysmouse" = yes &&
++cat >>confdefs.h <<\EOF
+ #define USE_SYSMOUSE 1
+ EOF
+ 
+@@ -5338,15 +5336,15 @@ fi
+ 
+ if test X"$CC_G_OPT" = X"" ; then
+ 	CC_G_OPT='-g'
+-	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
++	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 "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
++	test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
+ fi
+ 
+-echo "$as_me:5349: checking for default loader flags" >&5
++echo "$as_me:5347: 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=''   ;;
+@@ -5355,13 +5353,13 @@ debug)   LD_MODEL=$CC_G_OPT ;;
+ profile) LD_MODEL='-pg';;
+ shared)  LD_MODEL=''   ;;
+ esac
+-echo "$as_me:5358: result: $LD_MODEL" >&5
++echo "$as_me:5356: result: $LD_MODEL" >&5
+ echo "${ECHO_T}$LD_MODEL" >&6
+ 
+ case $DFT_LWR_MODEL in
+ shared)
+ 
+-echo "$as_me:5364: checking if rpath option should be used" >&5
++echo "$as_me:5362: 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.
+@@ -5371,10 +5369,10 @@ if test "${enable_rpath+set}" = set; then
+ else
+   cf_cv_enable_rpath=no
+ fi;
+-echo "$as_me:5374: result: $cf_cv_enable_rpath" >&5
++echo "$as_me:5372: result: $cf_cv_enable_rpath" >&5
+ echo "${ECHO_T}$cf_cv_enable_rpath" >&6
+ 
+-echo "$as_me:5377: checking if shared libraries should be relinked during install" >&5
++echo "$as_me:5375: 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.
+@@ -5384,13 +5382,13 @@ if test "${enable_relink+set}" = set; then
+ else
+   cf_cv_do_relink=yes
+ fi;
+-echo "$as_me:5387: result: $cf_cv_do_relink" >&5
++echo "$as_me:5385: result: $cf_cv_do_relink" >&5
+ echo "${ECHO_T}$cf_cv_do_relink" >&6
+ 	;;
+ esac
+ 
+ LD_RPATH_OPT=
+-echo "$as_me:5393: checking for an rpath option" >&5
++echo "$as_me:5391: checking for an rpath option" >&5
+ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
+ case $cf_cv_system_name in #(vi
+ irix*) #(vi
+@@ -5403,10 +5401,10 @@ irix*) #(vi
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-openbsd[2-9].*) #(vi
++openbsd[2-9].*|mirbsd*) #(vi
+ 	LD_RPATH_OPT="-Wl,-rpath,"
+ 	;;
+-freebsd*) #(vi
++dragonfly*|freebsd*) #(vi
+ 	LD_RPATH_OPT="-rpath "
+ 	;;
+ netbsd*) #(vi
+@@ -5421,17 +5419,17 @@ solaris2*) #(vi
+ *)
+ 	;;
+ esac
+-echo "$as_me:5424: result: $LD_RPATH_OPT" >&5
++echo "$as_me:5422: result: $LD_RPATH_OPT" >&5
+ echo "${ECHO_T}$LD_RPATH_OPT" >&6
+ 
+ case "x$LD_RPATH_OPT" in #(vi
+ x-R*)
+-	echo "$as_me:5429: checking if we need a space after rpath option" >&5
++	echo "$as_me:5427: 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"
+ 	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
+ 	cat >conftest.$ac_ext <<_ACEOF
+-#line 5434 "configure"
++#line 5432 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -5443,16 +5441,16 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5449: \$? = $ac_status" >&5
++  echo "$as_me:5447: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5452: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5450: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5455: \$? = $ac_status" >&5
++  echo "$as_me:5453: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_rpath_space=no
+ else
+@@ -5462,7 +5460,7 @@ cf_rpath_space=yes
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ 	LIBS="$cf_save_LIBS"
+-	echo "$as_me:5465: result: $cf_rpath_space" >&5
++	echo "$as_me:5463: result: $cf_rpath_space" >&5
+ echo "${ECHO_T}$cf_rpath_space" >&6
+ 	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ 	;;
+@@ -5477,7 +5475,7 @@ esac
+ 	cf_ld_rpath_opt=
+ 	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+ 
+-	echo "$as_me:5480: checking if release/abi version should be used for shared libs" >&5
++	echo "$as_me:5478: 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
+ 
+ # Check whether --with-shlib-version or --without-shlib-version was given.
+@@ -5492,7 +5490,7 @@ if test "${with_shlib_version+set}" = set; then
+ 		cf_cv_shlib_version=$withval
+ 		;;
+ 	*)
+-		{ { echo "$as_me:5495: error: option value must be one of: rel, abi, auto or no" >&5
++		{ { echo "$as_me:5493: error: option value must be one of: rel, abi, auto or no" >&5
+ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+    { (exit 1); exit 1; }; }
+ 		;;
+@@ -5501,23 +5499,24 @@ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+ else
+   cf_cv_shlib_version=auto
+ fi;
+-	echo "$as_me:5504: result: $cf_cv_shlib_version" >&5
++	echo "$as_me:5502: result: $cf_cv_shlib_version" >&5
+ echo "${ECHO_T}$cf_cv_shlib_version" >&6
+ 
+ 	cf_cv_rm_so_locs=no
++	cf_try_cflags=
+ 
+ 	# Some less-capable ports of gcc support only -fpic
+ 	CC_SHARED_OPTS=
+ 	if test "$GCC" = yes
+ 	then
+-		echo "$as_me:5513: checking which $CC option to use" >&5
++		echo "$as_me:5512: 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 5520 "configure"
++#line 5519 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -5529,16 +5528,16 @@ int x = 1
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5532: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5531: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5535: \$? = $ac_status" >&5
++  echo "$as_me:5534: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5538: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5537: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5541: \$? = $ac_status" >&5
++  echo "$as_me:5540: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -5547,7 +5546,7 @@ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ 		done
+-		echo "$as_me:5550: result: $CC_SHARED_OPTS" >&5
++		echo "$as_me:5549: result: $CC_SHARED_OPTS" >&5
+ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ 		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+@@ -5555,10 +5554,14 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ 	cf_cv_shlib_version_infix=no
+ 
+ 	case $cf_cv_system_name in #(vi
+-	aix[56]*) #(vi
++	aix4.3-9*|aix[5-7]*) #(vi
+ 		if test "$GCC" = yes; then
+ 			CC_SHARED_OPTS=
+-			MK_SHARED_LIB='$(CC) -shared'
++			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
++		else
++			# CC_SHARED_OPTS='-qpic=large -G'
++			# perhaps "-bM:SRE -bnoentry -bexpall"
++			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ 		fi
+ 		;;
+ 	beos*) #(vi
+@@ -5584,12 +5587,12 @@ CF_EOF
+ 		chmod +x mk_shared_lib.sh
+ 		;;
+ 	darwin*) #(vi
+-		EXTRA_CFLAGS="-no-cpp-precomp"
++		cf_try_cflags="no-cpp-precomp"
+ 		CC_SHARED_OPTS="-dynamic"
+ 		MK_SHARED_LIB='${CC} ${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:5592: checking if ld -search_paths_first works" >&5
++		echo "$as_me:5595: 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
+@@ -5598,7 +5601,7 @@ else
+ 			cf_save_LDFLAGS=$LDFLAGS
+ 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ 			cat >conftest.$ac_ext <<_ACEOF
+-#line 5601 "configure"
++#line 5604 "configure"
+ #include "confdefs.h"
+ 
+ int
+@@ -5610,16 +5613,16 @@ int i;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5613: \"$ac_link\"") >&5
++if { (eval echo "$as_me:5616: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5616: \$? = $ac_status" >&5
++  echo "$as_me:5619: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5619: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5622: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5622: \$? = $ac_status" >&5
++  echo "$as_me:5625: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_ldflags_search_paths_first=yes
+ else
+@@ -5630,12 +5633,20 @@ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ 				LDFLAGS=$cf_save_LDFLAGS
+ fi
+-echo "$as_me:5633: result: $cf_cv_ldflags_search_paths_first" >&5
++echo "$as_me:5636: 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
+ 		;;
++	hpux[7-8]*) #(vi
++		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
++		if test "$GCC" != yes; then
++			CC_SHARED_OPTS='+Z'
++		fi
++		MK_SHARED_LIB='${LD} -b -o $@'
++		INSTALL_LIB="-m 555"
++		;;
+ 	hpux*) #(vi
+ 		# (tested with gcc 2.7.2 -- I don't have c89)
+ 		if test "$GCC" = yes; then
+@@ -5649,9 +5660,19 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		# readonly to exploit a quirk in the memory manager.
+ 		INSTALL_LIB="-m 555"
+ 		;;
++	interix*)
++		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
++		if test "$cf_cv_shlib_version" = rel; then
++			cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
++		else
++			cf_shared_soname='`basename `'
++		fi
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
++		;;
+ 	irix*) #(vi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		# tested with IRIX 5.2 and 'cc'.
+ 		if test "$GCC" != yes; then
+@@ -5668,7 +5689,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 
+ 	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+@@ -5680,13 +5701,34 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 
+ 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ 		;;
+-	openbsd[2-9].*) #(vi
++	mingw*) #(vi
++		cf_cv_shlib_version=mingw
++		cf_cv_shlib_version_infix=mingw
++		CC_SHARED_OPTS=
++		MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
++		#MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
++		#MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
++		cat >mk_shared_lib.sh <<-CF_EOF
++		#!/bin/sh
++		SHARED_LIB=\$1
++		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
++		shift
++		cat <<-EOF
++		Linking shared library
++		** SHARED_LIB \$SHARED_LIB
++		** IMPORT_LIB \$IMPORT_LIB
++EOF
++		exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
++CF_EOF
++		chmod +x mk_shared_lib.sh
++		;;
++	openbsd[2-9].*|mirbsd*) #(vi
+ 		if test "$DFT_LWR_MODEL" = "shared" ; then
+ 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ 		fi
+ 		if test "$cf_cv_enable_rpath" = yes ; then
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 
+@@ -5704,12 +5746,12 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		MK_SHARED_LIB='${LD} -Bshareable -o $@'
+ 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ 		;;
+-	freebsd*) #(vi
++	dragonfly*|freebsd*) #(vi
+ 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+-			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 		fi
+ 
+ 	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+@@ -5726,7 +5768,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ 			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+-			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
++			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ 			if test "$cf_cv_shlib_version" = auto; then
+ 			if test -f /usr/libexec/ld.elf_so; then
+ 				cf_cv_shlib_version=abi
+@@ -5810,7 +5852,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ 			do
+ 				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ 				cat >conftest.$ac_ext <<_ACEOF
+-#line 5813 "configure"
++#line 5855 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -5822,16 +5864,16 @@ printf("Hello\n");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5825: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:5867: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:5828: \$? = $ac_status" >&5
++  echo "$as_me:5870: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:5831: \"$ac_try\"") >&5
++  { (eval echo "$as_me:5873: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5834: \$? = $ac_status" >&5
++  echo "$as_me:5876: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   break
+ else
+@@ -5868,21 +5910,62 @@ rm -f conftest.$ac_objext conftest.$ac_ext
+ 			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ 			;;
+ 		*)
+-			{ echo "$as_me:5871: WARNING: ignored --with-shlib-version" >&5
++			{ echo "$as_me:5913: WARNING: ignored --with-shlib-version" >&5
+ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
+ 			;;
+ 		esac
+ 		;;
+ 	esac
+ 
+-	if test -n "$cf_ld_rpath_opt" ; then
+-		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
++	if test -n "$cf_try_cflags"
++	then
++cat > conftest.$ac_ext <<EOF
++#line 5923 "${as_me:-configure}"
++#include <stdio.h>
++int main(int argc, char *argv[])
++{
++	printf("hello\n");
++	return (argv[argc-1] == 0) ;
++}
++EOF
++		cf_save_CFLAGS="$CFLAGS"
++		for cf_opt in $cf_try_cflags
++		do
++			CFLAGS="$cf_save_CFLAGS -$cf_opt"
++			echo "$as_me:5935: 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:5937: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:5940: \$? = $ac_status" >&5
++  (exit $ac_status); }; then
++				echo "$as_me:5942: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++				cf_save_CFLAGS="$CFLAGS"
++			else
++				echo "$as_me:5946: result: no" >&5
++echo "${ECHO_T}no" >&6
++			fi
++		done
++		CFLAGS="$cf_save_CFLAGS"
+ 	fi
+ 
++	# RPATH_LIST is a colon-separated list of directories
++	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
++	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
++
++	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
++
++echo "${as_me:-configure}:5959: 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}:5963: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
++
+ if test "$CC_SHARED_OPTS" = "unknown"; then
+ 	for model in $cf_list_models; do
+ 		if test "$model" = "shared"; then
+-			{ { echo "$as_me:5885: error: Shared libraries are not supported in this version" >&5
++			{ { echo "$as_me:5968: 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
+@@ -5892,7 +5975,7 @@ fi
+ ### If we're building with rpath, try to link non-standard libs that way too.
+ if test "$DFT_LWR_MODEL" = "shared"; then
+ 
+-echo "$as_me:5895: checking if rpath-hack should be disabled" >&5
++echo "$as_me:5978: 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.
+@@ -5909,21 +5992,21 @@ else
+   cf_disable_rpath_hack=no
+ 
+ fi;
+-echo "$as_me:5912: result: $cf_disable_rpath_hack" >&5
++echo "$as_me:5995: result: $cf_disable_rpath_hack" >&5
+ echo "${ECHO_T}$cf_disable_rpath_hack" >&6
+ if test "$cf_disable_rpath_hack" = no ; then
+ 
+-echo "$as_me:5916: checking for updated LDFLAGS" >&5
++echo "$as_me:5999: 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:5919: result: maybe" >&5
++	echo "$as_me:6002: 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:5926: checking for $ac_word" >&5
++echo "$as_me:6009: 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
+@@ -5938,7 +6021,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:5941: found $ac_dir/$ac_word" >&5
++echo "$as_me:6024: found $ac_dir/$ac_word" >&5
+ break
+ done
+ 
+@@ -5946,10 +6029,10 @@ fi
+ fi
+ cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
+ if test -n "$cf_ldd_prog"; then
+-  echo "$as_me:5949: result: $cf_ldd_prog" >&5
++  echo "$as_me:6032: result: $cf_ldd_prog" >&5
+ echo "${ECHO_T}$cf_ldd_prog" >&6
+ else
+-  echo "$as_me:5952: result: no" >&5
++  echo "$as_me:6035: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ 
+@@ -5963,7 +6046,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
+ 		cf_rpath_oops=
+ 
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5966 "configure"
++#line 6049 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int
+@@ -5975,16 +6058,16 @@ printf("Hello");
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:5978: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:5981: \$? = $ac_status" >&5
++  echo "$as_me:6064: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:5984: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6067: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:5987: \$? = $ac_status" >&5
++  echo "$as_me:6070: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
+ 		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
+@@ -6012,7 +6095,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}:6015: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
++echo "${as_me:-configure}:6098: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+ 
+ 						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
+ 						break
+@@ -6024,11 +6107,11 @@ echo "${as_me:-configure}:6015: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS
+ 
+ 	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+ 
+-echo "${as_me:-configure}:6027: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
++echo "${as_me:-configure}:6110: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+ 
+ test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
+ 
+-echo "${as_me:-configure}:6031: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
++echo "${as_me:-configure}:6114: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+ 
+ cf_rpath_dst=
+ for cf_rpath_src in $LDFLAGS
+@@ -6065,7 +6148,7 @@ do
+ 			then
+ 				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+ 
+-echo "${as_me:-configure}:6068: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
++echo "${as_me:-configure}:6151: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+ 
+ 				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ 			fi
+@@ -6078,11 +6161,11 @@ LDFLAGS=$cf_rpath_dst
+ 
+ test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
+ 
+-echo "${as_me:-configure}:6081: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
++echo "${as_me:-configure}:6164: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+ 
+ test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
+ 
+-echo "${as_me:-configure}:6085: testing ...checking LIBS $LIBS ..." 1>&5
++echo "${as_me:-configure}:6168: testing ...checking LIBS $LIBS ..." 1>&5
+ 
+ cf_rpath_dst=
+ for cf_rpath_src in $LIBS
+@@ -6119,7 +6202,7 @@ do
+ 			then
+ 				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+ 
+-echo "${as_me:-configure}:6122: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
++echo "${as_me:-configure}:6205: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+ 
+ 				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ 			fi
+@@ -6132,11 +6215,11 @@ LIBS=$cf_rpath_dst
+ 
+ test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
+ 
+-echo "${as_me:-configure}:6135: testing ...checked LIBS $LIBS ..." 1>&5
++echo "${as_me:-configure}:6218: testing ...checked LIBS $LIBS ..." 1>&5
+ 
+ 	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+ 
+-echo "${as_me:-configure}:6139: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
++echo "${as_me:-configure}:6222: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+ 
+ fi
+ 
+@@ -6147,7 +6230,7 @@ fi
+ ###############################################################################
+ 
+ ###	use option --disable-overwrite to leave out the link to -lcurses
+-echo "$as_me:6150: checking if you wish to install ncurses overwriting curses" >&5
++echo "$as_me:6233: 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.
+@@ -6157,10 +6240,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:6160: result: $with_overwrite" >&5
++echo "$as_me:6243: result: $with_overwrite" >&5
+ echo "${ECHO_T}$with_overwrite" >&6
+ 
+-echo "$as_me:6163: checking if external terminfo-database is used" >&5
++echo "$as_me:6246: 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.
+@@ -6170,7 +6253,7 @@ if test "${enable_database+set}" = set; then
+ else
+   use_database=yes
+ fi;
+-echo "$as_me:6173: result: $use_database" >&5
++echo "$as_me:6256: result: $use_database" >&5
+ echo "${ECHO_T}$use_database" >&6
+ 
+ case $host_os in #(vi
+@@ -6182,17 +6265,13 @@ os2*) #(vi
+ 	;;
+ esac
+ 
+-	case $cf_cv_system_name in
+-	os2*)	PATH_SEPARATOR=';'  ;;
+-	*)	PATH_SEPARATOR=':'  ;;
+-	esac
+-
+ if test "$use_database" != no ; then
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define USE_DATABASE 1
+ EOF
+ 
+-	echo "$as_me:6195: checking which terminfo source-file will be installed" >&5
++	echo "$as_me:6274: 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.
+@@ -6200,10 +6279,10 @@ if test "${with_database+set}" = set; then
+   withval="$with_database"
+   TERMINFO_SRC=$withval
+ fi;
+-	echo "$as_me:6203: result: $TERMINFO_SRC" >&5
++	echo "$as_me:6282: result: $TERMINFO_SRC" >&5
+ echo "${ECHO_T}$TERMINFO_SRC" >&6
+ 
+-	echo "$as_me:6206: checking whether to use hashed database instead of directory/tree" >&5
++	echo "$as_me:6285: 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.
+@@ -6213,13 +6292,13 @@ if test "${with_hashed_db+set}" = set; then
+ else
+   with_hashed_db=no
+ fi;
+-	echo "$as_me:6216: result: $with_hashed_db" >&5
++	echo "$as_me:6295: result: $with_hashed_db" >&5
+ echo "${ECHO_T}$with_hashed_db" >&6
+ else
+ 	with_hashed_db=no
+ fi
+ 
+-echo "$as_me:6222: checking for list of fallback descriptions" >&5
++echo "$as_me:6301: checking for list of fallback descriptions" >&5
+ echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
+ 
+ # Check whether --with-fallbacks or --without-fallbacks was given.
+@@ -6229,11 +6308,11 @@ if test "${with_fallbacks+set}" = set; then
+ else
+   with_fallback=
+ fi;
+-echo "$as_me:6232: result: $with_fallback" >&5
++echo "$as_me:6311: result: $with_fallback" >&5
+ echo "${ECHO_T}$with_fallback" >&6
+ FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
+ 
+-echo "$as_me:6236: checking if you want modern xterm or antique" >&5
++echo "$as_me:6315: 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.
+@@ -6247,17 +6326,42 @@ case $with_xterm_new in
+ no)	with_xterm_new=xterm-old;;
+ *)	with_xterm_new=xterm-new;;
+ esac
+-echo "$as_me:6250: result: $with_xterm_new" >&5
++echo "$as_me:6329: result: $with_xterm_new" >&5
+ echo "${ECHO_T}$with_xterm_new" >&6
+ WHICH_XTERM=$with_xterm_new
+ 
++echo "$as_me:6333: 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.
++if test "${with_xterm_kbs+set}" = set; then
++  withval="$with_xterm_kbs"
++  with_xterm_kbs=$withval
++else
++  with_xterm_kbs=BS
++fi;
++case x$with_xterm_kbs in
++xyes|xno|xBS|xbs|x8)
++	with_xterm_kbs=BS
++	;;
++xDEL|xdel|x127)
++	with_xterm_kbs=DEL
++	;;
++*)
++	with_xterm_kbs=$withval
++	;;
++esac
++echo "$as_me:6354: result: $with_xterm_kbs" >&5
++echo "${ECHO_T}$with_xterm_kbs" >&6
++XTERM_KBS=$with_xterm_kbs
++
+ MAKE_TERMINFO=
+ if test "$use_database" = no ; then
+ 	TERMINFO="${datadir}/terminfo"
+ 	MAKE_TERMINFO="#"
+ else
+ 
+-echo "$as_me:6260: checking for list of terminfo directories" >&5
++echo "$as_me:6364: 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.
+@@ -6285,7 +6389,7 @@ case ".$cf_src_path" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval cf_src_path="$cf_src_path"
+   case ".$cf_src_path" in #(vi
+   .NONE/*)
+@@ -6297,26 +6401,37 @@ case ".$cf_src_path" in #(vi
+   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:6300: error: expected a pathname, not \"$cf_src_path\"" >&5
++  { { echo "$as_me:6404: 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; }; }
+   ;;
+ esac
+ 
+-  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
++  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
+   cf_dst_path="${cf_dst_path}${cf_src_path}"
+ done
+ IFS="$ac_save_ifs"
+ 
+-eval 'TERMINFO_DIRS="$cf_dst_path"'
++# This may use the prefix/exec_prefix symbols which will only yield "NONE"
++# so we have to check/work around.  We do prefer the result of "eval"...
++eval cf_dst_eval="$cf_dst_path"
++case "x$cf_dst_eval" in #(vi
++xNONE*) #(vi
++	TERMINFO_DIRS=$cf_dst_path
++	;;
++*)
++	TERMINFO_DIRS="$cf_dst_eval"
++	;;
++esac
+ 
+-echo "$as_me:6313: result: $TERMINFO_DIRS" >&5
++echo "$as_me:6427: result: $TERMINFO_DIRS" >&5
+ echo "${ECHO_T}$TERMINFO_DIRS" >&6
+-test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
++test -n "$TERMINFO_DIRS" &&
++cat >>confdefs.h <<EOF
+ #define TERMINFO_DIRS "$TERMINFO_DIRS"
+ EOF
+ 
+-echo "$as_me:6319: checking for default terminfo directory" >&5
++echo "$as_me:6434: 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.
+@@ -6340,7 +6455,7 @@ case ".$withval" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval withval="$withval"
+   case ".$withval" in #(vi
+   .NONE/*)
+@@ -6352,17 +6467,18 @@ case ".$withval" in #(vi
+   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:6355: error: expected a pathname, not \"$withval\"" >&5
++  { { echo "$as_me:6470: error: expected a pathname, not \"$withval\"" >&5
+ echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+    { (exit 1); exit 1; }; }
+   ;;
+ esac
+ 
+ fi
+-TERMINFO="$withval"
++eval TERMINFO="$withval"
+ 
+-echo "$as_me:6364: result: $TERMINFO" >&5
++echo "$as_me:6479: result: $TERMINFO" >&5
+ echo "${ECHO_T}$TERMINFO" >&6
++
+ cat >>confdefs.h <<EOF
+ #define TERMINFO "$TERMINFO"
+ EOF
+@@ -6371,7 +6487,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:6374: checking if big-core option selected" >&5
++echo "$as_me:6490: 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.
+@@ -6383,7 +6499,7 @@ else
+   with_big_core=no
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 6386 "configure"
++#line 6502 "configure"
+ #include "confdefs.h"
+ 
+ #include <stdlib.h>
+@@ -6397,15 +6513,15 @@ int main() {
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6516: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6403: \$? = $ac_status" >&5
++  echo "$as_me:6519: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:6405: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6521: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6408: \$? = $ac_status" >&5
++  echo "$as_me:6524: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   with_big_core=yes
+ else
+@@ -6417,16 +6533,17 @@ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi;
+-echo "$as_me:6420: result: $with_big_core" >&5
++echo "$as_me:6536: result: $with_big_core" >&5
+ echo "${ECHO_T}$with_big_core" >&6
+-test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
++test "x$with_big_core" = "xyes" &&
++cat >>confdefs.h <<\EOF
+ #define HAVE_BIG_CORE 1
+ 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:6429: checking if big-strings option selected" >&5
++echo "$as_me:6546: 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.
+@@ -6440,8 +6557,8 @@ else
+ 		eval with_big_strings=no
+ 		;;
+ 	*) #(vi
+-		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
+-			| $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
++		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
++			| $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
+ 			eval with_big_strings=yes
+ 		else
+ 			eval with_big_strings=no
+@@ -6450,14 +6567,14 @@ else
+ 	esac
+ 
+ fi;
+-echo "$as_me:6453: result: $with_big_strings" >&5
++echo "$as_me:6570: result: $with_big_strings" >&5
+ echo "${ECHO_T}$with_big_strings" >&6
+ 
+ USE_BIG_STRINGS=0
+-test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
++test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
+ 
+ ###	use option --enable-termcap to compile in the termcap fallback support
+-echo "$as_me:6460: checking if you want termcap-fallback support" >&5
++echo "$as_me:6577: 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.
+@@ -6467,25 +6584,26 @@ if test "${enable_termcap+set}" = set; then
+ else
+   with_termcap=no
+ fi;
+-echo "$as_me:6470: result: $with_termcap" >&5
++echo "$as_me:6587: result: $with_termcap" >&5
+ echo "${ECHO_T}$with_termcap" >&6
+ 
+-if test "$with_termcap" != "yes" ; then
++if test "x$with_termcap" != "xyes" ; then
+ 	if test "$use_database" = no ; then
+ 		if test -z "$with_fallback" ; then
+-			{ { echo "$as_me:6476: error: You have disabled the database w/o specifying fallbacks" >&5
++			{ { echo "$as_me:6593: 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
+ 	fi
+-	cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define PURE_TERMINFO 1
+ EOF
+ 
+ else
+ 
+ if test "$with_ticlib" != no ; then
+-	{ { echo "$as_me:6488: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
++	{ { echo "$as_me:6606: 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
+@@ -6494,7 +6612,7 @@ cat >>confdefs.h <<\EOF
+ #define USE_TERMCAP 1
+ EOF
+ 
+-echo "$as_me:6497: checking for list of termcap files" >&5
++echo "$as_me:6615: 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.
+@@ -6522,7 +6640,7 @@ case ".$cf_src_path" in #(vi
+   ;;
+ .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+   ;;
+-.\${*prefix}*) #(vi
++.\${*prefix}*|.\${*dir}*) #(vi
+   eval cf_src_path="$cf_src_path"
+   case ".$cf_src_path" in #(vi
+   .NONE/*)
+@@ -6534,27 +6652,38 @@ case ".$cf_src_path" in #(vi
+   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
+   ;;
+ *)
+-  { { echo "$as_me:6537: error: expected a pathname, not \"$cf_src_path\"" >&5
++  { { echo "$as_me:6655: 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; }; }
+   ;;
+ esac
+ 
+-  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
++  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
+   cf_dst_path="${cf_dst_path}${cf_src_path}"
+ done
+ IFS="$ac_save_ifs"
+ 
+-eval 'TERMPATH="$cf_dst_path"'
++# This may use the prefix/exec_prefix symbols which will only yield "NONE"
++# so we have to check/work around.  We do prefer the result of "eval"...
++eval cf_dst_eval="$cf_dst_path"
++case "x$cf_dst_eval" in #(vi
++xNONE*) #(vi
++	TERMPATH=$cf_dst_path
++	;;
++*)
++	TERMPATH="$cf_dst_eval"
++	;;
++esac
+ 
+-echo "$as_me:6550: result: $TERMPATH" >&5
++echo "$as_me:6678: result: $TERMPATH" >&5
+ echo "${ECHO_T}$TERMPATH" >&6
+-test -n "$TERMPATH" && cat >>confdefs.h <<EOF
++test -n "$TERMPATH" &&
++cat >>confdefs.h <<EOF
+ #define TERMPATH "$TERMPATH"
+ EOF
+ 
+ ###	use option --enable-getcap to use a hacked getcap for reading termcaps
+-echo "$as_me:6557: checking if fast termcap-loader is needed" >&5
++echo "$as_me:6686: 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.
+@@ -6564,13 +6693,14 @@ if test "${enable_getcap+set}" = set; then
+ else
+   with_getcap=no
+ fi;
+-echo "$as_me:6567: result: $with_getcap" >&5
++echo "$as_me:6696: result: $with_getcap" >&5
+ echo "${ECHO_T}$with_getcap" >&6
+-test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
++test "x$with_getcap" = "xyes" &&
++cat >>confdefs.h <<\EOF
+ #define USE_GETCAP 1
+ EOF
+ 
+-echo "$as_me:6573: checking if translated termcaps will be cached in ~/.terminfo" >&5
++echo "$as_me:6703: 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.
+@@ -6580,16 +6710,17 @@ if test "${enable_getcap_cache+set}" = set; then
+ else
+   with_getcap_cache=no
+ fi;
+-echo "$as_me:6583: result: $with_getcap_cache" >&5
++echo "$as_me:6713: result: $with_getcap_cache" >&5
+ echo "${ECHO_T}$with_getcap_cache" >&6
+-test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
++test "x$with_getcap_cache" = "xyes" &&
++cat >>confdefs.h <<\EOF
+ #define USE_GETCAP_CACHE 1
+ EOF
+ 
+ fi
+ 
+ ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
+-echo "$as_me:6592: checking if ~/.terminfo is wanted" >&5
++echo "$as_me:6723: 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.
+@@ -6599,13 +6730,14 @@ if test "${enable_home_terminfo+set}" = set; then
+ else
+   with_home_terminfo=yes
+ fi;
+-echo "$as_me:6602: result: $with_home_terminfo" >&5
++echo "$as_me:6733: result: $with_home_terminfo" >&5
+ echo "${ECHO_T}$with_home_terminfo" >&6
+-test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
++test "x$with_home_terminfo" = "xyes" &&
++cat >>confdefs.h <<\EOF
+ #define USE_HOME_TERMINFO 1
+ EOF
+ 
+-echo "$as_me:6608: checking if you want to use restricted environment when running as root" >&5
++echo "$as_me:6740: 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
+ 
+ # Check whether --enable-root-environ or --disable-root-environ was given.
+@@ -6615,9 +6747,10 @@ if test "${enable_root_environ+set}" = set; then
+ else
+   with_root_environ=yes
+ fi;
+-echo "$as_me:6618: result: $with_root_environ" >&5
++echo "$as_me:6750: result: $with_root_environ" >&5
+ echo "${ECHO_T}$with_root_environ" >&6
+-test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
++test "x$with_root_environ" = xyes &&
++cat >>confdefs.h <<\EOF
+ #define USE_ROOT_ENVIRON 1
+ EOF
+ 
+@@ -6629,13 +6762,13 @@ for ac_func in \
+ 	unlink
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:6632: checking for $ac_func" >&5
++echo "$as_me:6765: 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 6638 "configure"
++#line 6771 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func (); below.  */
+@@ -6658,7 +6791,7 @@ main ()
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-f = $ac_func;
++f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -6666,16 +6799,16 @@ f = $ac_func;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6669: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6802: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6672: \$? = $ac_status" >&5
++  echo "$as_me:6805: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6675: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6808: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6678: \$? = $ac_status" >&5
++  echo "$as_me:6811: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   eval "$as_ac_var=yes"
+ else
+@@ -6685,7 +6818,7 @@ eval "$as_ac_var=no"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:6688: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "$as_me:6821: 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
+@@ -6702,13 +6835,13 @@ for ac_func in \
+ 		symlink
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:6705: checking for $ac_func" >&5
++echo "$as_me:6838: 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 6711 "configure"
++#line 6844 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func (); below.  */
+@@ -6731,7 +6864,7 @@ main ()
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-f = $ac_func;
++f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+ #endif
+ 
+   ;
+@@ -6739,16 +6872,16 @@ f = $ac_func;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6742: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6875: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6745: \$? = $ac_status" >&5
++  echo "$as_me:6878: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:6748: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6881: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6751: \$? = $ac_status" >&5
++  echo "$as_me:6884: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   eval "$as_ac_var=yes"
+ else
+@@ -6758,7 +6891,7 @@ eval "$as_ac_var=no"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:6761: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "$as_me:6894: 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
+@@ -6769,7 +6902,7 @@ fi
+ done
+ 
+ else
+-	echo "$as_me:6772: checking if link/symlink functions work" >&5
++	echo "$as_me:6905: 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
+@@ -6782,7 +6915,7 @@ else
+ 			eval 'ac_cv_func_'$cf_func'=error'
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+-#line 6785 "configure"
++#line 6918 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/types.h>
+@@ -6812,15 +6945,15 @@ int main()
+ 
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
++if { (eval echo "$as_me:6948: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+-  echo "$as_me:6818: \$? = $ac_status" >&5
++  echo "$as_me:6951: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:6820: \"$ac_try\"") >&5
++  { (eval echo "$as_me:6953: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:6823: \$? = $ac_status" >&5
++  echo "$as_me:6956: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+ 
+ 			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
+@@ -6838,13 +6971,15 @@ fi
+ 		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
+ 
+ fi
+-echo "$as_me:6841: result: $cf_cv_link_funcs" >&5
++echo "$as_me:6974: result: $cf_cv_link_funcs" >&5
+ echo "${ECHO_T}$cf_cv_link_funcs" >&6
+-	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
++	test "$ac_cv_func_link"    = yes &&
++cat >>confdefs.h <<\EOF
+ #define HAVE_LINK 1
+ EOF
+ 
+-	test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
++	test "$ac_cv_func_symlink" = yes &&
++cat >>confdefs.h <<\EOF
+ #define HAVE_SYMLINK 1
+ EOF
+ 
+@@ -6855,8 +6990,8 @@ 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 "$ac_cv_func_symlink" = yes ; then
+-    echo "$as_me:6859: checking if tic should use symbolic links" >&5
++if test "x$ac_cv_func_symlink" = xyes ; then
++    echo "$as_me:6994: 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.
+@@ -6866,34 +7001,36 @@ if test "${enable_symlinks+set}" = set; then
+ else
+   with_symlinks=no
+ fi;
+-    echo "$as_me:6869: result: $with_symlinks" >&5
++    echo "$as_me:7004: 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:6876: checking if tic should use hard links" >&5
++    echo "$as_me:7011: checking if tic should use hard links" >&5
+ echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
+-    if test "$ac_cv_func_link" = yes ; then
++    if test "x$ac_cv_func_link" = xyes ; then
+ 	with_links=yes
+     else
+ 	with_links=no
+     fi
+-    echo "$as_me:6883: result: $with_links" >&5
++    echo "$as_me:7018: result: $with_links" >&5
+ echo "${ECHO_T}$with_links" >&6
+ fi
+ 
+-test "$with_links" = yes && cat >>confdefs.h <<\EOF
++test "x$with_links" = xyes &&
++cat >>confdefs.h <<\EOF
+ #define USE_LINKS 1
+ EOF
+ 
+-test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
++test "x$with_symlinks" = xyes &&
++cat >>confdefs.h <<\EOF
+ #define USE_SYMLINKS 1
+ EOF
+ 
+ ###   use option --enable-broken-linker to force on use of broken-linker support
+-echo "$as_me:6896: checking if you want broken-linker support code" >&5
++echo "$as_me:7033: 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.
+@@ -6903,12 +7040,13 @@ if test "${enable_broken_linker+set}" = set; then
+ else
+   with_broken_linker=${BROKEN_LINKER:-no}
+ fi;
+-echo "$as_me:6906: result: $with_broken_linker" >&5
++echo "$as_me:7043: result: $with_broken_linker" >&5
+ echo "${ECHO_T}$with_broken_linker" >&6
+ 
+ BROKEN_LINKER=0
+-if test "$with_broken_linker" = yes ; then
+-	cat >>confdefs.h <<\EOF
++if test "x$with_broken_linker" = xyes ; then
++
++cat >>confdefs.h <<\EOF
+ #define BROKEN_LINKER 1
+ EOF
+ 
+@@ -6916,21 +7054,22 @@ EOF
+ elif test "$DFT_LWR_MODEL" = shared ; then
+ 	case $cf_cv_system_name in #(vi
+ 	cygwin*)
+-		cat >>confdefs.h <<\EOF
++
++cat >>confdefs.h <<\EOF
+ #define BROKEN_LINKER 1
+ EOF
+ 
+ 		BROKEN_LINKER=1
+ 		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
+ 
+-echo "${as_me:-configure}:6926: testing cygwin linker is broken anyway ..." 1>&5
++echo "${as_me:-configure}:7065: testing cygwin linker is broken anyway ..." 1>&5
+ 
+ 		;;
+ 	esac
+ fi
+ 
+ ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
+-echo "$as_me:6933: checking if tputs should process BSD-style prefix padding" >&5
++echo "$as_me:7072: 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.
+@@ -6940,9 +7079,10 @@ if test "${enable_bsdpad+set}" = set; then
+ else
+   with_bsdpad=no
+ fi;
+-echo "$as_me:6943: result: $with_bsdpad" >&5
++echo "$as_me:7082: result: $with_bsdpad" >&5
+ echo "${ECHO_T}$with_bsdpad" >&6
+-test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
++test "x$with_bsdpad" = xyes &&
++cat >>confdefs.h <<\EOF
+ #define BSD_TPUTS 1
+ EOF
+ 
+@@ -6962,7 +7102,7 @@ cf_POSIX_C_SOURCE=199506L
+ cf_xopen_source=
+ 
+ case $host_os in #(vi
+-aix[456]*) #(vi
++aix[4-7]*) #(vi
+ 	cf_xopen_source="-D_ALL_SOURCE"
+ 	;;
+ cygwin) #(vi
+@@ -6973,6 +7113,7 @@ darwin[0-8].*) #(vi
+ 	;;
+ darwin*) #(vi
+ 	cf_xopen_source="-D_DARWIN_C_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ freebsd*|dragonfly*) #(vi
+ 	# 5.x headers associate
+@@ -6990,17 +7131,18 @@ hpux*) #(vi
+ 	;;
+ irix[56].*) #(vi
+ 	cf_xopen_source="-D_SGI_SOURCE"
++	cf_XOPEN_SOURCE=
+ 	;;
+ linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+ 
+-echo "$as_me:6996: checking if we must define _GNU_SOURCE" >&5
++echo "$as_me:7138: 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 7003 "configure"
++#line 7145 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ int
+@@ -7015,16 +7157,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7018: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7021: \$? = $ac_status" >&5
++  echo "$as_me:7163: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7024: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7166: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7027: \$? = $ac_status" >&5
++  echo "$as_me:7169: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_gnu_source=no
+ else
+@@ -7033,7 +7175,7 @@ cat conftest.$ac_ext >&5
+ cf_save="$CPPFLAGS"
+ 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ 	 cat >conftest.$ac_ext <<_ACEOF
+-#line 7036 "configure"
++#line 7178 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ int
+@@ -7048,16 +7190,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7051: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7193: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7054: \$? = $ac_status" >&5
++  echo "$as_me:7196: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7057: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7199: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+-  echo "$as_me:7060: \$? = $ac_status" >&5
++  echo "$as_me:7202: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   cf_cv_gnu_source=no
+ else
+@@ -7065,23 +7207,267 @@ else
+ cat conftest.$ac_ext >&5
+ cf_cv_gnu_source=yes
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
+-	CPPFLAGS="$cf_save"
++rm -f conftest.$ac_objext conftest.$ac_ext
++	CPPFLAGS="$cf_save"
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:7217: result: $cf_cv_gnu_source" >&5
++echo "${ECHO_T}$cf_cv_gnu_source" >&6
++test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
++
++	;;
++mirbsd*) #(vi
++	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
++	cf_XOPEN_SOURCE=
++
++cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
++
++cf_save_CFLAGS="$CFLAGS"
++cf_save_CPPFLAGS="$CPPFLAGS"
++
++cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
++	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
++
++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:7239: 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}:7245: testing if the symbol is already defined go no further ..." 1>&5
++
++	cat >conftest.$ac_ext <<_ACEOF
++#line 7248 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:7263: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:7266: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:7269: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:7272: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  cf_cv_posix_c_source=no
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_want_posix_source=no
++	 case .$cf_POSIX_C_SOURCE in #(vi
++	 .[12]??*) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		;;
++	 .2) #(vi
++		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
++		cf_want_posix_source=yes
++		;;
++	 .*)
++		cf_want_posix_source=yes
++		;;
++	 esac
++	 if test "$cf_want_posix_source" = yes ; then
++		cat >conftest.$ac_ext <<_ACEOF
++#line 7293 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifdef _POSIX_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:7308: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:7311: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:7314: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:7317: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 fi
++
++echo "${as_me:-configure}:7328: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
++
++	 CFLAGS="$cf_trim_CFLAGS"
++	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
++
++echo "${as_me:-configure}:7333: testing if the second compile does not leave our definition intact error ..." 1>&5
++
++	 cat >conftest.$ac_ext <<_ACEOF
++#line 7336 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++int
++main ()
++{
++
++#ifndef _POSIX_C_SOURCE
++make an error
++#endif
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:7351: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  echo "$as_me:7354: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++         { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:7357: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:7360: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  :
++else
++  echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cf_cv_posix_c_source=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++	 CFLAGS="$cf_save_CFLAGS"
++	 CPPFLAGS="$cf_save_CPPFLAGS"
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:7376: 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
++	CFLAGS="$cf_trim_CFLAGS"
++	CPPFLAGS="$cf_trim_CPPFLAGS"
++
++cf_fix_cppflags=no
++cf_new_cflags=
++cf_new_cppflags=
++cf_new_extra_cppflags=
++
++for cf_add_cflags in $cf_cv_posix_c_source
++do
++case $cf_fix_cppflags in
++no)
++	case $cf_add_cflags in #(vi
++	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
++		case $cf_add_cflags in
++		-D*)
++			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
++
++			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++				&& test -z "${cf_tst_cflags}" \
++				&& cf_fix_cppflags=yes
++
++			if test $cf_fix_cppflags = yes ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			elif test "${cf_tst_cflags}" = "\"'" ; then
++				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++				continue
++			fi
++			;;
++		esac
++		case "$CPPFLAGS" in
++		*$cf_add_cflags) #(vi
++			;;
++		*) #(vi
++			case $cf_add_cflags in #(vi
++			-D*)
++				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
++
++CPPFLAGS=`echo "$CPPFLAGS" | \
++	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
++		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
++
++				;;
++			esac
++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
++			;;
++		esac
++		;;
++	*)
++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
++		;;
++	esac
++	;;
++yes)
++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
++
++	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
++
++	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
++		&& test -z "${cf_tst_cflags}" \
++		&& cf_fix_cppflags=no
++	;;
++esac
++done
++
++if test -n "$cf_new_cflags" ; then
++
++	CFLAGS="$CFLAGS $cf_new_cflags"
++fi
++
++if test -n "$cf_new_cppflags" ; then
+ 
++	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
++fi
++
++if test -n "$cf_new_extra_cppflags" ; then
++
++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-echo "$as_me:7075: result: $cf_cv_gnu_source" >&5
+-echo "${ECHO_T}$cf_cv_gnu_source" >&6
+-test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ 
+-	;;
+-mirbsd*) #(vi
+-	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+ 	;;
+ netbsd*) #(vi
+-	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
++	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]*) #(vi
++	# 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
+ 	;;
+ openbsd*) #(vi
+ 	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+@@ -7095,23 +7481,25 @@ nto-qnx*) #(vi
+ sco*) #(vi
+ 	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ 	;;
+-solaris2.1[0-9]) #(vi
+-	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+-	;;
+-solaris2.[1-9]) #(vi
++solaris2.*) #(vi
+ 	cf_xopen_source="-D__EXTENSIONS__"
+ 	;;
+ *)
+-	echo "$as_me:7105: checking if we should define _XOPEN_SOURCE" >&5
++
++echo "$as_me:7489: 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 7112 "configure"
++#line 7496 "configure"
+ #include "confdefs.h"
++
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
++
+ int
+ main ()
+ {
+@@ -7124,16 +7512,16 @@ make an error
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:7515: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+-  echo "$as_me:7130: \$? = $ac_status" >&5
++  echo "$as_me:7518: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+-  { (eval echo "$as_me:7133: \"$ac_try\"") >&5
++  { (eval echo "$as_me:7521: \"$ac_try\"") >&5
+   (e