From eb6b3842abd84db5e9a7695d59fb6db5c5321f4f Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 27 Feb 1998 04:54:42 +0000 Subject: [PATCH] Initial revision --- COPYING | 339 + FAQ | 934 ++ INSTALL | 523 + INSTALL.FAST | 70 + Make.common.in | 101 + Makefile.in | 126 + NEWS | 516 + README | 191 + README.NT | 126 + README.OS2 | 108 + VERSION | 1 + VERSION.in | 1 + acconfig.h | 237 + aclocal.m4 | 1182 +++ config.h.in | 508 + configure | 8487 ++++++++++++++++ configure.in | 1440 +++ create_vcs | 20 + doc/DEVEL | 123 + doc/FILES | 130 + doc/LSM | 57 + doc/Makefile.in | 81 + doc/linuxdoc-sgml.diff | 814 ++ doc/mc.1.in | 3038 ++++++ doc/mc.sgml | 2647 +++++ doc/mcedit.1.in | 331 + doc/mcserv.8.in | 68 + edit/Makefile.in | 84 + edit/README.edit | 1 + edit/edit.c | 2197 ++++ edit/edit.h | 577 ++ edit/edit_key_translator.c | 294 + edit/editcmd.c | 2534 +++++ edit/editcmddef.h | 138 + edit/editdraw.c | 633 ++ edit/editmenu.c | 456 + edit/editoptions.c | 169 + edit/editwidget.c | 999 ++ edit/wordproc.c | 350 + gnome/Makefile.in | 138 + gnome/directory.xpm | 21 + gnome/gconf.h | 17 + gnome/ghelp.c | 12 + gnome/ginfo.c | 31 + gnome/gkey.c | 80 + gnome/glayout.c | 240 + gnome/gmain.c | 256 + gnome/gmain.h | 31 + gnome/gmenu.c | 88 + gnome/gnome.TODO | 9 + gnome/gscreen.c | 765 ++ gnome/gscreen.h | 20 + gnome/gtools.c | 198 + gnome/gwidget.c | 221 + gnome/gwidget.h | 13 + icons/Makefile.in | 61 + icons/a.xpm | 42 + icons/application.xpm | 43 + icons/binary.xpm | 42 + icons/bitmap.xpm | 57 + icons/blackhole.xpm | 40 + icons/bug.xpm | 40 + icons/c.xpm | 42 + icons/calc.xpm | 44 + icons/calendar.xpm | 62 + icons/cc.xpm | 40 + icons/cdrom.xpm | 56 + icons/clipboard.xpm | 44 + icons/compressed.xpm | 40 + icons/core.xpm | 44 + icons/data.xpm | 42 + icons/draw.xpm | 42 + icons/edit.xpm | 55 + icons/editor.xpm | 64 + icons/emacs.xpm | 52 + icons/f.xpm | 40 + icons/fig.xpm | 46 + icons/font.xpm | 40 + icons/framemaker.xpm | 40 + icons/gif.xpm | 49 + icons/h.xpm | 42 + icons/hidden.xpm | 41 + icons/hidden_dir.xpm | 41 + icons/html.xpm | 40 + icons/index.xpm | 44 + icons/info.xpm | 42 + icons/jpeg.xpm | 40 + icons/key_dir.xpm | 40 + icons/lharc.xpm | 40 + icons/link.xpm | 41 + icons/link_bad.xpm | 41 + icons/link_dir.xpm | 41 + icons/lock_dir.xpm | 41 + icons/mail.xpm | 42 + icons/mail_dir.xpm | 42 + icons/makefile.xpm | 42 + icons/man.xpm | 61 + icons/music.xpm | 41 + icons/network_dir.xpm | 41 + icons/news_dir.xpm | 41 + icons/no_entry.xpm | 42 + icons/o.xpm | 42 + icons/open_dir.xpm | 40 + icons/p.xpm | 40 + icons/parent_dir.xpm | 42 + icons/pbm.xpm | 40 + icons/pgm.xpm | 40 + icons/plain.xpm | 40 + icons/plain_dir.xpm | 40 + icons/postscript.xpm | 40 + icons/ppm.xpm | 40 + icons/printer.xpm | 65 + icons/recycle.xpm | 58 + icons/report.xpm | 47 + icons/rubbish.xpm | 57 + icons/s.xpm | 40 + icons/sc.xpm | 39 + icons/scroll.xpm | 61 + icons/so.xpm | 40 + icons/sound.xpm | 42 + icons/spreadsheet.xpm | 41 + icons/stop.xpm | 40 + icons/sys.xpm | 40 + icons/system_dir.xpm | 42 + icons/tag.xpm | 40 + icons/tar.xpm | 41 + icons/taz.xpm | 46 + icons/tex-view.xpm | 57 + icons/tex.xpm | 41 + icons/text.xpm | 39 + icons/tiff.xpm | 48 + icons/trash.xpm | 64 + icons/uu.xpm | 39 + icons/window.xpm | 55 + icons/wizard.xpm | 63 + icons/word.xpm | 45 + icons/xbm.xpm | 41 + icons/xchess.xpm | 38 + icons/xfig.xpm | 59 + icons/xman.xpm | 68 + icons/xmosaic.xpm | 59 + icons/xpaint.xpm | 58 + icons/xpm.xpm | 46 + icons/zip.xpm | 40 + icons/zoo.xpm | 43 + install-sh | 119 + lib/Makefile.in | 54 + lib/README.xterm | 109 + lib/ansi.ti | 20 + lib/linux.ti | 49 + lib/mc.csh | 2 + lib/mc.ext.in | 537 + lib/mc.hint | 50 + lib/mc.lib | 126 + lib/mc.menu | 237 + lib/mc.sh | 8 + lib/mcserv.init | 47 + lib/mcserv.pamd | 6 + lib/ncurses.h | 110 + lib/tdiff | 22 + lib/tkmc.wmconfig | 6 + lib/vt100.ti | 23 + lib/xnc.hlp | 479 + lib/xterm.ad | 82 + lib/xterm.tcap | 38 + lib/xterm.ti | 126 + mc.spec | 206 + mc.spec.in | 206 + mcfn_install.in | 67 + nt/Makefile | 37 + nt/Makefile.NT | 178 + nt/Makefile.VC1 | 35 + nt/Makefile.VC4 | 37 + nt/TODO | 12 + nt/bugs | 14 + nt/chmod.nt.c | 441 + nt/config.h | 142 + nt/cons.handler.nt.c | 117 + nt/dirent.c | 91 + nt/dirent.h | 60 + nt/drive.h | 12 + nt/drive.nt.c | 222 + nt/key.nt.c | 469 + nt/mc.ico | Bin 0 -> 1078 bytes nt/mc.rc | 61 + nt/slint.nt.c | 264 + nt/sys/param.h | 7 + nt/sys/time.h | 16 + nt/util.Win32.c | 181 + nt/util.Win32.h | 42 + nt/util.WinNT.c | 84 + nt/util.debug.c | 185 + nt/util.debug.h | 72 + nt/utilnt.c | 689 ++ os2/Makefile | 42 + os2/chmod.os2.c | 503 + os2/config.h | 141 + os2/cons.handler.os2.c | 116 + os2/cons.saver.h | 29 + os2/coollocal.h | 1 + os2/coolwidget.h | 1 + os2/dirent.h | 68 + os2/dirent.os2.c | 128 + os2/drive.h | 4 + os2/drive.os2.c | 248 + os2/gpm-xterm.h | 3 + os2/grp.h | 1 + os2/inst.cmd | 32 + os2/key.os2.c | 448 + os2/learn.h | 1 + os2/lkeysym.h | 1 + os2/makefile.debug | 1187 +++ os2/makefile.release | 1185 +++ os2/mc.def | 6 + os2/mc.ico | Bin 0 -> 996 bytes os2/os2edit/copyright.h | 1 + os2/os2edit/dirtools.h | 1 + os2/os2edit/makefile.debug | 202 + os2/os2edit/makefile.release | 199 + os2/os2edit/makefile.rf | 5 + os2/pwd.h | 1 + os2/slint.os2.c | 218 + os2/sys/param.h | 2 + os2/sys/time.h | 16 + os2/sys/wait.h | 1 + os2/termios.h | 3 + os2/unistd.h | 1 + os2/util.os2.c | 893 ++ po/Makefile.in.in | 240 + po/POTFILES.in | 12 + slang/Makefile.in | 78 + slang/README | 12 + slang/_slang.h | 325 + slang/jdmacros.h | 76 + slang/sl-feat.h | 2 + slang/slang.h | 1284 +++ slang/sldisply.c | 2093 ++++ slang/slerr.c | 59 + slang/slgetkey.c | 125 + slang/slmemcpy.c | 51 + slang/slmemset.c | 43 + slang/slsignal.c | 139 + slang/slsmg.c | 1185 +++ slang/sltermin.c | 913 ++ slang/sltoken.c | 355 + slang/slutty.c | 533 + slang/slvideo.c | 1594 +++ slang/slw32tty.c | 220 + src/ChangeLog | 162 + src/Makefile.in | 152 + src/OChangeLog | 12744 ++++++++++++++++++++++++ src/TODO | 213 + src/achown.c | 709 ++ src/achown.h | 4 + src/background.c | 543 + src/background.h | 60 + src/boxes.c | 809 ++ src/boxes.h | 16 + src/chmod.c | 452 + src/chmod.h | 14 + src/chown.c | 354 + src/chown.h | 7 + src/cmd.c | 1520 +++ src/cmd.h | 65 + src/color.c | 295 + src/color.h | 81 + src/command.c | 274 + src/command.h | 18 + src/complete.c | 1063 ++ src/complete.h | 16 + src/cons.handler.c | 423 + src/cons.saver.c | 391 + src/cons.saver.h | 30 + src/depend.awk | 163 + src/dialog.c | 106 + src/dialog.h | 42 + src/dir.c | 659 ++ src/dir.h | 88 + src/dirhist.c | 131 + src/dirhist.h | 13 + src/dlg.c | 961 ++ src/dlg.h | 305 + src/ext.c | 637 ++ src/ext.h | 18 + src/features.inc | 104 + src/file.c | 2619 +++++ src/file.h | 47 + src/find.c | 867 ++ src/find.h | 27 + src/fixhlp.c | 247 + src/fs.h | 46 + src/fsusage.c | 192 + src/fsusage.h | 33 + src/gindex.pl | 26 + src/global.h | 33 + src/help.c | 806 ++ src/help.h | 32 + src/hotlist.c | 1451 +++ src/hotlist.h | 14 + src/info.c | 275 + src/info.h | 11 + src/key.c | 974 ++ src/key.h | 79 + src/layout.c | 1086 ++ src/layout.h | 42 + src/learn.c | 323 + src/learn.h | 6 + src/listmode.c | 329 + src/listmode.h | 6 + src/mad.c | 250 + src/mad.h | 45 + src/main.c | 2987 ++++++ src/main.h | 188 + src/man2hlp.c | 533 + src/mc.hlp | 3189 ++++++ src/mem.h | 28 + src/menu.c | 462 + src/menu.h | 65 + src/mfmt.c | 153 + src/mountlist.c | 557 ++ src/mountlist.h | 32 + src/mouse.c | 270 + src/mouse.h | 91 + src/myslang.h | 142 + src/ncurses.patch | 19 + src/option.c | 222 + src/option.h | 4 + src/panel.h | 221 + src/panelize.c | 432 + src/panelize.h | 10 + src/popt.c | 677 ++ src/popt.h | 66 + src/profile.c | 563 ++ src/profile.h | 49 + src/regex.c | 5416 ++++++++++ src/regex.h | 491 + src/rxvt.c | 127 + src/screen.c | 2341 +++++ src/setup.c | 593 ++ src/setup.h | 30 + src/slint.c | 524 + src/subshell.c | 1210 +++ src/subshell.h | 43 + src/terms.c | 43 + src/text.c | 236 + src/textconf.h | 3 + src/tree.c | 1584 +++ src/tree.h | 74 + src/tty.h | 141 + src/user.c | 729 ++ src/user.h | 23 + src/util.c | 1305 +++ src/util.h | 220 + src/utilunix.c | 905 ++ src/view.c | 2733 +++++ src/view.h | 144 + src/widget.c | 2435 +++++ src/widget.h | 213 + src/win.c | 280 + src/win.h | 27 + src/wtools.c | 704 ++ src/wtools.h | 88 + src/x.h | 25 + src/xcurses.c | 58 + src/xmkdir | 32 + src/xslint.c | 97 + tk/Makefile.in | 155 + tk/gd.tcl | 752 ++ tk/gui.dbits.tcl | 11 + tk/gui.display.tcl | 16 + tk/gui.findfile.tcl | 17 + tk/gui.hotlist.tcl | 22 + tk/gui.hotlist_new_entry.tcl | 15 + tk/gui.hotlist_new_group.tcl | 13 + tk/gui.layout.tcl | 17 + tk/gui.listbox.tcl | 8 + tk/gui.mfind.tcl | 19 + tk/gui.movelist.tcl | 14 + tk/gui.option.tcl | 36 + tk/gui.panelize.tcl | 13 + tk/gui.quick_confirm.tcl | 13 + tk/gui.quick_file_mask_copy.tcl | 18 + tk/gui.quick_file_mask_move.tcl | 16 + tk/gui.quick_input.tcl | 12 + tk/gui.quick_input_2.tcl | 28 + tk/gui.quick_vfs.tcl | 27 + tk/gui.sort.tcl | 13 + tk/gui.vfshot.tcl | 14 + tk/mc.tcl | 1383 +++ tk/tkconf.h | 12 + tk/tkinfo.c | 117 + tk/tkinfo.h | 7 + tk/tkkey.c | 121 + tk/tkmain.c | 472 + tk/tkmain.h | 69 + tk/tkmenu.c | 112 + tk/tkscreen.c | 556 ++ tk/tkscreen.h | 14 + tk/tkview.c | 24 + tk/tkwidget.c | 453 + tk/tkwidget.h | 14 + vfs/ChangeLog | 2529 +---- vfs/Makefile.in | 138 + vfs/container.c | 103 + vfs/container.h | 32 + vfs/extfs.c | 1375 +++ vfs/extfs.h | 76 + vfs/extfs/README | 214 + vfs/extfs/a | 82 + vfs/extfs/arfs | 45 + vfs/extfs/cpio.in | 32 + vfs/extfs/deb.in | 137 + vfs/extfs/extfs.ini | 16 + vfs/extfs/ftplist.in | 87 + vfs/extfs/lha.in | 136 + vfs/extfs/lslR.in | 41 + vfs/extfs/mailfs | 113 + vfs/extfs/patchfs | 72 + vfs/extfs/rar.in | 48 + vfs/extfs/rpm | 163 + vfs/extfs/zip.in | 78 + vfs/extfs/zoo.in | 51 + vfs/ftpfs.c | 2801 ++++++ vfs/ftpfs.h | 74 + vfs/local.c | 289 + vfs/mcfs.c | 1154 +++ vfs/mcfs.h | 51 + vfs/mcserv.c | 1307 +++ vfs/names.c | 129 + vfs/names.h | 4 + vfs/tar.c | 1577 +++ vfs/tar.h | 235 + vfs/tcputil.c | 291 + vfs/tcputil.h | 29 + vfs/undelfs.c | 808 ++ vfs/undelfs.h | 0 vfs/utilvfs.c | 436 + vfs/vfs.c | 1824 ++++ vfs/vfs.h | 292 + xv/Directory.xpm | 24 + xv/Makefile.in | 156 + xv/Regular.xpm | 24 + xv/help.icons | 260 + xv/mc.icon | 1077 ++ xv/mc_icon.xpm | 138 + xv/panel_icon.xpm | 77 + xv/paneltext.c | 141 + xv/paneltext.h | 51 + xv/paneltext_impl.h | 35 + xv/pictures.h | 409 + xv/support/xview_private/draw_impl.h | 103 + xv/support/xview_private/i18n_impl.h | 260 + xv/support/xview_private/item_impl.h | 329 + xv/support/xview_private/panel_impl.h | 297 + xv/support/xview_private/portable.h | 75 + xv/support/xview_private/scrn_vis.h | 37 + xv/xvaction.c | 114 + xv/xvconf.h | 8 + xv/xverror.c | 77 + xv/xvhelp.c | 602 ++ xv/xvicon.c | 487 + xv/xvicon.h | 32 + xv/xvinfo.c | 364 + xv/xvkeydata.h | 41 + xv/xvmain.c | 1102 ++ xv/xvmain.h | 46 + xv/xvmenu.c | 157 + xv/xvscreen.c | 1235 +++ xv/xvscreen.h | 21 + xv/xvview.c | 238 + xv/xvwidget.c | 556 ++ 471 files changed, 152980 insertions(+), 2501 deletions(-) create mode 100644 COPYING create mode 100644 FAQ create mode 100644 INSTALL create mode 100644 INSTALL.FAST create mode 100644 Make.common.in create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100755 README.NT create mode 100755 README.OS2 create mode 100644 VERSION create mode 100644 VERSION.in create mode 100644 acconfig.h create mode 100644 aclocal.m4 create mode 100644 config.h.in create mode 100755 configure create mode 100644 configure.in create mode 100755 create_vcs create mode 100644 doc/DEVEL create mode 100644 doc/FILES create mode 100644 doc/LSM create mode 100644 doc/Makefile.in create mode 100644 doc/linuxdoc-sgml.diff create mode 100644 doc/mc.1.in create mode 100644 doc/mc.sgml create mode 100644 doc/mcedit.1.in create mode 100644 doc/mcserv.8.in create mode 100644 edit/Makefile.in create mode 100644 edit/README.edit create mode 100644 edit/edit.c create mode 100644 edit/edit.h create mode 100644 edit/edit_key_translator.c create mode 100644 edit/editcmd.c create mode 100644 edit/editcmddef.h create mode 100644 edit/editdraw.c create mode 100644 edit/editmenu.c create mode 100644 edit/editoptions.c create mode 100644 edit/editwidget.c create mode 100644 edit/wordproc.c create mode 100644 gnome/Makefile.in create mode 100644 gnome/directory.xpm create mode 100644 gnome/gconf.h create mode 100644 gnome/ghelp.c create mode 100644 gnome/ginfo.c create mode 100644 gnome/gkey.c create mode 100644 gnome/glayout.c create mode 100644 gnome/gmain.c create mode 100644 gnome/gmain.h create mode 100644 gnome/gmenu.c create mode 100644 gnome/gnome.TODO create mode 100644 gnome/gscreen.c create mode 100644 gnome/gscreen.h create mode 100644 gnome/gtools.c create mode 100644 gnome/gwidget.c create mode 100644 gnome/gwidget.h create mode 100644 icons/Makefile.in create mode 100644 icons/a.xpm create mode 100644 icons/application.xpm create mode 100644 icons/binary.xpm create mode 100644 icons/bitmap.xpm create mode 100644 icons/blackhole.xpm create mode 100644 icons/bug.xpm create mode 100644 icons/c.xpm create mode 100644 icons/calc.xpm create mode 100644 icons/calendar.xpm create mode 100644 icons/cc.xpm create mode 100644 icons/cdrom.xpm create mode 100644 icons/clipboard.xpm create mode 100644 icons/compressed.xpm create mode 100644 icons/core.xpm create mode 100644 icons/data.xpm create mode 100644 icons/draw.xpm create mode 100644 icons/edit.xpm create mode 100644 icons/editor.xpm create mode 100644 icons/emacs.xpm create mode 100644 icons/f.xpm create mode 100644 icons/fig.xpm create mode 100644 icons/font.xpm create mode 100644 icons/framemaker.xpm create mode 100644 icons/gif.xpm create mode 100644 icons/h.xpm create mode 100644 icons/hidden.xpm create mode 100644 icons/hidden_dir.xpm create mode 100644 icons/html.xpm create mode 100644 icons/index.xpm create mode 100644 icons/info.xpm create mode 100644 icons/jpeg.xpm create mode 100644 icons/key_dir.xpm create mode 100644 icons/lharc.xpm create mode 100644 icons/link.xpm create mode 100644 icons/link_bad.xpm create mode 100644 icons/link_dir.xpm create mode 100644 icons/lock_dir.xpm create mode 100644 icons/mail.xpm create mode 100644 icons/mail_dir.xpm create mode 100644 icons/makefile.xpm create mode 100644 icons/man.xpm create mode 100644 icons/music.xpm create mode 100644 icons/network_dir.xpm create mode 100644 icons/news_dir.xpm create mode 100644 icons/no_entry.xpm create mode 100644 icons/o.xpm create mode 100644 icons/open_dir.xpm create mode 100644 icons/p.xpm create mode 100644 icons/parent_dir.xpm create mode 100644 icons/pbm.xpm create mode 100644 icons/pgm.xpm create mode 100644 icons/plain.xpm create mode 100644 icons/plain_dir.xpm create mode 100644 icons/postscript.xpm create mode 100644 icons/ppm.xpm create mode 100644 icons/printer.xpm create mode 100644 icons/recycle.xpm create mode 100644 icons/report.xpm create mode 100644 icons/rubbish.xpm create mode 100644 icons/s.xpm create mode 100644 icons/sc.xpm create mode 100644 icons/scroll.xpm create mode 100644 icons/so.xpm create mode 100644 icons/sound.xpm create mode 100644 icons/spreadsheet.xpm create mode 100644 icons/stop.xpm create mode 100644 icons/sys.xpm create mode 100644 icons/system_dir.xpm create mode 100644 icons/tag.xpm create mode 100644 icons/tar.xpm create mode 100644 icons/taz.xpm create mode 100644 icons/tex-view.xpm create mode 100644 icons/tex.xpm create mode 100644 icons/text.xpm create mode 100644 icons/tiff.xpm create mode 100644 icons/trash.xpm create mode 100644 icons/uu.xpm create mode 100644 icons/window.xpm create mode 100644 icons/wizard.xpm create mode 100644 icons/word.xpm create mode 100644 icons/xbm.xpm create mode 100644 icons/xchess.xpm create mode 100644 icons/xfig.xpm create mode 100644 icons/xman.xpm create mode 100644 icons/xmosaic.xpm create mode 100644 icons/xpaint.xpm create mode 100644 icons/xpm.xpm create mode 100644 icons/zip.xpm create mode 100644 icons/zoo.xpm create mode 100755 install-sh create mode 100644 lib/Makefile.in create mode 100644 lib/README.xterm create mode 100644 lib/ansi.ti create mode 100644 lib/linux.ti create mode 100755 lib/mc.csh create mode 100644 lib/mc.ext.in create mode 100644 lib/mc.hint create mode 100644 lib/mc.lib create mode 100644 lib/mc.menu create mode 100644 lib/mc.sh create mode 100644 lib/mcserv.init create mode 100644 lib/mcserv.pamd create mode 100644 lib/ncurses.h create mode 100755 lib/tdiff create mode 100644 lib/tkmc.wmconfig create mode 100644 lib/vt100.ti create mode 100644 lib/xnc.hlp create mode 100644 lib/xterm.ad create mode 100644 lib/xterm.tcap create mode 100644 lib/xterm.ti create mode 100644 mc.spec create mode 100644 mc.spec.in create mode 100644 mcfn_install.in create mode 100644 nt/Makefile create mode 100644 nt/Makefile.NT create mode 100644 nt/Makefile.VC1 create mode 100644 nt/Makefile.VC4 create mode 100644 nt/TODO create mode 100644 nt/bugs create mode 100644 nt/chmod.nt.c create mode 100644 nt/config.h create mode 100644 nt/cons.handler.nt.c create mode 100644 nt/dirent.c create mode 100644 nt/dirent.h create mode 100644 nt/drive.h create mode 100644 nt/drive.nt.c create mode 100644 nt/key.nt.c create mode 100644 nt/mc.ico create mode 100644 nt/mc.rc create mode 100644 nt/slint.nt.c create mode 100644 nt/sys/param.h create mode 100644 nt/sys/time.h create mode 100644 nt/util.Win32.c create mode 100644 nt/util.Win32.h create mode 100644 nt/util.WinNT.c create mode 100644 nt/util.debug.c create mode 100644 nt/util.debug.h create mode 100644 nt/utilnt.c create mode 100644 os2/Makefile create mode 100644 os2/chmod.os2.c create mode 100644 os2/config.h create mode 100644 os2/cons.handler.os2.c create mode 100644 os2/cons.saver.h create mode 100644 os2/coollocal.h create mode 100644 os2/coolwidget.h create mode 100644 os2/dirent.h create mode 100644 os2/dirent.os2.c create mode 100644 os2/drive.h create mode 100644 os2/drive.os2.c create mode 100644 os2/gpm-xterm.h create mode 100644 os2/grp.h create mode 100755 os2/inst.cmd create mode 100644 os2/key.os2.c create mode 100644 os2/learn.h create mode 100644 os2/lkeysym.h create mode 100644 os2/makefile.debug create mode 100644 os2/makefile.release create mode 100644 os2/mc.def create mode 100644 os2/mc.ico create mode 100644 os2/os2edit/copyright.h create mode 100644 os2/os2edit/dirtools.h create mode 100644 os2/os2edit/makefile.debug create mode 100644 os2/os2edit/makefile.release create mode 100644 os2/os2edit/makefile.rf create mode 100644 os2/pwd.h create mode 100644 os2/slint.os2.c create mode 100644 os2/sys/param.h create mode 100644 os2/sys/time.h create mode 100644 os2/sys/wait.h create mode 100644 os2/termios.h create mode 100644 os2/unistd.h create mode 100644 os2/util.os2.c create mode 100644 po/Makefile.in.in create mode 100644 po/POTFILES.in create mode 100644 slang/Makefile.in create mode 100644 slang/README create mode 100644 slang/_slang.h create mode 100644 slang/jdmacros.h create mode 100644 slang/sl-feat.h create mode 100644 slang/slang.h create mode 100644 slang/sldisply.c create mode 100644 slang/slerr.c create mode 100644 slang/slgetkey.c create mode 100644 slang/slmemcpy.c create mode 100644 slang/slmemset.c create mode 100644 slang/slsignal.c create mode 100644 slang/slsmg.c create mode 100644 slang/sltermin.c create mode 100644 slang/sltoken.c create mode 100644 slang/slutty.c create mode 100644 slang/slvideo.c create mode 100644 slang/slw32tty.c create mode 100644 src/ChangeLog create mode 100644 src/Makefile.in create mode 100644 src/OChangeLog create mode 100644 src/TODO create mode 100644 src/achown.c create mode 100644 src/achown.h create mode 100644 src/background.c create mode 100644 src/background.h create mode 100644 src/boxes.c create mode 100644 src/boxes.h create mode 100644 src/chmod.c create mode 100644 src/chmod.h create mode 100644 src/chown.c create mode 100644 src/chown.h create mode 100644 src/cmd.c create mode 100644 src/cmd.h create mode 100644 src/color.c create mode 100644 src/color.h create mode 100644 src/command.c create mode 100644 src/command.h create mode 100644 src/complete.c create mode 100644 src/complete.h create mode 100644 src/cons.handler.c create mode 100644 src/cons.saver.c create mode 100644 src/cons.saver.h create mode 100644 src/depend.awk create mode 100644 src/dialog.c create mode 100644 src/dialog.h create mode 100644 src/dir.c create mode 100644 src/dir.h create mode 100644 src/dirhist.c create mode 100644 src/dirhist.h create mode 100644 src/dlg.c create mode 100644 src/dlg.h create mode 100644 src/ext.c create mode 100644 src/ext.h create mode 100644 src/features.inc create mode 100644 src/file.c create mode 100644 src/file.h create mode 100644 src/find.c create mode 100644 src/find.h create mode 100644 src/fixhlp.c create mode 100644 src/fs.h create mode 100644 src/fsusage.c create mode 100644 src/fsusage.h create mode 100755 src/gindex.pl create mode 100644 src/global.h create mode 100644 src/help.c create mode 100644 src/help.h create mode 100644 src/hotlist.c create mode 100644 src/hotlist.h create mode 100644 src/info.c create mode 100644 src/info.h create mode 100644 src/key.c create mode 100644 src/key.h create mode 100644 src/layout.c create mode 100644 src/layout.h create mode 100644 src/learn.c create mode 100644 src/learn.h create mode 100644 src/listmode.c create mode 100644 src/listmode.h create mode 100644 src/mad.c create mode 100644 src/mad.h create mode 100644 src/main.c create mode 100644 src/main.h create mode 100644 src/man2hlp.c create mode 100644 src/mc.hlp create mode 100644 src/mem.h create mode 100644 src/menu.c create mode 100644 src/menu.h create mode 100644 src/mfmt.c create mode 100644 src/mountlist.c create mode 100644 src/mountlist.h create mode 100644 src/mouse.c create mode 100644 src/mouse.h create mode 100644 src/myslang.h create mode 100644 src/ncurses.patch create mode 100644 src/option.c create mode 100644 src/option.h create mode 100644 src/panel.h create mode 100644 src/panelize.c create mode 100644 src/panelize.h create mode 100644 src/popt.c create mode 100644 src/popt.h create mode 100644 src/profile.c create mode 100644 src/profile.h create mode 100644 src/regex.c create mode 100644 src/regex.h create mode 100644 src/rxvt.c create mode 100644 src/screen.c create mode 100644 src/setup.c create mode 100644 src/setup.h create mode 100644 src/slint.c create mode 100644 src/subshell.c create mode 100644 src/subshell.h create mode 100644 src/terms.c create mode 100644 src/text.c create mode 100644 src/textconf.h create mode 100644 src/tree.c create mode 100644 src/tree.h create mode 100644 src/tty.h create mode 100644 src/user.c create mode 100644 src/user.h create mode 100644 src/util.c create mode 100644 src/util.h create mode 100644 src/utilunix.c create mode 100644 src/view.c create mode 100644 src/view.h create mode 100644 src/widget.c create mode 100644 src/widget.h create mode 100644 src/win.c create mode 100644 src/win.h create mode 100644 src/wtools.c create mode 100644 src/wtools.h create mode 100644 src/x.h create mode 100644 src/xcurses.c create mode 100755 src/xmkdir create mode 100644 src/xslint.c create mode 100644 tk/Makefile.in create mode 100644 tk/gd.tcl create mode 100644 tk/gui.dbits.tcl create mode 100644 tk/gui.display.tcl create mode 100644 tk/gui.findfile.tcl create mode 100644 tk/gui.hotlist.tcl create mode 100644 tk/gui.hotlist_new_entry.tcl create mode 100644 tk/gui.hotlist_new_group.tcl create mode 100644 tk/gui.layout.tcl create mode 100644 tk/gui.listbox.tcl create mode 100644 tk/gui.mfind.tcl create mode 100644 tk/gui.movelist.tcl create mode 100644 tk/gui.option.tcl create mode 100644 tk/gui.panelize.tcl create mode 100644 tk/gui.quick_confirm.tcl create mode 100644 tk/gui.quick_file_mask_copy.tcl create mode 100644 tk/gui.quick_file_mask_move.tcl create mode 100644 tk/gui.quick_input.tcl create mode 100644 tk/gui.quick_input_2.tcl create mode 100644 tk/gui.quick_vfs.tcl create mode 100644 tk/gui.sort.tcl create mode 100644 tk/gui.vfshot.tcl create mode 100644 tk/mc.tcl create mode 100644 tk/tkconf.h create mode 100644 tk/tkinfo.c create mode 100644 tk/tkinfo.h create mode 100644 tk/tkkey.c create mode 100644 tk/tkmain.c create mode 100644 tk/tkmain.h create mode 100644 tk/tkmenu.c create mode 100644 tk/tkscreen.c create mode 100644 tk/tkscreen.h create mode 100644 tk/tkview.c create mode 100644 tk/tkwidget.c create mode 100644 tk/tkwidget.h create mode 100644 vfs/Makefile.in create mode 100644 vfs/container.c create mode 100644 vfs/container.h create mode 100644 vfs/extfs.c create mode 100644 vfs/extfs.h create mode 100644 vfs/extfs/README create mode 100755 vfs/extfs/a create mode 100644 vfs/extfs/arfs create mode 100644 vfs/extfs/cpio.in create mode 100644 vfs/extfs/deb.in create mode 100644 vfs/extfs/extfs.ini create mode 100644 vfs/extfs/ftplist.in create mode 100644 vfs/extfs/lha.in create mode 100644 vfs/extfs/lslR.in create mode 100644 vfs/extfs/mailfs create mode 100644 vfs/extfs/patchfs create mode 100644 vfs/extfs/rar.in create mode 100644 vfs/extfs/rpm create mode 100644 vfs/extfs/zip.in create mode 100644 vfs/extfs/zoo.in create mode 100644 vfs/ftpfs.c create mode 100644 vfs/ftpfs.h create mode 100644 vfs/local.c create mode 100644 vfs/mcfs.c create mode 100644 vfs/mcfs.h create mode 100644 vfs/mcserv.c create mode 100644 vfs/names.c create mode 100644 vfs/names.h create mode 100644 vfs/tar.c create mode 100644 vfs/tar.h create mode 100644 vfs/tcputil.c create mode 100644 vfs/tcputil.h create mode 100644 vfs/undelfs.c create mode 100644 vfs/undelfs.h create mode 100644 vfs/utilvfs.c create mode 100644 vfs/vfs.c create mode 100644 vfs/vfs.h create mode 100644 xv/Directory.xpm create mode 100644 xv/Makefile.in create mode 100644 xv/Regular.xpm create mode 100644 xv/help.icons create mode 100644 xv/mc.icon create mode 100644 xv/mc_icon.xpm create mode 100644 xv/panel_icon.xpm create mode 100644 xv/paneltext.c create mode 100644 xv/paneltext.h create mode 100644 xv/paneltext_impl.h create mode 100644 xv/pictures.h create mode 100644 xv/support/xview_private/draw_impl.h create mode 100644 xv/support/xview_private/i18n_impl.h create mode 100644 xv/support/xview_private/item_impl.h create mode 100644 xv/support/xview_private/panel_impl.h create mode 100644 xv/support/xview_private/portable.h create mode 100644 xv/support/xview_private/scrn_vis.h create mode 100644 xv/xvaction.c create mode 100644 xv/xvconf.h create mode 100644 xv/xverror.c create mode 100644 xv/xvhelp.c create mode 100644 xv/xvicon.c create mode 100644 xv/xvicon.h create mode 100644 xv/xvinfo.c create mode 100644 xv/xvkeydata.h create mode 100644 xv/xvmain.c create mode 100644 xv/xvmain.h create mode 100644 xv/xvmenu.c create mode 100644 xv/xvscreen.c create mode 100644 xv/xvscreen.h create mode 100644 xv/xvview.c create mode 100644 xv/xvwidget.c diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..e77696ae8 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program 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 + (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. + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/FAQ b/FAQ new file mode 100644 index 000000000..b1d8ddf24 --- /dev/null +++ b/FAQ @@ -0,0 +1,934 @@ + + Midnight Commander + Questions and Answers + + The newest version of this document is available at + http://mc.blackdown.org/mc/answers0.html + + * 1 Getting started + + 1.1 What is Midnight Commander? + + 1.2 [UPDATED] Does it run on my machine? + + 1.3 Does it work with my terminal? + + 1.4 What else do I need to run MC? + + 1.5 Is Midnight Commander PD? Copyrighted? + + 1.6 Where can I get Midnight Commander? + + 1.7 I don't have FTP access. Where can I get MC? + * 2 Keyboard + + 2.1 What does documentation mean with the C-?, M-? and F? + keys? + + 2.2 [UPDATED] Why don't function keys (or some other key) + work? + + 2.3 How do I use function keys F11 to F20? + + 2.4 Why does the ESC key behave funny? + + 2.5 How can I add the plus sign (+) on the command line? + * 3 Mouse + + 3.1 How do I enable mouse support? + + 3.2 How do I cut and paste text with mouse? + * 4 Display + + 4.1 Why do I keep getting "Terminal not powerful enough for + SLang"? + + 4.2 [UPDATED] Why don't line drawing characters work? + + 4.3 Can one use latin-1 characters without losing the lines? + + 4.4 I have problems with entering/viewing national + characters! + + 4.5 How can I get colors? + + 4.6 My color_xterm goes completely (or partially) black! + + 4.7 Where can I get color_xterm? + + 4.8 I got colors working with MC but the other programs don't + work at all anymore! + + 4.9 Why are there both terminfo and termcap? Wouldn't one + database be enough? + * 5 Graphical user interface + + 5.1 Xview and Tk editions? + * 6 Command line problems + + 6.1 How do I stay in the last directory when I exit Midnight + Commander? + + 6.2 How can I access command line history? + + 6.3 How can I complete commands, file names, variable names + and so on? + + 6.4 [NEW] I am using ksh. Can I use functions defined in the + .kshrc within MC? + + 6.5 [NEW] Is there any way to include additional options or + hot keys to MC? + * 7 Virtual file systems + + 7.1 How can I see the contents of a tar archive? + + 7.2 How do I get out of a tar archive? + + 7.3 How do I do anonymous ftp with MC? + + 7.4 How do I do non-anonymous ftp with MC? + + 7.5 How do I close an ftp connection? + + 7.6 Why aren't the contents of ftp panel updated? + + 7.7 [NEW] What kind of proxy server works with Midnight + Commander? + * 8 Other common problems + + 8.1 [UPDATED] How do I get the internal editor to work? + + 8.2 Why doesn't "mcedit newfile" work? + + 8.3 [UPDATED] Is there any way to 'bookmark' favourite ftp-fs + links? + + 8.4 When copying the directories lose their original date, + uid and gid! + + 8.5 [UPDATED] Why I keep getting: "There is no disk in the + drive. Please insert a disk into drive D:"? + + 8.6 [NEW] When I start Midnight Commander, nothing happens! + + 8.7 [NEW] When I try to view a file MC hangs! + * 9 Development + + 9.1 Who has written Midnight Commander? + + 9.2 Do I dare to use a development version? + + 9.3 How can I report a bug/request for a feature? + + 9.4 How can I join the development? + * 10 More information + + 10.1 [UPDATED] This document didn't answer my question. Where + else can I look for an answer? + + 10.2 What mailing lists are there for Midnight Commander? + + 10.3 Where should I look on the World Wide Web for MC stuff? + + 10.4 Are the mailing lists archived anywhere? + * 11 Administrivia + + 11.1 Authorship + + 11.2 [UPDATED] File formats + + 11.3 Feedback is invited + + 11.4 Disclaimer and copyright + +1 Getting started + + 1.1 What is Midnight Commander? + + The Midnight Commander is a user-friendly yet powerful file manager + and visual shell, useful to novice and guru alike. It provides a + clear, user-friendly, and somewhat protected interface to a Unix + system while making many frequent file operations more efficient and + preserving the full power of the command prompt. You will wonder how + you could ever live without it. + + For more thorough description take a look at the announcement of + Midnight Commander 4.0. + + 1.2 [UPDATED] Does it run on my machine? + + Yes, Midnight Commander can run on almost any machine, including Unix + clones, Windows 95/NT and OS/2. Midnight Commander does not run on + Macintosh. + + Midnight Commander uses GNU autoconfigure which can automatically + configure Midnight Commander for use on almost any (if not every) Unix + clone. Following configurations have been tested: + * i386-*-linux1.x, 2.x + * alpha-linux-linux2 + * sparc-linux-linux2.x + * sparc65-linux-linux2.1 + * mips-sgi-irix5.x, 6.x + * mips-dec-ultrix4.3 + * rs6000-ibm-aix3.2.5 + * sparc-sun-sunos4.1 + * sparc-sun-solaris2.3, 2.4, 2.5 + * sparc-sun-netbsd1.0 + * hppa-hp-hpux9 + * hppa-hp-hpux7 + * m68k-apple-aux + * unixware + * mc88110-aviion-dgux5.4R2.01 + * i386-*-sco3.2v4.2 + * i386-*-sco3.2v5 + * i386-*-windows-nt-3.51, 4.0 + * i386-*-windows95 + * i386-*-os2 + + See http://mc.blackdown.org/mc/download.html. + + There is also a preliminary Ms-Dos port at + http://mc.blackdown.org/cgi-mc/download/DOS/.html (but no Ms-Dos + binary). + + Windows 95/NT port is compiled with Microsoft Visual C++ but it might + be possible to use cygwin32 or djgpp instead. + + 1.3 Does it work with my terminal? + + Yes, it does. + + Because Midnight Commander is a full screen program it doesn't run on + dummy terminals but anything more advanced will do (like vt100). If + your terminal works with vi, emacs, elm or pine it will work with + Midnight Commander. + + The XView and Tk editions currently under development will require an + X terminal. + + 1.4 What else do I need to run MC? + + You need an Unix compatible operating system or Windows 95/NT or OS/2. + + If you want to use mouse on the Linux console you need General Purpose + Mouse server from iride.unipv.it: /pub/gpm/. You need nothing extra to + use mouse on xterm. + + To compile the XView edition (currently under development) you need + XView library. Xpm library and X11 non-rectangular shape extensions + are recommended. + + To compile the Tk edition (currently under development) you need + Tk-4.0 libraries. Compilation of the Tk version won't be easy. Contact + Miguel for details. + + If you do not want to use the slang library you could try using + ncurses (we recommend only version 4.1 and above). + + You can get it along with other curses libraries, too, but results may + not be pretty or even usable. + + 1.5 Is Midnight Commander PD? Copyrighted? + + Midnight Commander is under GNU Public License which basically means + that you may freely copy, change and distribute it, but that you may + not impose any restrictions on further distribution, and that you must + make the source code available. This is not the same as Public Domain. + For details, the GNU license is included in the Midnight Commander + source distribution (the COPYING file). + + Midnight Commander is nowadays officially a part of GNU project. All + the authors of the Midnight Commander have given all their rights on + the program to the Free Software Foundation. + + 1.6 Where can I get Midnight Commander? + + See http://mc.blackdown.org/mc/download.html. There are about seventy + download sites. Note that the newest files might not be present on all + the download sites yet. + + In short: the main site is ftp://ftp.nuclecu.unam.mx/linux/local/ and + the sunsite.unc.edu mirrors have MC in the + /pub/Linux/utils/file/managers/mc directory. + + 1.7 I don't have FTP access. Where can I get MC? + + Most Linux CD-ROMs include Midnight Commander. For example, Slackware, + Yggdrasil, S.U.S.E., Jurix, RedHat, Caldera and Debian. + +2 Keyboard + + 2.1 What does documentation mean with the C-?, M-? and F? keys? + + Midnight Commander documentation uses emacs style names for keyboard + keys. + + C stands for the Ctrl key. For example, C-f means that you should hold + down the Ctrl key and press the f key. + + M stands for the Meta key. Your terminal might call it Alt or Compose + instead of Meta. For example, M-f means that you should hold down the + Meta/Alt/Compose key and press the f key. If your terminal doesn't + have Meta, Alt or Compose or they don't work you can use Esc. For M-f + press the Esc key and then press the f key. + + F? stands for a function key. If your terminal doesn't have function + keys or they don't work you can use Esc. For example, for F3 press the + Esc key and then press the 3 key. + + 2.2 [UPDATED] Why don't function keys (or some other key) work? + + Your terminfo or termcap database has missing or incorrect definations + for function keys. Type "mc -V" to see what terminal database is being + used. If the result is "using the S-Lang library with terminfo + database" you should install one of the enhanced terminfo databases + included in the Midnight Commander source distribution. For example, + if you are using xterm type "tic xterm.ti". + + If the result is "using the S-Lang library with termcap database" you + should fix your /etc/termcap database. + + Best terminfo database is bundled with ncurses 4.2 + + You can select whether Midnight Commander will use terminfo or termcap + database by giving --with-terminfo or --with-termcap option to the + configure. Default is terminfo if found, otherwise termcap. + + If you don't have permissions to edit terminal databases you can use + Learn keys feature of Midnight Commander instead. Press Esc 9 o k and + follow instructions. + + If all else fails you can emulate function keys by first pressing the + ESC key and then one of the number keys. For example, if you want to + produce F9, press ESC, then 9. If you don't have a ESC key on your + keyboard you can try alt-9 or meta-9. + + 2.3 How do I use function keys F11 to F20? + + These can mapped to function keys F1 to F10 with Shift held. eg. + function key F13 can be activated by pressing Shift-F3. You can define + the keys this way in the Options menu. The convention for PC keyboards + is that F11-20 always means Shift with F1-10 + + Note! Windows 95/NT and OS/2 ports use F11 and F12 keys to change the + current disk drive. In this case F11 and F12 mean the real F11 and F12 + keys, not shift-F1 and shift-F2. + + 2.4 Why does the ESC key behave funny? + + Midnight Commander uses the ESC key as a prefix for simulating the + Meta and Alt keys (for terminals which don't have Meta or Alt, see the + three previous questions). For example, pressing ESC-a is the same as + pressing Meta-a. In addition most terminals use ESC for internal + representation of arrow keys, function keys and other enhanced keys. + If you want to use ESC to cancel things you have to press it twice i. + e. ESC-ESC. If you find this cumbersome you can generally use F10 to + cancel. Alternatively turn on the old_esc_mode setting in the + ~/.mc.ini file. The old_esc_mode setting makes ESC work as a prefix + only if another key is pressed within 0.5 seconds. After 0.5 seconds + the ESC key cancels. There is no way to make ESC cancel immediately + (if we want to be able to use arrows keys and function keys). + + X terminals allow more control over keyboard, so these ESC limitations + might not concern the forthcoming XView and Tk editions of the + Midnight Commander. + + 2.5 How can I add the plus sign (+) on the command line? + + Press C-q first, then press the + sign. + + The plus key is the hotkey for the select files command. If you want + to add a literal plus on to the command line you must quote it by + pressing C-q first. + + Another common key which needs the C-q prefix is backslash "\". + +3 Mouse + + 3.1 How do I enable mouse support? + + Invoke mc like this (without quotes): "mc -x". If this doesn't work + upgrade to a terminal which compatible with the Xterm mouse sequences. + + Alternatively, on Linux console you can use GPM. + + 3.2 How do I cut and paste text with mouse? + + Hold down shift key while using mouse to cut'n'paste. + +4 Display + + 4.1 Why do I keep getting "Terminal not powerful enough for SLang"? + + This means that your terminfo databases do not contain the correct + definitions for your terminal. + + You could try using a different terminal setting. If you use csh or + tcsh: + + setenv TERM vt100 + + or if you use sh, bash, ksh or zsh: + + export TERM=vt100 + + If this doesn't help you can recompile MC to use termcap instead of + terminfo: + + ./configure --with-termcap + make + + 4.2 [UPDATED] Why don't line drawing characters work? + + Since version 4.0.13 there's the commandline option -a to force use of + +, |, - for line drawing (only available when compiled with SLang). + Use this -a option if any of the suggestions below doesn't help. + + In general, there are three subcases: + * Lines are shown as ASCII characters like this + + +---------+ + | | + +---------+ + This also happens when you use the -a option. Other than that possible + reason is 1, 2 or 3 (see below). + * Lines are shown as lower case characters like this + + lqqqqqqqqqk + x x + mqqqqqqqqqj + Possible reason is 2 or 3 (see below). + * Lines are shown as blanks or missing characters. Possible reason + is 3 or 4 (see below). + + The reason for the problem is one of following: + 1. Your curses library might not support line drawing characters. + Slang, Ncurses and System V curses do support them, BSD curses + doesn't. MC uses Slang by default so this is not usually a + problem. + 2. Your terminal might not support line drawing characters. Vt100 + compatible terminals, rxvt, xterm and color_xterm do support them. + 3. Your terminfo or termcap database might have missing or incorrect + definations for line drawing characters. Set the acsc variable in + the terminfo database like this: + acsc=a\376k\277l\332m\300j\331n\305w\302v\301u\264t\303q\304x\263h + \2600\333 + Don't forget issue 'tic' command. This supposes you are using pc + character set. The octal values might be different for other + character sets. If you are using termcap instead of terminfo, you + should modify above solution appropriately. + 4. Your terminal font might not support line drawing characters. Try + changing the font. + + Here is Miguel's answer to Torben on this subject. + + Torben: + + When I load consolefonts/iso01.f16, I get perfectly right national + characters, but the line drawing characters in mc get wrong. Is it + a mc problem, or is it a problem with the font? (I guess it is). + + Is there a trick? + + Miguel: + + First of all, we should determine whether the font has line drawing + characters or not. + + If it has line drawing characters, then a new terminfo entry should + be written for this specific case. Let's call this linux-iso01. The + acsc variable should be modified to reflect which characters are + used to do the line drawing. + + If it does not have line drawing characters, then we should get rid + of the switch to acsc sequences and make the acsc sequence be just + a mapping to the ugly +, -, |, - characters. + + You can get your terminfo definition by running the infocmp + program, making the proper changes and running the tic program to + compile your new terminfo database. + + 4.3 Can one use latin-1 characters without losing the lines? + + Yes, you need a correct font and a correct termcap/terminfo database. + + For font, if you use xterm try "xterm -fn fixed". + + For termcap/terminfo database, change the acsc capability in the + database. + + 4.4 I have problems with entering/viewing national characters! + + Upgrade to version 4.0.12 or newer. + + From the Options - Display Bits dialog select Full 8 bits or ISO + 8859-1. In addition, select 8 bit input from the same dialog. + + 4.5 How can I get colors? + + Invoke mc like this (without quotes): "mc -c". + + If you get colors, be happy. + + If your terminal stays black and white, your terminal doesn't support + color. You might want to upgrade to a terminal which compatible with + the ANSI color sequences. + + If your terminal goes compelety black, see the next question. + + More detailed answer: + + First, check that your terminal supports color. Color_xterm, rxvt and + Linux console do support, most other terminals don't. You can test + color support with following simple C program: + + #include + + int main (void){ + printf ("\033[32m Hello world! \033[m\n"); + return 0; + } + + Compile and run it. If you see "Hello world!" text in green your + terminal supports color, otherwise not (however, for color_xterm see + also the next question). + + Second, check that you are using Ncurses or the Slang library (type + "mc -V" to find out), in addition some System V curses implementations + do support color, most don't. + + With Slang library you can force color support by setting the + environment variable COLORTERM to any value. + + Third, if you use ncurses library, check that your terminfo database + supports color. If not you should install one of the enhanced terminfo + databases included in the Midnight Commander source distribution. + + Fourth, you might want to set the TERM environment variable so that + you use the correct terminfo database or termcap entry. + + If you use color_xterm (or rxvt) the correct value might be + xterm-color, xtermc or simply xterm. + + If you use Linux console the correct value for TERM is linux or + console. + + 4.6 My color_xterm goes completely (or partially) black! + + Some color_xterm terminals define all colors as black instead of the + standard ANSI colors. This makes them go completely black when you try + to use Midnight Commander with colors. + + You will have to override the defaults. Create a file "color.defaults" + which has the following contents: + + color_xterm*color0: Black + color_xterm*color1: Red + color_xterm*color2: Green + color_xterm*color3: Yellow + color_xterm*color4: Blue + color_xterm*color5: Magenta + color_xterm*color6: Cyan + color_xterm*color7: White + color_xterm*background: White + color_xterm*foreground: Black + + (replace color_xterm with the name of your color_xterm, color_xterm + mentions its name in its title bar) + + Now type: + + xrdb -merge color.defaults + + Alternatively you can add the suggested contents of the color.defaults + file to your .Xdefaults or .Xresources file (or what ever the name of + your X configuration file is). Or you can replace your non-ANSI + color_xterm with an ANSI color_xterm. + + 4.7 Where can I get color_xterm? + + Try ftp.x.org: /contrib/utilities/colour_xterm.tar.gz. + + Alternatively, rxvt is a better choice, see + http://mc.blackdown.org/cgi-mc/download/rxvt/.html + + 4.8 I got colors working with MC but the other programs don't work at all + anymore! + + Midnight Commander uses terminfo database (if available) but many + other programs use termcap database. If you set the TERM environment + variable to a value which has no corresponding entry in termcap + database those programs stop working. You should add the new value of + TERM to the termcap database. + + Example: If you have set TERM to xterm-color locate from /etc/termcap + the line which starts: + + xterm|vs100|xterm terminal emulator + + Change it to start: + + xterm|xterm-color|vs100|xterm terminal emulator + + 4.9 Why are there both terminfo and termcap? Wouldn't one database be enough? + + You might want to read the Unix-haters handbook at + http://www.digital.de/people/jmh/Unix_Haters/unix-haters.html. It + lists many more reasons why Unix sucks. + + You can configure which terminal database you want to use with the + "--with-termcap" and "--with-terminfo" flags of configure. If you + don't specify them, the configure script will try to use terminfo if + available otherwise it will use termcap. + +5 Graphical user interface + + 5.1 Xview and Tk editions? + + Get the newest development version, give the "--with-xview" or + "--with-tk" option to the configure and otherwise compile as usual. + See Download. + + Xview and Tk editions are work in progress, they are not as robust as + the text mode edition. + +6 Command line problems + + 6.1 How do I stay in the last directory when I exit Midnight Commander? + + See the description of the -P option in the Options section of the + manual. + + 6.2 How can I access command line history? + + You can browse previous commands with M-p and M-n. Alternatively, you + can summon the command history listbox by pressing F9 c h. + + 6.3 How can I complete commands, file names, variable names and so on? + + Just press M-Tab. Press M-Tab again to get a listbox if there are + multiple possible completions. + + 6.4 [NEW] I am using ksh. Can I use functions defined in the .kshrc within + MC? + + Sorry, MC only supports bash, tcsh and zsh functions. Ksh functions + are not supported because ksh lacks the necessary hooks needed for + subshell integration. + + Switch to bash or zsh. They are both quite compatible with ksh. Your + ksh functions should work as such or after minimal changes. + + 6.5 [NEW] Is there any way to include additional options or hot keys to MC? + + Yes, F2 invokes an user menu which fully configurable. You can add any + shell commands to the user menu. See + http://mc.blackdown.org/mc/manual-d.html#8 for more info. + + Another way to add functionality is the external panelize feature. See + http://mc.blackdown.org/mc/manual-d.html#4 for more info. + + And finally, you can code any feature you want yourself. MC source + code is free which means you can change it anyway you want. There are + some limitations to make sure MC stays free. See GNU General Public + License for details. + +7 Virtual file systems + + Note! Virtual file systems are supported by Unix ports only. The + Windows 95/NT and OS/2 ports do NOT support virtual file systems. This + means you haven't got ftp, zip or tar support on Windows 95/NT and + OS/2. + + 7.1 How can I see the contents of a tar archive? + + If you use keyboard just move the selection bar on the tar file and + press enter. + + If you use mouse just doubleclick on the tar file. + + If these procedures don't work, your .mc.ext file is faulty. Replace + it with one from the MC source distribution. + + You can also enter a tar archive by typing "cd tar:filename.tar.gz" + where filename.tar.gz is the name of the archive. + + The recognized suffixes for tar archives are .tar, .tar.gz and .tgz. + If your tar archive uses different suffix you have to rename it. + + 7.2 How do I get out of a tar archive? + + Just press enter on the toplevel ".." file or chdir to a non-tar + directory. Just typing "cd" with no parameters is enough (it will take + you to your home directory). + + 7.3 How do I do anonymous ftp with MC? + + Just type "cd ftp://hostname" where hostname is the name of the host + you want to connect. Alternatively, select FTP link from the Left or + Right menu and type the name of the host you want to connect. + + 7.4 How do I do non-anonymous ftp with MC? + + Non-anonymous ftp works just like the anonymous ftp but you give the + login name with the host name. For example, type "cd + ftp://username@hostname". + + 7.5 How do I close an ftp connection? + + Just chdir to a non-ftp directory. Just typing "cd" with no parameters + is enough (it will take you to your home directory). + + Internally Midnight Commander closes ftp connection only after a + timeout. This isn't visible to the end user. + + 7.6 Why aren't the contents of ftp panel updated? + + Update is skipped because there would be a serious performance + penalty. Constantly updating directory panels through a ftp connection + would take too much time. + + You can use C-r to force an update. + + 7.7 [NEW] What kind of proxy server works with Midnight Commander? + + Midnight Commander only supports ftp-like ftp proxies. Common WWW + proxies (like Squid) are not supported yet because they make ftp + connections look like http connections. + +8 Other common problems + + 8.1 [UPDATED] How do I get the internal editor to work? + + The F4 key defaults to an external editor because thats what most + people are used to. To use the internal editor, select Configuration + from the Options menu and check the 'use internal edit' option. + + Alternatively add the line + use_internal_edit=1 + + under the [Midnight-Commander] section in your .mc.ini file (which is + in your home directory). + + To make the editor work all the time, go to the default/* section in + the file lib/mc/mc.ext file and remove the line + + Edit=%var{EDITOR:vi} %f + + The internal editor will now be invoked for anything not specified + elsewhere in the mc.ext file. + + Make sure that you edit the correct mc.ext file. The Midnight + Commander first checks the existance of $HOME/.mc.ext. If this file is + missing MC will use $prefix/lib/mc/mc.ext instead ($prefix can be + changed with configure before compilation and it defaults to + /usr/local). + + When you run `F9/Command/Extension file edit' for the very first time + Midnight Commander copies the system-wide mc.ext from $prefix/lib/mc + into your home directory because you need write access in order to + change it. + + And please don't forget that "make install" overwrites + $prefix/lib/mc/mc.ext. + + 8.2 Why doesn't "mcedit newfile" work? + + This is a known bug. + + If the newfile doesn't exist, mcedit fails. + + Start mcedit with no parameters, this will create a blank file. Then + save the file with whatever name you like. + + 8.3 [UPDATED] Is there any way to 'bookmark' favourite ftp-fs links? + + Use the directory hotlist. Just press control-backslash. If your + national keyboard layout doesn't have backslash key, just press the + control key with the key which is the backslash key in the English + keyboard layout. + + 8.4 When copying the directories lose their original date, uid and gid! + + This is a known bug. At moment only files preserve their original + settings when copying, not directories. + + Uid and gid is fixed since 4.0.1. "Preserve UIDs/GIDs" in the copy + dialog needs to be checked and you must be root. + + Date problem is supposed to be fixed with 4.0.13. + + 8.5 [UPDATED] Why I keep getting: "There is no disk in the drive. Please + insert a disk into drive D:"? + + This is a known bug of the Windows 95/NT and OS/2 ports. MC looks its + configuration files from the D:\MC directory and if the D: drive is a + removable drive (like a CD ROM drive) and there is no disk in drive + you get this message everytime you try to do anything. + + Since version 4.0.6 you can specify the actual location of the + Midnight Commander configuration files with the MCHOME environment + variable. + + 8.6 [NEW] When I start Midnight Commander, nothing happens! + + First, invoke MC without subshell support: "mc -u". If this helps + check the shell you are using. Subshell support works best with bash + although tcsh and zsh are also supported. You might want to upgrade + your shell to a newer version. If you use something else than bash, + tcsh or zsh, subshell support is disabled automatically. + + If disabling subshell doesn't help, try to reconfigure MC with + "--with-our-slang" and "--with-termcap" options and recompile. If this + helps, there is something wrong with your terminfo database or shared + slang library. For better terminfo databases see chapter 4. For a + better slang library, upgrade to a newer version or keep using the + "--with-our-slang" option. + + 8.7 [NEW] When I try to view a file MC hangs! + + This is known bug. A quick fix is "chmod 666 /dev/tty". For a more + complete fix, see http://mc.blackdown.org/mc/maillist/97-10/98.html. + + This bug will probably be fixed in 4.1.6. + +9 Development + + 9.1 Who has written Midnight Commander? + + Midnight Commander was started by Miguel de Icaza and he is the + maintainer of the package. Other authors have joined the project + later: + * Mauricio Plaza (early releases, retired) + * Janne Kukonlehto (joined Sep 27 1994, retired Mar 8 1995, nowadays + Janne is the webmaster of the Midnight Commander web site) + * Radek Doulik (joined Oct 30 1994) + * Fred Leeflang (joined Nov 2 1994) + * Dugan Porter (joined Dec 1 1994) + * Jakub Jelinek (joined Feb 8 1995) + * Ching Hui (joined Jun 27 1995) + * Andrej Borsenkow (joined Jul 1996) + * Paul Sheer (joined Nov 1 1996) + * Norbert Warmuth + * Alex I. Tkachenko + + Alessandro Rubini has been specially helpful with debugging and + enhancing of the mouse support. John Davis has made his S-Lang library + available to us and answered many questions about it. + + The photographs of the authors are available as: + + http://mc.blackdown.org/mc/about.html + + Many people have contributed bug reports, feature suggestions and + small code bits (alphabetical order): + * Thomasz Cholewo + * Juan Jose Ciarlante + * Alexander Dong (OS/2 port, NT port updates) + * Erwin van Eijk + * Torben Fjerdingstad + * Massimo Fontanelli + * Juan Grigera (NT port) + * Gerd Knorr + * Sergey Ya. Korshunoff + * Jean-Daniel Luiset + * Wim Osterholt + * Antonio Palama (old DOS port) + * Thomas Pundt + * Marcelo Roccasalva + * Ilya Rybkin + * Vadim Sinolits + * Jon Stevens + * Adam Tla/lka + + 9.2 Do I dare to use a development version? + + I am afraid you have to answer to this question yourself. Development + versions seldom cause data loss but they have usually got many bugs. + It's up to you to judge whether new features outweight the bugs. + + 9.3 How can I report a bug/request for a feature? + + You might first want to get the newest development version to see if + the bug is fixed or the feature is added already. + + Send your report/request to mc-devel@roxanne.nuclecu.unam.mx or + mc@roxanne.nuclecu.unam.mx. These mailing lists are the most certain + way to contact the developers. Remember to mention if you are not on + the mailing list to make sure that you will receive a copy of replies. + + Give as much details as possible. A too long message is a lot better + than a too short message. + + For segmentation faults a stack backtrace is appreciated. You can + produce stack backtrace as follows: + * If segmentation fault produced a core file: + 1. Load the core file by typing "gdb mc core" or "dbx mc core". + 2. Type "where". + 3. Cut and paste the results to your message. + * If segmentation fault didn't produce a core file: + 1. Load mc by typing "gdb mc" or "dbx mc". + 2. Start mc by typing "run". + 3. Try to reproduce the segmentation fault by doing whatever you + did last time when the segmentation fault occurred. + 4. Type "where". + 5. Cut and paste the results to your message. + 6. For the future you might want to check out what is the + command in your shell to allow producing of the core files. + Usually it is "limit coredumpsize unlimited" or "ulimit + coredumpsize" or "ulimit -c unlimited". + + 9.4 How can I join the development? + + To join the development just code the feature you want to add and send + your patch for inclusion. Email address is mc-devel@nuclecu.unam.mx. + Before you start coding check the latest development version. It might + be that your feature has already been implemented. + + Note that the authors of the Midnight Commander have given all their + rights on the program to the Free Software Foundation. You will have + to do the same if you contribute non-trivial patches. Otherwise we + have to reject your patches in order to avoid copyright problems. + +10 More information + + 10.1 [UPDATED] This document didn't answer my question. Where else can I look + for an answer? + + Read messages from the Discussion (mailing list archive), search the + web site or read the Manual. + + Upgrade to a newer version of Midnight Commander. Many problems are + fixed in the new versions. + + If you still can't find an answer, post your question to the Midnight + Commander mailing list. Its address is mc@nuclecu.unam.mx. + + 10.2 What mailing lists are there for Midnight Commander? + + Following mailing lists discuss about Midnight Commander: + + mc + General discussion of the Midnight Commander + + mc-digest + The mc list, in digest format + + mc-announce + Major announcements about the Commander + + mc-patch + The latest Commander patches + + mc-devel + Technical development discussion + + mc-chat + Non-MC related chatting by the developers (contact Miguel to + subscribe) + + To subscribe, send e-mail to majordomo@roxanne.nuclecu.unam.mx with + the following line in the body of the message: + + subscribe [optional-address] + + Replace with the name of the list you want to subscribe + and [optional-address] with your email address. + + 10.3 Where should I look on the World Wide Web for MC stuff? + + There is a WWW page for Midnight Commander. The URL is: + + http://mc.blackdown.org/mc/ + + The WWW page features MC screen shots, photographs of the authors, + mailing list archive and a few other things. + + 10.4 Are the mailing lists archived anywhere? + + The mc and mc-devel lists are archived on the World Wide Web page (see + the previous question). Other lists are not currently archived though + Miguel keeps a private archive. Contact him if you want copies of past + messages. + +11 Administrivia + + 11.1 Authorship + + Questions and Answers is written by Janne Kukonlehto. Parts of it + originate from Ian Jackson, Miguel de Icaza, Dugan Porter, Norbert + Warmuth and Paul Sheer. + + 11.2 [UPDATED] File formats + + This document is available in HTML, postscript and PDF formats at + http://mc.blackdown.org/mc/answers0.html. + + This document is available in ASCII format in the Midnight Commander + source package. + + 11.3 Feedback is invited + + Send your comments about this document to janne@mc.blackdown.org + + Send your comments about the Midnight Commander to mc@nuclecu.unam.mx + + 11.4 Disclaimer and copyright + + Note that this document is provided as is. The information in it is + not warranted to be correct; you use it at your own risk. + + You can use Questions and Answers according to GNU Public License (see + the COPYING file in the Midnight Commander source distribution). + Questions and Answers is not public domain. + __________________________________________________________________ + + This document is maintained by Janne Kukonlehto + . + diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..53e089482 --- /dev/null +++ b/INSTALL @@ -0,0 +1,523 @@ +-*-text-*- + +This file contains: + +- Installation instructions and notes for the Midnight Commander +- Where to get more information on the Midnight Commander +- Common problems +- Information on porting the program +- Obtaining the missing pieces of the Midnight Commander + + +Installation instructions for the Midnight Commander +---------------------------------------------------- + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation, and creates +the Makefile. It also creates a file `config.status' that you can run +in the future to recreate the current configuration. + +(Nextstep users, make sure you read the "Compiling under Nextstep" +section) + +To compile this package: + +1. Configure the package for your system. + + Normally, you just `cd' to the directory containing the package's +source code and type `./configure'. If you're using `csh' on an old +version of System V, you might need to type `sh configure' instead to +prevent `csh' from trying to execute `configure' itself (under AIX, +you may need to use ksh instead of sh). + + Running `configure' takes a while. While it is running, it +prints some messages that tell what it is doing. If you don't want to +see any messages, run `configure' with its standard output redirected +to `/dev/null'; for example, `./configure >/dev/null'. + + To compile the package in a different directory from the one +containing the source code, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. If +for some reason `configure' is not in the source code directory that +you are configuring, then it will report that it can't find the source +code. In that case, run `configure' with the option `--srcdir=DIR', +where DIR is the directory that contains the source code. + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. Alternately, you can do so by consistently +giving a value for the `prefix' variable when you run `make', e.g., + make prefix=/usr/gnu + make prefix=/usr/gnu install + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If +you give `configure' the option `--exec-prefix=PATH' or set the `make' +variable `exec_prefix' to PATH, the package will use PATH as the +prefix for installing programs and libraries. Data files and +documentation will still use the regular prefix. Normally, all files +are installed using the same prefix. + + The program detects if you have the gpm library installed. If you +installed the gpm mouse library in a non-standard place, you will need +to use the --with-gpm-mouse flag with the directory base where you +installed the gpm package. + + `configure' also recognizes the following options: + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' + Do not print messages saying which checks are being made. + +`--verbose' + Print the results of the checks. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--with-debug' + Enables the built-in memory allocation debugger and forces + compilation with -Wall. This is an option intended to be used by + the program developers. + +`--without-edit' + Configures the program to be compiled without the built-in file + editor. The built-in editor is compiled in by default. + +`--with-ext2undel=PATH' + On systems that use the Extended 2 file system and have the + libext2fs.a library available, this compiles into the Midnight + Commander the support code for recovering deleted files (the + undel virtual file system). + +`--with-gpm-mouse[=PATH]' + Use this flag if your GPM mouse package cannot be detected by the + configure. Use =PATH if it is installed in a non-standard place. + The configure will append `lib' and `include' to find the libgpm.a + and gpm.h files respectively. + +`--without-gpm-mouse' + Use this flag to disable GPM mouse support (e.g. if you want to + use mouse only on X terminals). + +`--with-hsc' + Compiles support into the ftp virtual file system to support the + HSC firewall. + +`--with-mmap' + Needed when compiling under AIX if you want the fast viewer. + +`--with-sco' + This option is used to compile on SCO: it turns on SCO-specific + code, i.e. disables the terminal resizing mechanism, uses the + BSD-like pseudoterminal handling, adds screen-saving capabilities + on console, etc. + +`--with-subshell[=optional]', `--without-subshell' + The subshell support is by default turned on, you can disable + this by using the --without-subshell option. If you pass the + =optional parameter, then the subshell support is turned off by + default, to turn it on, you have to specify the `-U' flag when + running the program. + +`--with-termnet' + Enables the network support with the Term package. + +`--with-tk' [WARNING: X code is not released] + This option enables including the Tcl/Tk version. + +`--with-tk-includes=DIR' [WARNING: X code is not released] + Lets you specify the place where you have your Tcl/Tk headers installed. + It should be a directory containing tcl.h and tk.h. + +`--with-tk-libraries=DIR' [WARNING: X code is not released] + Lets you specify the place where you have your Tcl/Tk libraries - + libtcl and libtk. + +`--with-xview' [WARNING: X code is not released] + This option enables including the XView version. + +`--with-xview-includes=DIR' [WARNING: X code is not released] + Lets you specify the place where you have your xview headers installed. + It should be the directory, which has subdirectories xview and + hopefuly xview_private. + +`--with-xview-libraries=DIR' [WARNING: X code is not released] + Lets you specify the place where you have your xview libraries - + libolgx and libxview. + +`--with-xv-bindir=DIR' [WARNING: X code is not released] + Lets you specify the place where program mxc will be installed. + Default is somewhere in your XView binaries directory, + $OPENWINHOME/bin. + +`--without-dusum' + This option disables a feature of the Midnight Commander, which is + forking the du command with the -s option when you want to calculate + directory sizes. + +`--without-vfs' + This option disables the Virtual File System switch code in the + Midnight Commander and uses the standard file system calls for + file access. If you specify this option you will not get the + transparent tar File system manipulation as well nor the + networked Midnight Commander file system. + +You may also tell configure which display manager you want to use with +the Midnight Commander. The configure script will use SLang as default, +but you can override this by using any of the following flags (please +note that slang is included as part of the distribution), + +`--with-slang' (default) + This is used to configure the program to use the SLang screen + manager. This is included as part of the Midnight Commander, + you don't need it installed on your system. + Slang is the only library that will let you resize the Midnight + Commander window on an xterm. + + This option will usually try to use the terminfo database if it + is available, otherwise it will use the termcap database. At + compile time, you may force the use the terminal database with + the `--with-termcap' and `--with-terminfo' options. + +`--with-ncurses[=directory]' + Use this flag (either with or without the =directory part), if + you want to compile with ncurses instead of the default SLang. + + Use the =directory part if your ncurses is not installed in any of the + places configure will check (/usr/include, /usr/include/ncurses, + /usr/local/include and /usr/local/include/ncurses). + The argument to this flag is the base directory where the ncurses + files are located. The configure will append lib and include to + find the libncurses.a and ncurses.h file respectively. For + example, if you have installed ncurses under /gnu/lib and + /gnu/include, you specify: --with-ncurses=/gnu + + You will need the ncurses package only if your system does not + provide a compatible curses. If after compiling, the program + says that it can't resolve the has_colors function, then you need + the ncurses package or you may always go back to the included SLang + screen manager. + +`--with-vcurses[=directory]' + Use this flag to force the Midnight Commander to use a SystemV + type ncurses, the optional directory specifies where should + the C compiler find the include files. + +`--with-sunos-curses' + You use this flag on SunOS machines if you want to use SunOS 4.x + curses instead of ncurses. You don't need this flag if you don't + have ncurses installed: it's only needed to force the usage of + SunOS curses over ncurses. + + `configure' also accepts and ignores some other options. + + On systems that require unusual options for compilation or linking +that the package's `configure' script does not know about, you can give +`configure' initial values for variables by setting them in the +environment. In Bourne-compatible shells, you can do that on the +command line like this: + + CC='gcc -traditional' LIBS=-lposix ./configure + +On systems that have the `env' program, you can do it like this: + + env CC='gcc -traditional' LIBS=-lposix ./configure + + Here are the `make' variables that you might want to override with +environment variables when running `configure'. + + For these variables, any value given in the environment overrides the +value that `configure' would choose: + + - Variable: CC + C compiler program. The default is `cc'. + + - Variable: CFLAGS + The default flags used to build the program. + + - Variable: INSTALL + Program to use to install files. The default is `install' if you + have it, `cp' otherwise. + + For these variables, any value given in the environment is added to +the value that `configure' chooses: + + - Variable: LIBS + Libraries to link with, in the form `-lfoo -lbar...'. + + If you need to do unusual things to compile the package, we encourage +you to figure out how `configure' could check whether to do them, and +mail diffs or instructions to the address given in the README so we +can include them in the next release. + +2. Type `make' to compile the package. + +3. If the package comes with self-tests and you want to run them, +type `make check'. If you're not sure whether there are any, try it; +if `make' responds with something like + make: *** No way to make target `check'. Stop. +then the package does not come with self-tests. + +4. Type `make install' to install programs, data files, and +documentation. +If your system is Linux, then install installs the Linux console screen +saver as well. + +5. You can remove the program binaries and object files from the +source directory by typing `make clean'. To also remove the +Makefile(s), the header file containing system-dependent definitions +(if the package uses one), and `config.status' (all the files that +`configure' created), type `make realclean'. If you want to clean the source +tree completely, so that it contains only those files that should be +packaged in the archive, issue `make distclean'. If you've run configure in +a different directory than the source tree, distclean won't remove your *.o +and linked programs in that directory. + +6. The Midnight Commander allows you to be kept on the directory you +were when you quit the program, this is done with a shell function, +the man page has more information about this. If you want to let the +install program make the change to your /etc/profile or your +~/.profile or ~/.bashrc, then type: `make mcfninstall'. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need it if you want to regenerate +`configure' using a newer version of `autoconf'. + +Compiling under NeXTStep +------------------------ + +These instructions were provided by Gregor Hoffleit +, he recommends configuring the +program like this: + + +export CC="cc -posix" +configure --without-subshell --with-termcap +Edie config.h and make sure you have #undef HAVE_GETWD +make + + + +- Where to get more information on the Midnight Commander +--------------------------------------------------------- + +Janne Kukonlehto set up a WWW page, here is the URL: +http://mc.blackdown.org/mc/ + +We also a set of mailing lists for the program: + +mc-announce: Announcements of new version of the Midnight Commander. +mc-digest: Digest version of the mc list. +mc-patches: Patches by mail (also on the ftp site). +mc: Discussion on the Midnight Commander file manager. +mc-devel: For discussion between the developers of the program. + +to subscribe to the mailing lists, send a message to: + +majordomo@roxanne.nuclecu.unam.mx + +with the following text in the body of the message: + +subscribe [address] + +The address is optional and list-name is one of the above list names +(mc, mc-announce, mc-patches or mc-digest). + + +Notes about the Midnight Commander installation +------------------------------------------------ + +The Midnight Commander has been run in the following configurations: + +i386-*-linux +sparc-*-linux +alpha-*-linux +mips-dec-ultrix4.3 +mips-dec-{open,net}bsd1.0 +mips-sgi-irix5.2 +mips-sgi-irix5.3 +rs6000-ibm-aix3.2.5 +sparc-sun-sunos4.1 +sparc-sun-netbsd1.0 +sparc-sun-solaris2.3 +hppa-hp-hpux9 +hppa-hp-hpux7 +m68k-apple-aux +mc88110-aviion-dgux5.4 +i386-*-{bsdi2,freebsd} + +Since the Midnight Commander is configured via the GNU autoconf +program, it's not difficult to run it in other operating systems. + +If you're using AIX, with the cc6000 compiler, you have to specify the +`--with-mmap' command line option. + +You will need GNU C (or an ANSI C Compiler) and optionally a color +curses library (ncurses is a good choice). The Midnight Commander now +comes with the Slang screen manager, a fast screen manager, so ncurses +is not required anymore unless you want to use it. + +Many Linux systems ship with ncurses version 1.9.9e, however, we recommend +ncurses 4.1 or above, since the former version does not support resizing +of the xterm window. + +Since version 0.9 the Midnight Commander comes with mouse support on +xterms and in the Linux console. In order to take advantage of the +mouse support on the Linux console you will need the gpm mouse server +(see the section "Obtaining the Missing Pieces" in this file). + +Once you get the Mouse Server, compile it and install it, then you +will have to specify the `--with-gpm-mouse' flag to the configure +program if you installed it in a non-standard directory. If you +installed the gpm package under /usr or /usr/local, you don't need to +specify this flag; configure will find gpm for you. The support for +mice on xterms is always compiled in. + +We are working on further enhancements to the program, but we're not +sure which ones must go first. If you would like to point us in the +Right Direction we will be glad to hear from you (you could check the +file TODO included with this distribution for the current projects). + +If you happen to find an undocumented feature that doesn't do what you +expected, please drop us a note telling us as much as you can about +the problem you're experiencing (to miguel@roxanne.nuclecu.unam.mx). + + +Porting the program +------------------- + +Random notes on porting to other architectures. + +The Midnight Commander uses now by default the Slang library for +handling the display. If you can't port Slang (which should be a +pretty trivial job), you may want to attempt using ncurses (the +Midnight Commander can use ncurses as well as the display engine). + +If you don't want to install ncurses and your OS is a SystemV Release +4 variant, maybe the curses supplied with your system will do the +work. If you experience display problems, then it means that we are +dealing with a buggy implementation of curses. You have two options: +one, download ncurses and recompile with ncurses or recompile all your +source code with the symbol BUGGY_CURSES defined. But you can always +switch to the default SLang screen manager. + +The fast way to do this is to: + +make clean; make XINC=-DBUGGY_CURSES + + +Obtaining the missing pieces of the Midnight Commander +------------------------------------------------------ + +The Midnight Commander will build without requiring you to get any +other software packages, however, you may be interested in enhancing +the Midnight Commander environment with some of these: + +o Terminal database + + There are many incomplete terminal databases out there, however, a + complete terminfo is bundled with ncurses. (It is simple to generate + the termcap database using the infocmp utility in ncurses). + + Some terminfo data are included with the mc distribution (lib/*.ti). + Particularly linux, xterm and vt100. Use e.g. ''tic linux.ti'' to + use them. + + If you want to run mc on xterm/color_xterm/ansi_xterm (not rxvt), then + you might read lib/README.xterm for further information. + +o In the past the Midnight Commander required the NCurses library to + build, now it's optional. You can get Ncurses from + + ftp.gnu.org:/pub/gnu + ftp.clark.net:/pub/dickey/ncurses + +o The GPM Mouse Server is available at: + + iride.unipv.it:/pub/gpm + +o The X Windows System libraries are only used if you are going to + build the X11 versions of the program. Please note that this code + is not finished, so it's only useful if you want to look at what we + are doing or want to help in one of the two X11 versions. + +o The XView library can be obtained from (currently the newest is + XView3.2p1-X11R6.tar.gz): + + ftp.nuclecu.unam.mx:/Midnight/devel/XView.libs + ftp.x.org:/contrib/libraries + ftp.cvut.cz:/pub/x11/contrib/libraries + + - Linux/ELF shared binaries: + + sunsite.unc.edu:/pub/Linux/libs/X/xview + ftp.cvut.cz:/pub/linux/sunsite/libs/X/xview + +o The Tcl/Tk libraries can be obtained from: + + ftp.smli.com:/pub/tcl + ftp.aud.alcatel.com:/tcl/ftp.smli.com + ftp.cvut.cz:/pub/tcl/ftp.smli.com + + - Linux/ELF shared binaries: + + ftp.ods.com:/pub/linux + ftp.cvut.cz:/pub/linux/ods + +o The Xpm library (used by the XView version) can be obtained from + (currently xpm-3.4f.tar.gz): + + koala.inria.fr:/pub/xpm + ftp.x.org:/contrib/libraries + ftp.cvut.cz:/pub/x11/contrib/libraries + + - Linux/ELF shared binaries: + + ftp.ctd.comsat.com:/pub/linux/ELF + ftp.cvut.cz:/pub/linux/comsat + +To get the mouse support working on the Linux console: + +If you're using Linux version >= 1.1.34, then you will have to choose yes +to selection when you compile your kernel. If your Linux version is +older than this one, you may try to apply one of the patches included in +the gpm package. + +And the GNU C Compiler may be obtained from the following sites: + + ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep, + cair.kaist.ac.kr:/pub/gnu + AUSTRALIA: archie.au:/gnu (archie.oz or archie.oz.au for ACSnet) + AFRICA: ftp.sun.ac.za:/pub/gnu + MIDDLE-EAST: ftp.technion.ac.il:/pub/unsupported/gnu + EUROPE: ftp.cvut.cz:/pub/gnu, irisa.irisa.fr:/pub/gnu, + ftp.univ-lyon1.fr:pub/gnu, ftp.mcc.ac.uk, + unix.hensa.ac.uk:/pub/uunet/systems/gnu, + src.doc.ic.ac.uk:/gnu, ftp.win.tue.nl, ugle.unit.no, + ftp.denet.dk, ftp.informatik.rwth-aachen.de:/pub/gnu, + ftp.informatik.tu-muenchen.de, ftp.eunet.ch, + nic.switch.ch:/mirror/gnu, nic.funet.fi:/pub/gnu, isy.liu.se, + ftp.stacken.kth.se, ftp.luth.se:/pub/unix/gnu, archive.eu.net + CANADA: ftp.cs.ubc.ca:/mirror2/gnu + USA: wuarchive.wustl.edu:/mirrors/gnu, labrea.stanford.edu, + ftp.kpc.com:/pub/mirror/gnu, ftp.cs.widener.edu, uxc.cso.uiuc.edu, + col.hp.com:/mirrors/gnu, ftp.cs.columbia.edu:/archives/gnu/prep, + gatekeeper.dec.com:/pub/GNU, ftp.uu.net:/systems/gnu + + +Unsupported options to configure: +--------------------------------- +`--with-bsd-curses' + If you don't want to use ncurses and are using an Ultrix box, you + can use this switch. Be aware that ncurses is a better option + than the curses included in Ultrix. + diff --git a/INSTALL.FAST b/INSTALL.FAST new file mode 100644 index 000000000..1bb3453e6 --- /dev/null +++ b/INSTALL.FAST @@ -0,0 +1,70 @@ +-*-text-*- + +Read the INSTALL file for the complete instructions. + + The Midnight Commander by default will use the Slang screen +manager, if something fails with the Slang screen manager, you may +compile the program with your system curses (You will need a SysV +compatible curses, in case you don't have such, read the README file +for directions on getting the ncurses package, a freely available +replacement for SysV curses). + +1. Configure the package for your system. + + Normally, you just `cd' to the package main directory and type +`./configure'. + + The most often needed options to configure are following: + +`--prefix=PATH' + By default, `make install' will install the package's files in + `/usr/local/bin', `/usr/local/man', etc. or to `/usr/bin', + `/usr/man', etc. depending on the location of an old mc binary. + If you have none in your system, default will be `/usr/local'. + You can specify an installation prefix other than default by giving + `configure' the option `--prefix=PATH'. + +`--with-slang' (default) + The easy way to get the Commander running: Slang is part of + the distribution. This is the default screen manager, if you run + configure without any --with-*curses parameter. + +`--with-ncurses[=PATH]' + Use the flag without =PATH if you want to compile with ncurses + (default is in version 3.0 the SLang screen manager included + in the distribution). + Use this flag with =PATH part, if you want to compile with ncurses + and your ncurses is not installed in any of the + places configure checks (/usr/include, /usr/include/ncurses, + /usr/local/include and /usr/local/include/ncurses). The + configure script will append `lib' and `include' to find the + libncurses.a and ncurses.h files respectively. + +`--with-gpm-mouse[=PATH]' + Use this flag if your GPM mouse package cannot be detected by the + configure. Use =PATH if it is installed in a non-standard place. + The configure will append `lib' and `include' to find the libgpm.a + and gpm.h files respectively. + +`--with-sco' + If you are compiling on a SCO machine. + + You may also want to specify CFLAGS for the compiler, even if it finds + itself some defaults by typing e.g. + + `CFLAGS=-O2 ./configure' + +2. Type `make' to compile the package. + +3. Type `make install' (as root) to install programs, data files, and +documentation. If you're on a Linux system, this will install the +`cons.saver' utility, which allows the Midnight Commander to save and +restore the screen contents. If you're making a mc binary distribution for +other people and want to tar the whole binary later, you may want to specify +`make install DESTDIR=PATH', which will make PATH the root for installation +(but in the installed stuff will be still stored only --prefix). + +3a. Type `make mcfninstall' to get an interactive program check if you +want to define an useful alias for the Midnight Commander. + +4. Type `mc' and enjoy! diff --git a/Make.common.in b/Make.common.in new file mode 100644 index 000000000..860a93a43 --- /dev/null +++ b/Make.common.in @@ -0,0 +1,101 @@ +VERSION=4.1.27 + +SHELL = /bin/sh + +# This variable makes it possible to move the installation root to another +# directory. This is useful when you're creating a binary distribution of mc. +# If empty, normal root will be used. +# You can run e.g. 'make install DESTDIR=/packages/mc/3.0' to accomplish +# that. +# DESTDIR = /opt/apps/mc/$(VERSION) + +# Installation target directories & other installation stuff +prefix = @prefix@ +exec_prefix = $(prefix) +binprefix = +manprefix = +bindir = $(exec_prefix)/bin +libdir = $(exec_prefix)/lib/mc +suppbindir = $(libdir)/bin +tidir = $(libdir)/term +extfsdir = $(libdir)/extfs +icondir = $(libdir)/icons +mandir = $(prefix)/man/man1 +manext = 1 +man8dir = $(prefix)/man/man8 +man8ext = 8 +xv_bindir = @xv_bindir@ + +# Tools & program stuff +SEDCMD = @SEDCMD@ +SEDCMD2 = @SEDCMD2@ +STRIP = @STRIP@ +@SET_MAKE@ +CC = @CC@ +CPP = @CPP@ +AR = @AR@ +RANLIB = @RANLIB@ +RM = @RM@ +RMF = @RM@ -f +MV = @MV@ +CP = @CP@ +LN_S = @LN_S@ +AWK = @AWK@ +AWK_VAR_OPTION = @AWK_VAR_OPTION@ + +# Flags & libs +# No way, to make make happy (except GNU), we cannot use := to append +# something to these, so that's why there is a leading _ +XCFLAGS = @CFLAGS@ +XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) +XLDFLAGS = @LDFLAGS@ +XDEFS = @DEFS@ +XLIBS = @LIBS@ + +# Where do we have the sources? +# You shouldn't have to edit this :) +mcsrcdir = $(rootdir)/src +docdir = $(rootdir)/doc +datadir = $(rootdir)/lib +slangdir = $(rootdir)/slang +vfsdir = $(rootdir)/vfs +xvdir = $(rootdir)/xv +tkdir = $(rootdir)/tk +gnomedir = $(rootdir)/gnome +icodir = $(rootdir)/icons + +hpath = -I$(mcsrcdir) -I$(slangdir) -I$(vfsdir) -I$(xvdir) -I$(xvdir)/support/xview_private -I$(tkdir) + +# Rules +first_rule: all + +@PHONY@ all check cross TAGS clean install uninstall distcopy depend dep +@PHONY@ fastdep fastdepslang fastdepvfs fastdeploc slowdep + +@PCENTRULE@../slang/%.o : ../slang/%.c +@PCENTRULE@ cd ../slang; $(MAKE) libmcslang.a + +@PCENTRULE@../vfs/%.o : ../vfs/%.c +@PCENTRULE@ cd ../vfs; $(MAKE) libvfs.a + +fastdep: dummy + if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then { cd $(srcdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(srcdir)" *.[ch];} > .depend; fi + -$(MAKE) fastdeploc + @WRITEDEP@ + +fastdepslang: +@PCENTRULE@ { { { cd ../slang; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(slangdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../slang libmcslang.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(slangdir)";};} >> .depend + +fastdepvfs: +@PCENTRULE@ { { { cd ../vfs; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(vfsdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../vfs libvfs.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(vfsdir)";};} >> .depend + +slowdep: dummy + if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then \ + $(CPP) -M $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/*.c > .depend; fi + @WRITEDEP@ + +mcdep: @dep@ + +dummy: + +# End of Make.common diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..f5d7153d5 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,126 @@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +rootdir = $(srcdir) +@MCFGR@@MCF@ + +foreigndirs=nt os2 +unixdirs=vfs lib doc slang edit src tk xv gnome icons +alldirs=$(unixdirs) $(foreigndirs) +subdirs=$(alldirs) + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DISTMAIN = configure configure.in NEWS README INSTALL INSTALL.FAST \ + Makefile.in FAQ COPYING create_vcs install-sh \ + config.h.in aclocal.m4 acconfig.h VERSION mcfn_install.in \ + Make.common.in README.NT mc.spec.in mc.spec README.OS2 \ + VERSION.in + +all: + @for dir in ${unixdirs}; do \ + cd $$dir; \ + ${MAKE} all || exit 1; \ + cd .. ;\ + done + +static: + $(MAKE) _LDFLAGS="-static $(_LDFLAGS)" + +configure: configure.in aclocal.m4 + cd $(srcdir); autoconf --localdir=$(srcdir) $(srcdir)/configure.in > configure + chmod 755 configure + +config.h.in: configure.in acconfig.h + cd $(srcdir); autoheader + +install: installdirs @vcs@ + @for I in $(unixdirs); do cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1; cd ..; done + $(INSTALL_DATA) $(srcdir)/FAQ $(DESTDIR)$(libdir)/FAQ + $(INSTALL_PROGRAM) mcfn_install $(DESTDIR)$(suppbindir)/mcfn_install + chmod +x $(DESTDIR)$(suppbindir)/mcfn_install + @echo "Please verify that the configuration values are correctly" + @echo "set in the mc.ext file in $(libdir)" + +install.create_vcs: + $(INSTALL_PROGRAM) $(srcdir)/create_vcs $(DESTDIR)$(suppbindir)/create_vcs + if test x$(DESTDIR) = x; then $(SHELL) $(srcdir)/create_vcs; fi + +installdirs: + $(mcsrcdir)/xmkdir $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) + $(mcsrcdir)/xmkdir $(DESTDIR)$(mandir) $(DESTDIR)$(man8dir) + $(mcsrcdir)/xmkdir $(DESTDIR)$(icondir) $(DESTDIR)$(suppbindir) + $(mcsrcdir)/xmkdir $(DESTDIR)$(tidir) $(DESTDIR)$(extfsdir) + +mcfninstall: + -/bin/sh ./mcfn_install + +uninstall: + @for I in $(unixdirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done + -$(RMF) $(DESTDIR)$(libdir)/FAQ + -$(RMF) $(DESTDIR)$(suppbindir)/mcfn_install + @echo Midnight Commander uninstalled + +cross TAGS clean depend dep: + @for I in $(unixdirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done + +Makefile: + $(SHELL) config.status + +config.status: + if test -x config.status; then config.status --recheck; \ + else $(SHELL) configure; fi + +realclean: clean + rm -f *~ + rm -f config.cache + +# distclean goal is for making a clean source tree, but if you have run +# configure from a different directory, then doesn't destroy all your +# hardly compiled and linked stuff. That's why there is always $(srcdir)/ +# In that case most of those commands do nothing, except cleaning *~ +# and cleaning source links. +distclean: + rm -f $(srcdir)/*~ $(srcdir)/config.cache $(srcdir)/config.h + rm -f $(srcdir)/config.log $(srcdir)/config.status + rm -f $(srcdir)/mcfn_install + @for I in $(alldirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done + rm -f $(srcdir)/Makefile $(srcdir)/Make.common + rm -f lib/mc.ext mcfn_install vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar + +distdirs: + mkdir ../mc-$(VERSION); \ + mkdir ../mc-$(VERSION)/src; \ + mkdir ../mc-$(VERSION)/lib; \ + mkdir ../mc-$(VERSION)/doc; \ + mkdir ../mc-$(VERSION)/slang; \ + mkdir ../mc-$(VERSION)/vfs; \ + mkdir ../mc-$(VERSION)/vfs/extfs; \ + mkdir ../mc-$(VERSION)/icons; \ + mkdir ../mc-$(VERSION)/xv; \ + mkdir ../mc-$(VERSION)/xv/support; \ + mkdir ../mc-$(VERSION)/xv/support/xview_private; \ + mkdir ../mc-$(VERSION)/tk; \ + mkdir ../mc-$(VERSION)/gnome; \ + mkdir ../mc-$(VERSION)/nt; \ + mkdir ../mc-$(VERSION)/po; \ + mkdir ../mc-$(VERSION)/edit; + +distcopy: + sed "s/@VERSION@/$(VERSION)/" mc.spec.in > mc.spec + sed "s/@VERSION@/$(VERSION)/" VERSION.in > VERSION + cp $(DISTMAIN) ../mc-$(VERSION); + cp po/Makefile.in.in ../mc-$(VERSION)/po; + cp po/POTFILES.in ../mc-$(VERSION)/po; + for I in $(alldirs); do \ + cd $$I ; \ + $(MAKE) distcopy || exit 1; \ + cd ..; done + (cd ..; tar cvf - mc-$(VERSION) | \ + gzip -f9 > mc-$(VERSION).tar.gz); \ + +dist: configure config.h.in distdirs distcopy + + diff --git a/NEWS b/NEWS new file mode 100644 index 000000000..136a8855f --- /dev/null +++ b/NEWS @@ -0,0 +1,516 @@ + +Version 3.5 + +- New hotlist code. + - The bookmark code has been completely revamped and now it supports + folders. New format for the hot list file. + - It is possible to copy a selected path name into the input line + (C-Enter). + +- Tk enhancements. + - New built in GUI designer to help developers modify the look + of the program at run time (no penaly for users). + - Many dialog boxes now work. + - Right button now pops up a context sensitive action menu. + - Added many visual enhancements. + - The Tk edition is not yet finished though. + +- File management. + - Now we do background copy and move operations. + (you can ftp your files in the background now, for example). + +- Built in text editor + - This is an easy to use text editor with pull-down menus. + The features it presently supports are: Block copy, move, + delete, cut, paste; key for key undo; file insertion; macro + definition; regular expression search and replace (and our + own scanf-printf search and replace); shift-arrow MSW-MAC + text highlighting (for the linux console only); + insert-overwrite toggle; and an option to pipe text blocks + through shell commands like indent. + + Comes with Emacs keybindings as well. + + mcedit is a link to mc which bring it up in editor mode. + +- FTP File system + - Many fixes and enhacements, better support for proxy + machines. + - Now we support both active and passive opens. + - Estimated time of arrival for ftp transfers. + - stalled detection. + - Much better support for proxies. + - ftp URL's now allow a password to be provided. + +- ext2fs Undelete File system + - Minor enhancements. + +- TAR File system + - Now we flush the tarfs if the tar file has been modified + +- External File systems: + - Speeded up RPM file system. + - New LHA file system. + - New ARC file system. + - New DEB file system (for those users of Debian). + - New RAR file system. + - Fixed problems with different zipfs. + +- MC file system: + - We get can use a mc file system by using either mc: or mc:// prefixes. + +- Viewer changes: + - Now we include a program that preprocesses mail if you view it + so, you get colored mails in the viewer. + - A simple ruler has been implemented (press Alt-r to enable it). + +- New hex editor + - Now you can do hex editions in your files with a single keystroke. + (invoke it by using the hex-viewer and then clicking on edit). + +- Find file command: + - Now we can search inside files using a piped grep (particularly + interesting to search inside virtual file system: tar files, + tar files on remote ftp sites, or searching information on an + ftp site) + +- Widgets: + - Input lines now support control-left, control-right movement on the + Linux console. + +- Extension file: + - We now support extra entries in a given rule with the Include= + tag. + +- Ports: + - Windows NT, Windows 95 by Juan Grigera + - OS/2 by Alexander Dong. + + +- Many many many bug fixes and memory leaks have been fixed. + + +Version 3.2 + +- External File system: + - Mtools file system works. + - New Cpio file system. + - New RPM file system. + +- FTP file system: + - support for HSC firewall + +- Lots of subshell fixes + +- Regexp-extension: + - Editing of non-local files works now. + +- Bunch of bug fixes. + +- Panelize now works properly. + +- Can work on Nextstep now. + +- Windows NT port by Juan Grigera. + +- Midnight Commander file system server: + - Fixed errno handling in the server. + - Fixed time handling in the server. + - Better caching. + - Works with PAM if supported on the system. + +Version 3.1 + +This has been finished: + +- Enhanced ftpfs: + - Displays progress bars. + - Supports netware and windows nt servers + - Better support for symlinked files. + - Handles those warez sites file names. + - Increase the directory cache timeout. + - Cache flushing (C-r) + - If you append a /~ to the directory, you will log into your home + directory (this is done by default if you use the menus to connect). + - More robust. +- Subshell fixes (it should not hang any longer). + - Fixes prompt handling for zsh and tcsh users. + - Fixes variable expansion for tcsh (now you may edit files). + - Rewrote the sync code between the parend and child, should not hang + any longer. +- Better command completion. +- Keypad handling enhanced: + - Special key treatment for +, -, \ and now may be configure to + only take place if you do not have a command typed in. + - Now the + and \ bindings when ran on the Linux console work + may use the keypad and M-+ and M-\ and leave the + and \ keys + free. +- Better handling of the line drawing chars on OSF/1 and AIX. +- Enhanced tar/compressed tar file systems. +- Global kill ring. +- Added undelete feature for Linux systems: now you may recover deleted files + on ext2 file systems with the Undelete file system. +- Symlink commands (for symlink lovers). + see the docs on C-x C-r, C-x C-l, C-x C-s keystrokes. +- New macros: + %b and %B return the basename of the selected filename + %var{ENV-VAR} expands to the contents of ENV-VAR variable. +- MC may be invoked as a viewer (mc -f flag). +- Added Unicode support on the Linux console (run with mc -N) +- Tons of bug fixes, the code is cleaner and hopefully +- Allow a vfs pathname to be passed as a startup directory. + +This is a list of people that put their effort into making the 3.1 +release: + +Adam Tla/lka, Antonio Palama, Carl Thompson, Ching Hui, Dugan Porter, Gerd +Knorr, Ilya Rybkin, Jakub Jelinek, Janne Kikonlehto, Juan Grigera, Juan Jose +Ciarlante, John Davis, Marcelo Fabian Roccasalva, Perry Francis Nguyen, +Sergey Ya Korshunoff Steven Hirsch, Thanh Ma and Torben Fjerdingstad. + +Version 3.0 + +This has been finished: + +- Virtual File System: You now can browse tar, compressed tar and + file systems over the network as if they were local subdirectories; +- Slang support, you don't need ncurses anymore (but you can still compile + with ncurses, if you want). +- New mc.ext format, for details see the sample mc.ext file provided. +- Append option if you try to copy/move a file onto already existing one. +- Internal cd command uses CDPATH variable if set (like in BASH). +- Find file command is much faster. +- External panelize command - finding files using unlimited number of + criteria - actually spawns an external command and it can be find, awk, + grep -l or anything else. +- Learn keys makes setting up of mc on terminals with broken + terminfo/termcap databases easier. It just asks you to press keys which + are not working. +- Advanced chown command. +- C-PgUp and C-PgDn takes you to the previous and currently selected + directory respectively on the Linux console. +- You can choose between 7 data bits, iso-latin-1 (0-127+160-255) or + other (0-255). +- Confirmation for overwriting, deleting and exiting added. +- Viewer has growing buffers. +- Filename, username, hostname and variable completion (M-Tab) on all + input lines plus command completion on appropriate places of command + line. +- Following of symlinks at changing directory. +- Viewer now supports bold faces and underlines, and it fits the + information on the screen better. Now you can also specify the starting + mode for the viewer depending on the contents of the viewed file. +- Mask rename and copy. +- Colors now let you specify the intensity of the colors you want. + +This is being worked on: +- Virtual File System: FTP file system. +- Tcl/Tk and XView versions of the program (preliminary versions are + up and running). + + +Version 2.0 + +Now users are able to define their own display + +- User defined display formats. + + Now you can configure the file display to suit your needs. + For example, you can say which information you want to see displayed + instead of our defaults. + +- User definable program layout. + + Panels could be shown vertically or horizontally; + panels could be different sizes, you can hide or show most + program windows (command line, keybar or menubar). + +- Output window. + + Now, it's possible to see part of the last program output on the Linux + console without having to switch screens via an option in the layout + menu. + +- New View modes: + + Quick view: as you browse your files, each one is displayed on + the other panel on the idle time. + + Tree view: let's you browse your directories by traveling a tree. + We have two traveling modes available. And the tree does + not take your precious time: it's build on the fly, as you + browse your disk (you can always loose your time if you + want to :-). + + Info view: Gives you information on the currently select file and + the current file system as you move. + + User view: Let's you define a directory listing and the format you + want to use. + +- New subshell support (concurrent shell execution) + + The Midnight Commander will now spawn one copy of the shell, so you + get better performance and you can use shell functions, define variables + and execute complete shell commands. Supported shells: bash, zsh and + tcsh. If your shell is not supported, then the old mode is still + available. + +- Dialog box manager + + Almost all the new configuration options are configured with this + new dialog manager, easy to use if you are familiar with dialog boxes + in DOS and Windows. + + Available widgets: check buttons, buttons, radio buttons, + input lines and list boxes (So you can take our code and use it on + your applications). + +- New option configuration. + + Now the program options are configured with a dialog box. + +- Chmod and Chown commands: + + For changing permissions as well as ownership of files and + directories, uses our new dialog manager. + +- Color customization support + + Now you can change the default color of the program with any of + these: + environment variable, Colors section in the init file (colors per + terminal type) and command line. + +- User menu and extension enhancements: + + Execution understand the %t macro (tagged files). + + User menu also has a new macro to let the user specify options. + + You can hide and show entries in the user menus by using conditions. + + Auto detect best match depending on a regexp. + +- Viewer: + Goto line command, + horizontal scrolling, + on the fly uncompression (and we don't eat unneeded cycles of CPU), + allow non gunzip operation. + +- Internal move command: + + Now, we don't rely anymore on system commands in /bin, so the + program is more robust and is much faster. Bunchs of code come + from the GNU fileutils. + +- The Tree view and normal views allows wrapped incremental searchs of + file names. + +- Mask rename: + + Now it's possible to do things like rename *.pas in *.bak + +- Compare directories command + +- Allow panels to be in Long mode without forcing the user to a single panel. + + (You can even have two long panels). + +- F10, C-g cancels as well as ESC ESC. + +- Improved help system. + + We updated and spelled the help system and added a lots of links. + The Web page is constructed with the same tools. + +- Allows tagging of directories: + + Now you can copy, rename, move and delete complete directories. You + are not limited anymore to files. + +- View output (screen save/restore) on Linux console. + + On old Linux systems, only b&w is supported, on newer Linux systems + (1.1.67 and newer), we also support color screen save/restore and + cursos positions. + +- 8 bit clean support. + +- Visual feedback while i-searching files. + +- Much more intuitive, you have to use it. + +- It's better than aspirin. + +- New memory allocation debugger. + + During testing time, we used a powerfull memory allocation debugger, + so the program will not eat all your memory, and will make a good use of + your memory. + +- Now it also runs on hppa-hp-hpux9, hppa-hp-hpux7, m68k-apple-aux and + sparc-sun-netbsd1.0. The best platform to run it is Linux, of course, + since that's where most of us develop it. + +- Inode sort option. + +- Nice progress status indicator. + + We have two of them: a moving dash indicator and a progress bar + indicator for file operations. + +Version 0.15 + +- Uses GNU autoconf. + Currently, it has been ported to this configurations: + i386-*-linux1.0 + i386-*-linux1.1 + mips-sgi-irix5.2 + mips-dec-ultrix4.3 + rs6000-ibm-aix3.2.5 + sparc-sun-sunos4.1 + sparc-sun-solaris2.3 + +- Improvements to the internal file viewer: + Wrap/Unwrap mode. + Hex mode. + Hex searches. + Now you can view compressed files (gzip, compress, zip, pack and lzh). + Performance enhancements, now it's much faster. + Works on systems without mmap. + +- Mouse Support now also works on xterms. + If you run in the Linux console, you will still need the gpm mouse server + to use the mouse support, but if you use xterms, then you're lucky + and can use the mouse support when using xterms. + +- Help system and man page. + Both were updated and has many more hypertext links inside, the + help system can also be used with a mouse. + +- If running on xterms, now you can see the output of the last program + you ran by using the C-o key combination. + +- Switch panels command (C-u) +- With filter command per panel. +- With auto mounting/umounting on chdir feature. +- cd now expands tildes (~, ~user). +- Much more portable. +- Many bugs were fixed. + +Version 0.14 + +- Now can handle directories with an unlimited number of files. +- New link and symlink commands (C-x l, C-x s). +- New insert tagged files or selection command (C-x t). + +Version 0.13 + +- Behave more like the Norton Commander. +- Added menu file edit. +- If there is no permission to load a directory, now it loads a dummy + directory. +- When a panel is re-sorted, keep the selected file selected. +- forward_word and backward_word command on the input line now skip + over letters and numbers. +- Fixed backward scrolling in the internal viewer. +- The internal viewer now computes the percentage in a more natural + way. +- Added handling of the Home and End keys to the internal viewer +- Bug fixes. + +Version 0.12 + +- Preliminary support for System V compilation. +- Bug fix: didn't call closedir in all cases. +- bug fixes. + +Version 0.11 + +- Support cd -. +- Corrected Makefile. + +Version 0.10 + +- Added new Alt-G, Alt-H, Alt-J to select the top file, middle file + and bottom file in the current panel. +- Now it's allowed to select option in query boxes by the first initial +- Fixed mouse repeat rate. +- Fixed a bug that prevent copying individual files to another file. +- Some minor bug fixes. + +Version 0.9 + +- Mouse Support. +- Internal Copy command (it no longer uses cp). +- Verbose Copying of files. +- Confirmation on Overwrite and on Delete. +- Support reverse sorting. +- Many visual enhancements. +- Per panel options are saved and restored. +- New truncation of names in the panels. +- History in Input Lines (M-p and M-n). +- Input line enhancements. +- Dialog boxes are nicer than before. +- Cache in gid and uid translators. +- More keybindings for the Input lines. +- Better kill management in Input Lines. +- Bug fixes. + +Version 0.8 + +- The online help now comes with the complete man page. +- Input lines now support M-b and M-f for movement by word. +- Unlimited input lines (command line). +- Filename searches now must be started with C-s or M-s. +- Many bug fixes. + +Version 0.7 + +- The stat() reloading optimization is now a configuration option. +- Many bug fixes went to the find file command. +- New history in the hypertext viewer. +- ESC-Tab will copy the name of the other-panel selected file to the + input line. +- Now it's possible to display files and directories mixed together or + separated (like the Norton Commander). +- Many bug fixes, see the ChangeLog for details. + +Version 0.6 + +- Extension dependent execution implemented (now you can execute + things like tar tzvf over compressed tar files, just a tap in the + Enter key). +- Added simple expansion of useful variables in the user menu. +- Avoid unnecessary reloading of subdirectories using stat (suggested + by Torben Fjerdingstad ). +- Added options to disable colors and display version number. +- Allow start up directory specification (ex: mc /usr/local/bin /tmp). +- Fixed bug that operated on the selection instead of the tagged file +(when only one file was tagged). +- Some cosmetic changes. +- Bug fixes. + +Version 0.5 + +- Fixed bug in the help browser that crashed the program. +- New internal viewer. +- New long directory listing format. +- some bug fixes. + +Version 0.4 + +- User Menus (F2 key). +- Quick search of files in a panel (Alt-filename takes you to that file). +- Char quoting (C-q). +- exec() enhancements. +- now you can suspend the program (C-z). +- The find file command now seems to be very stable. +- misc bug fixes. + +Version 0.3 + +- Setup loading/saving. +- Support for any size screen. +- Many, many bug fixes. diff --git a/README b/README new file mode 100644 index 000000000..80af302bd --- /dev/null +++ b/README @@ -0,0 +1,191 @@ +-*-Text-*- + +Contents: +--------- + Intro text + Midnight Commander editions + Where to get more information + The Midnight Commander + Mini-docs + Obtaining the Midnight Commander + Reporting problems. + +This is version 3.5 of the Midnight Commander, a free Norton Commander +Clone with many useful features. The Midnight Commander comes with +mouse support on xterms and optionally on the Linux console. + +The Midnight Commander is a directory browsing tool which bears a +certain remote resemblance to John Socha's Norton Commander for DOS. +It is feature packed: + + o Built in Virtual File System: manipulate remote files + systems through the ftp protocol or Midnight Commander's own + mcfs protocol. Browse tar, compressed tar files, rpm, zip, + cpio, lha and rar files with a single click. + + o All of the Midnight Commander operations work with the virtual + file system, enabling you to do complex tasks. + + o Mouse support on the Linux console and under X11's xterms. + + o Learn Keys: The Midnight Commander may be configured at run + time to support any kind of input keys for a given terminal, + making its operation even on the most wierd terminals a + breeze. + + o Text and hex editors are available for you to use. + + o Hotlist allows you to keep a list of common visited + locations (including ftp sites). + + o Command completion: By pressing Alt-Tab in any place where a + filename or an executable are expected, the Midnight Commander + will complete for you the name. If you quickly press Alt-Tab + twice you can get a listbox with the possible completions + available. + + o Subshell support: Run your commands by a real shell + interpreter. The Midnight Commander interacts with bash, tcsh + and zsh to provide you with all of the facilities available in + your shell. + + o Find file command can now search inside the contents of + files. + + o Background operations allows you to copy or move files from + any virtual file system while you do other tasks (ie, you can + do background ftp copies). + + o Proxy support with our ftpfs. + + o Linux file recovery: If you are using Linux system, you can + recover deleted files from an ext2fs partition with the + undelete file system. This is a low level file recovery + function that will recover files deleted by any program in + Linux. + + Please note that the undelete file system can only recover + 12 file system blocks if the file was deleted with a kernel + in the 2.0.x series. The 2.1.x series have fixes this and you + can recover all of the file contents there. + + o External panelization: You can run any arbitrary external + command and the Midnight Commander will display the output + generated as a file listing that can be manipulated as a + regular directory. + + o Emacs like key bindings in all of our widgets. + + o Powerfull context dependant actions are available. + + o Powerfull built-in file viewer: The file viewer, together + with the context dependant actions is used to format man pages + on the fly, coloring mail messages and more. + + +Midnight Commander editions: +---------------------------- + +The Midnight Commander may be compiled into three different editions: +the text mode edition, the Tk edition and the XView edition. Please +note that currently the only supported edition is the text mode +edition. The Tk and XView editions are included with the tar file but +are not finished and thus not supported. + + +Where to get more information: +------------------------------ + +There is a mailing list for discussion on enhancing the program, future +directions and announcements; if you want to subscribe, send mail to: + +majordomo@roxanne.nuclecu.unam.mx + +There is a WWW page for the Midnight Commander with the URL: +. + + +The Midnight Commander: +----------------------- + +The Midnight Commander is released under the GNU General Public License +version 2.0 or any later version. A copy of the file is included with +this distribution package. + +If you have comments, you can send them to me: + +miguel@roxanne.nuclecu.unam.mx + +or if it would benefit more people, to the mailing list: + +mc@roxanne.nuclecu.unam.mx + +Help develop and enhance free software. + + +Mini-documentation: +------------------- + +o Use the F-Keys for invoking the commands in the function key bar. + If your terminal doesn't support F-keys, you can use the + sequence to invoke the corresponding F-digit key. + +o Tab changes the current panel. + +o All input lines have emacs-like key-bindings (command history is + accessed through the M-p and M-n keys). + +o The panels accept C-n, C-p for browsing the panel (like in emacs). + +o M-Enter copies the currently selected file name to the input line. + +o M-Tab completes the current word (or tries to). + +o The Virtual File System is a cute addition to the project, you may + browse in tar and compressed tar files as well as browsing remote + machines with the mcfs file system. + +o Please read the manual page. + +o Read the file TODO for the current projects. + +You can access the whole documentation online with the F1 key, +although it's not as nice as the groff printed manual page :-) + + +Where you may obtain the Midnight Commander +------------------------------------------- + +The software should be available by anonymous ftp at sunsite.unc.edu +in the directory /pub/Linux/utils/file and at ftp.nuclecu.unam.mx +in the directory /linux/local. + +The last alpha versions are available at ftp.nuclecu.unam.mx in the +directory /linux/local/devel. + +European mirrors of both version 3.1 and alpha versions are available +at sunsite.mff.cuni.cz in the directory /GNU/mc and at ftp.teuto.de +in the directory /lmb/mc. + + +Reporting problems +------------------ + +Please, send a detailed description of your problem to the +mc-bugs@roxanne.nuclecu.unam.mx address. + +Include the version of the program, the operating system that you are +using, the compielr and compiler flags used to compile the program (if +you know them), what kind of distribution you are using (if a +GNU/Linux system). + +If the program crashed and produces a core dump, please provide a +stack trace of the program. + +You can do this by running dbx or gdb like this: + +gdb mc core +(gdb) where + + + diff --git a/README.NT b/README.NT new file mode 100755 index 000000000..8f13dd67f --- /dev/null +++ b/README.NT @@ -0,0 +1,126 @@ + +Midnight Commander for Windows NT and Windows '95 +------------------------------------------------- + +0. Hello +1. Compiling +2. Changes made + +0. Hello +-------- +Hello, this is the Midnight Commander port to Win32. It has many bugs, but is +quite stable now. Maybe you can help as an beta tester or as a programmer. In +either case you would like subscribe to mc-devel list +(see readme files in main doc on how to do this) and contact us. + +1. Compiling +------------ + +1.1. Compiler +---------------- +Microsoft Visual C++ for Windows NT (all versions, including 4.x) are supported. +In nt/makefile you can find an external makefile, and in nt/makefile.vc1.nt, vc4.nt +projects for the visual IDE. Two makefiles are add since the version 3.5.39. They +are produced from MS VC 4.x and are named as ntaxp.mak (for Windows NT AXP) +and ntint.mak (for Windows NT Intel). If you want to use them, you will have to +change the path coded in these two files. + +Other compilers such as Watcom, or Borland tools should be quite +straightforward, but has not been tested. + +Under Cygnus tools, apparently everything works just fine. + +1.2. General issues +-------------------- +Preprocessor + Define: + LIBDIR + _OS_NT - OS flag + OS2_NT - Flag for OS/2 and NT + HAVE_CONFIG_H - config.h flag + + Includes: + So as to avoid chaos in include files, I decided to create some + fake includes for UNIX counterparts. The empty files you need to create are: + pwd.h grp.h + sys/param.h sys/time.h + +1.3 Windowing Library +-------------------------------- +Currently only support for S-lang windowing library is given. I know no curses +public library ported to Win32 consoles, and I think it is useless to port +it now. You may want to download the complete distribution it from +ftp://space.mit.edu/pub/davis. + + +2. Changes made +--------------- + +2.1. Changes to main code +------------------------- +They are enclosed in #ifdef _OS_NT or OS2_NT blocks. + +Wrote something similar to statfs in UTIL.C +Wrote truncate. +Changed (almost) all references to "/" path slash with PATH_CHAR and strPATH_CHAR. +Changed name of CONTROL_FILE. +Changed name of shell and call to shell. + +In some cases we supressed code. This is temporal (so that mc can compile). In +the future we will provide fake or true interfaces for these features. + - Links: creation and information on links are not supported in NT. We + should provide a fake interface for the local filesystem and + a true one for networked. + - GID/UID queries (get_user, owner, preserve UID/GID on copy, ...). + - TERMinals: all the code directly done with terminals must be supressed. + - Signals: deleted. Should support the native ones. + - pipes: had some trouble in ext.c and with error_pipes but soon will be fixed. + - Chown command: Not supported yet. + +2.2. Files rewritten +-------------------- +There are 3 files with so many changes that they have been moved to independent +archives (or OS dependent). + - Chmod.nt.c: this command will query and change attributes (hidden, system, + archive,...). Maybe we should write a real chmod (and also a + chown). It is not finished, but works almost fine. Look that + the stat st_mode member is filled with attributes, not modes. + - Cons.handler.nt.c: Supports same API as linux cons.handler.c. It allocates + a new console buffer and switches between the two when doing a + shell. The new allocated one is the used by Midnight commander. + (look that to make this we should also redirect standard handles) + - Key.nt.c: a static table maps Virtual Key codes to Curses-like Key codes. + Also mouse events are supported. + still preliminar. + - utilnt.c: Contains utilunix.c functions, with Win32 implementation + +2.3. New files +-------------- + - drive.nt.c: A Change Drive command has been implemented. Two lines + in main.c were included (in the left/right panel menus). + The funcs drive_cmd_a/b are implemented in this new file. + It will build a dialog with available drives as buttons. + bug: too many drives are not supported (think just 7). have + to rewrite to support more than one line. + + - util.debug.c: developers-only utilities to trace Win32 API call error codes + - util.WinNT.c: Windows NT specific functions: + getuid(): Will check your priviledges and return 0 (root) + if you have Administrator priviledges. + - util.Win32.c: Windows NT & 95 utilities: (specific to Win32, no UNIX counterpart) + getEXEtype(): check if executable is CUI or GUI. + +2.4. Changes made from me (Alexander Dong, ado@software-ag.de) +-------------------- + +I have hacked some codes for Windows NT AXP and NT Intel. +Drive.nt.c was rewritten for a beautiful Drive_Change dialog window. + +All main source changed from me are marked with the comment /* .ado */. + +I have also included two own Makefiles: + ntaxp.mak (for Windows NT Alpha) and + ntint.mak (for Windows 95/NT Intel). +You will have to change the path in these files before use them. They +are both for Microsoft Visual C++ 4.x. + diff --git a/README.OS2 b/README.OS2 new file mode 100755 index 000000000..2f851e255 --- /dev/null +++ b/README.OS2 @@ -0,0 +1,108 @@ +Midnight Commander for OS/2 -- version 3.5.42 (Development version) +----------------------------------------------------------------------- + May 26, 1997 + + +This file contains special information for Midnight Commander for OS/2. +For more information about Midnight Commander, please read the original FAQ. + +0. Hello +-------- + +This is the port of Midnight Commander to OS/2. I think it's now a +BETA version still with some unknown bugs, use it as your own risk! + + +1. Installation Instructions for binaries +------------ + +The default installation position for the binary files is D:\MC, just copy +all the files there and set the PATH to D:\MC. A small REXX program install.cmd +will help you create a desktop icon. With this version, using -S switch will +produce a batch file for you to change the directory to the last working place +upon exit. The batch file nc.cmd will demonstrate this feature. + + +2. Special notes +----------- + +You can also change the drive with F11 and F12. + +Known bugs: + - CTRL-C to external program not possible + - CTRL-O not work. + + +3. Operating System +----------- + +I am using Warp 4 and IBM VisualAge C++ for this port. I don't think that +it is a problem to run it with OS/2 2.x, but I can not verify it. +Please drop me a mail and tell me how it works with the other OS versions. + + +4. How to compile it +----------- + +VisualAge C++ 3.0 was used for this port. You can recompile the program +with the following steps: + + 0. The source files are located in D:\work\mc\mc-3.5.xx\. You will have to + replace this string with your location in the makefiles. + + Goto \work\mc\mc-3.5.xx: + + 1. Copy all the files from os2\ into src\. + + 2. Install Slang 0.99.38. (ftp://space.mit.edu/pub/davis) + Patch Slang to make it works with Midnight Commander. + (I have disabled the multithreaded key handling because the key + control will be done in MC) + + 3. Copy the os2edit\ files to edit\. + Use Makefile.release to build a released version of libedit.lib or + Makefile.debug for a debug version. + + 4. Goto src\. + If you are going to use the WorkFrame for rebuild the makefile, + you have to delete the following files from src\: + achown.c + chmod.c + chown.c + cons.handler.c + cons.saver.c + cons.saver.h + fixhlp.c + key.c + key.unx.c + learn.c + learn.h + mad.c + Makefile.in + man2hlp.c + mfmt.c + slint.c + utilunix.c + xcurses.c + Otherwise, just type + nmake /f makefile.release (for release version) + nmake /f makefile.debug (for debug version) + + +4.1 Changes to main code: + + They are enclosed in "#if defined(__os2__)" or OS2_NT blocks. Because of the + diffences between OS/2 and the other OSs, some of the files are completely + rewritten with call to APIs. They are named as *.os2.[ch]. + +5. Contact Information +----------- + +Because of limited time and resources, this program has not been +thoroughly tested. Please report bugs (only those special under OS/2) +and comments via e-mail to: + +ado@software-ag.de + +---- +Alexander Dong diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..b35fb0ddb --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +#define VERSION "4.1.27" diff --git a/VERSION.in b/VERSION.in new file mode 100644 index 000000000..a44b12269 --- /dev/null +++ b/VERSION.in @@ -0,0 +1 @@ +#define VERSION "@VERSION@" diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 000000000..3db9fb319 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,237 @@ +/* This is the configuration file for the Midnight Commander. It was generated + by autoconf's configure. + + Configure for Midnight Commander + Copyright (C) 1994, 1995 Janne Kukonlehto + Copyright (C) 1994, 1995 Miguel de Icaza + Copyright (C) 1995 Jakub Jelinek + + This program 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 + (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. + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include + + +@TOP@ + +/* Always defined */ +#undef D_INO_IN_DIRENT +#undef IS_AIX +#undef MOUNTED_FREAD +#undef MOUNTED_FREAD_FSTYP +#undef MOUNTED_GETFSSTAT +#undef MOUNTED_GETMNT +#undef MOUNTED_GETMNTENT1 +#undef MOUNTED_GETMNTENT2 +#undef MOUNTED_GETMNTINFO +#undef MOUNTED_VMOUNT +#undef STAT_STATFS2_BSIZE +#undef STAT_STATFS2_FSIZE +#undef STAT_STATFS2_FS_DATA +#undef STAT_STATFS3_OSF1 +#undef STAT_STATFS4 +#undef STAT_STATVFS + +/* Does your system provide the umode_t typedef? */ +#undef umode_t + +/* Does the file command accepts the -L option */ +#undef FILE_L + +/* Does the file command work well with - option for stdin? */ +#undef FILE_STDIN + +/* Does the grep command work well with - option for stdin? */ +#undef GREP_STDIN + +/* Is the program using the GPM library? */ +#undef HAVE_LIBGPM + +/* Is the program using the distributed slang library? */ +#undef HAVE_SLANG + +/* Is the program using a system-installed slang library? */ +#undef HAVE_SYSTEM_SLANG + +/* Define if the slang.h header file is inside a directory slang +** in the standard directories +*/ +#undef SLANG_H_INSIDE_SLANG_DIR + +/* Does the program have subshell support? */ +#undef HAVE_SUBSHELL_SUPPORT + +/* If you don't have gcc, define this */ +#undef OLD_TOOLS + +/* Are you using other type of curses? */ +#undef OTHER_CURSES + +/* Is the subshell the default or optional? */ +#undef SUBSHELL_OPTIONAL + +/* Use SunOS SysV curses? */ +#undef SUNOS_CURSES + +/* Use old BSD curses? */ +#undef USE_BSD_CURSES + +/* Use SystemV curses? */ +#undef USE_SYSV_CURSES + +/* Use Ncurses? */ +#undef USE_NCURSES + +/* If you Curses does not have color define this one */ +#undef NO_COLOR_SUPPORT + +/* Support the Midnight Commander Virtual File System? */ +#undef USE_VFS + +/* Support for the Memory Allocation Debugger */ +#undef HAVE_MAD + +/* Extra Debugging */ +#undef MCDEBUG + +/* If the Slang library will be using it's own terminfo instead of termcap */ +#undef SLANG_TERMINFO + +/* If Slang library should use termcap */ +#undef USE_TERMCAP + +/* If you have socket and the rest of the net functions use this */ +#undef USE_NETCODE + +/* If defined, use .netrc for FTP connections */ +#undef USE_NETRC + +/* If your operating system does not have enough space for a file name + * in a struct dirent, then define this + */ +#undef NEED_EXTRA_DIRENT_BUFFER + +/* Define if you want the du -s summary */ +#undef HAVE_DUSUM + +/* Define if your du does handle -b correctly */ +#undef DUSUM_USEB + +/* Define to size of chunks du is displaying its information. + * If DUSUM_USEB is defined, this should be 1 + */ +#define DUSUM_FACTOR 512 + +/* Define this one if you want termnet support */ +#undef USE_TERMNET + +/* Defined if you have the file command */ +#undef HAVE_FILECMD + +/* Defined if you have libXpm, , libXext, */ +#undef HAVE_XPM_SHAPE + +/* Defined if you have shadow passwords on Linux */ +#undef LINUX_SHADOW + +/* Defined if you have the crypt prototype in neither unistd.h nor crypt.h */ +#undef NEED_CRYPT_PROTOTYPE + +/* Defined if your CPP understands ## macro token pasting method */ +#undef HAVE_PORTABLE_TOKEN_PASTING + +/* Define if you want to turn on SCO-specific code */ +#undef SCO_FLAVOR + +/* Define if your system has struct linger */ +#undef HAVE_STRUCT_LINGER + +/* Define if your curses has this one (AIX, OSF/1) */ +#undef USE_SETUPTERM + +/* Link in ext2fs code for delfs experimental file system */ +#undef USE_EXT2FSLIB + +/* Define if you have putenv routine */ +#undef HAVE_PUTENV + +/* Define if you have isascii */ +#undef HAVE_ISASCII + +/* Define if you want to use the HSC firewall */ +#undef HSC_PROXY + +/* Define if your system uses PAM for auth stuff */ +#undef HAVE_PAM + +/* Define if you have the pmap_getmaps function */ +#undef HAVE_PMAP_GETMAPS + +/* Define if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the get_process_stats function and have to use that instead of gettimeofday */ +#undef HAVE_GET_PROCESS_STATS + +/* Define if you want to call the internal routine edit() for the editor */ +#undef USE_INTERNAL_EDIT + +/* Define if your system has socketpair */ +#undef HAVE_SOCKETPAIR + +/* Do we have posix signals? */ +#undef HAVE_SIGACTION +#undef HAVE_SIGPROCMASK +#undef HAVE_SIGEMPTYSET +#undef HAVE_SIGADDSET + +/* Version of ncurses */ +#undef NCURSES_970530 + +@BOTTOM@ + +#ifdef HAVE_LIBPT +# define HAVE_GRANTPT +#endif + +#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBCRYPT_I) +# define HAVE_CRYPT +#endif + +#ifdef HAVE_XVIEW +# include +#endif + +#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET) +# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK) +# define SLANG_POSIX_SIGNALS +# endif +#endif + +#ifdef __os2__ +# define OS2_NT 1 +# define S_ISFIFO(x) 0 +#endif + +#ifdef _OS_NT +# define OS2_NT 1 +#endif + +#ifndef OS2_NT +/* some Unices do not define this, and slang requires it: */ +#ifndef unix +# define unix +#endif +#endif + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 000000000..2a4fdc78e --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1182 @@ +dnl +dnl XView & SlingShot library checking +dnl (c) 1995 Jakub Jelinek +dnl + +dnl Set xview_includes, xview_libraries, and no_xview (initially yes). +dnl Also sets xview_no_private_headers to yes if there are no xview_private +dnl headers in the system. +AC_DEFUN(AC_PATH_XVIEW, +[ +no_xview=yes +AC_ARG_WITH(xview, [--with-xview Use the XView toolkit],no_xview=) + +AC_ARG_WITH(xview-includes, [--with-xview-includes=path Specifies XView includes directory], +[ +if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-xview-includes=path) + xview_includes=NONE + no_xview= +else + xview_includes=$withval +fi +], +[ +xview_includes=NONE +])dnl +AC_ARG_WITH(xview-libraries, [--with-xview-libraries=path Specifies XView libraries directory], +[ +if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-xview-libraries=path) + xview_libraries=NONE + no_xview= +else + xview_libraries=$withval +fi +], +[ +xview_libraries=NONE +])dnl + +if test "$no_xview" != yes; then + if test "$no_x" = yes; then + no_xview=yes + fi +fi +if test "$no_xview" != yes; then +AC_MSG_CHECKING(for XView) +if test x$xview_libraries = xNONE; then + if test x$xview_includes = xNONE; then +AC_CACHE_VAL(ac_cv_path_xview, +[ + no_xview=yes +AC_PATH_XVIEW_XMKMF + if test "x$no_xview" = xyes; then +AC_PATH_XVIEW_DIRECT + fi + if test "x$no_xview" = xyes; then + ac_cv_path_xview="no_xview=yes" + else + ac_cv_path_xview="no_xview= ac_xview_includes=$ac_xview_includes ac_xview_libraries=$ac_xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers" + fi +])dnl + eval "$ac_cv_path_xview" + fi +fi + +if test "x$no_xview" = xyes; then + AC_MSG_RESULT(no) +else + if test "x$xview_includes" = x || test "x$xview_includes" = xNONE; then + xview_includes=$ac_xview_includes + fi + if test "x$xview_libraries" = x || test "x$xview_libraries" = xNONE; then + xview_libraries=$ac_xview_libraries + fi + xview_no_private_headers=$ac_xview_no_private_headers + ac_cv_path_xview="no_xview= ac_xview_includes=$xview_includes ac_xview_libraries=$xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers" + if test "x$xview_libraries" != x; then + ac_msg_xview="libraries $xview_libraries" + else + ac_msg_xview="" + fi + if test "x$xview_includes" != x; then + if test "x$ac_msg_xview" != x; then + ac_msg_xview="$ac_msg_xview, " + fi + ac_msg_xview="${ac_msg_xview}headers $xview_includes" + fi + if test "x$xview_no_private_headers" = xyes; then + if test "x$ac_msg_xview" != x; then + ac_msg_xview="$ac_msg_xview, " + fi + ac_msg_xview="${ac_msg_xview}without xview_private headers" + fi + AC_MSG_RESULT([$ac_msg_xview]) +fi +fi +]) + +dnl Internal subroutine of AC_PATH_XVIEW +dnl Set ac_xview_includes, ac_xview_libraries, and no_xview (initially yes). +AC_DEFUN(AC_PATH_XVIEW_XMKMF, +[rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +#include +acfindxv: + @echo 'ac_im_library_dest="${LIBRARY_DEST}"; ac_im_header_dest="${HEADER_DEST}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + no_xview= + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `make acfindxv 2>/dev/null | grep -v make` + # Screen out bogus values from the imake configuration. + if test -f "$ac_im_header_dest/xview/xview.h"; then + ac_xview_includes="$ac_im_header_dest" + else + no_xview=yes + fi + if test -d "$ac_im_library_dest"; then + ac_xview_libraries="$ac_im_library_dest" + else + no_xview=yes + fi + fi + if test "x$no_xview" != xyes; then + if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then + ac_xview_no_private_headers= + else + ac_xview_no_private_headers=yes + fi + fi + cd .. + rm -fr conftestdir +fi +]) + +dnl Internal subroutine of AC_PATH_XVIEW +dnl Set ac_xview_includes, ac_xview_libraries, and no_xview (initially yes). +AC_DEFUN(AC_PATH_XVIEW_DIRECT, +[test -z "$xview_direct_test_library" && xview_direct_test_library=xview +test -z "$xview_direct_test_function" && xview_direct_test_function=xv_unique_key +test -z "$xview_direct_test_include" && xview_direct_test_include=xview/xview.h +AC_TRY_CPP([#include <$xview_direct_test_include>], +[no_xview= ac_xview_includes=], +[ for ac_dir in \ + $OPENWINHOME/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + ; \ + do + if test -r "$ac_dir/$xview_direct_test_include"; then + no_xview= ac_xview_includes=$ac_dir + break + fi + done]) + +if test "x$no_xview" != xyes; then + if test "x$ac_xview_includes" != x; then + if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then + ac_xview_no_private_headers= + else + ac_xview_no_private_headers=yes + fi + else +AC_TRY_CPP([#include ], +[ac_xview_no_private_headers=],[ac_xview_no_private_headers=yes]) + fi +fi + +# Check for the libraries. +# See if we find them without any special options. +# Don't add to $LIBS permanently. +ac_save_LIBS="$LIBS" +ac_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $X_LIBS" +LIBS="-l$xview_direct_test_library -lolgx $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" +AC_TRY_LINK([#include <$xview_direct_test_include> +], [${xview_direct_test_function}()], +[LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" no_xview= ac_xview_libraries=], +[LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_xview_includes" | sed s/include/lib/` \ + $OPENWINHOME/lib \ + $OPENWINHOME/share/lib \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + /usr/local/lib/X11 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${xview_direct_test_library}.$ac_extension; then + no_xview= ac_xview_libraries=$ac_dir + break 2 + fi + done +done])]) + +dnl Substitute XVIEW_LIBS and XVIEW_CFLAGS and +dnl HAVE_XVIEW, which is either yes or no. +dnl Both contain X_LIBS resp. X_CFLAGS inside +dnl Also substitutes HAVE_XVIEW_PRIVATE_HEADERS +dnl if there are xview_private headers in the system +AC_DEFUN(AC_PATH_XVIEW_XTRA, +[AC_REQUIRE([AC_PATH_XVIEW])dnl +if test "$no_xview" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + XVIEW_CFLAGS="$X_CFGLAGS $XVIEW_CFLAGS -DXVIEW_MISSING" +else + if test -n "$xview_includes"; then + XVIEW_CFLAGS="$X_CFLAGS $XVIEW_CFGLAGS" + if test "$xview_includes" != "$x_includes"; then + XVIEW_CPPFLAGS="-I$xview_includes" + fi + fi + + # It would be nice to have a more robust check for the -R ld option than + # just checking for Solaris. + # It would also be nice to do this for all -L options, not just this one. + if test -n "$xview_libraries"; then + if test "$xview_libraries" = "$x_libraries"; then + XVIEW_LIBS="$X_LIBS $XVIEW_LIBS" + else + XVIEW_LIBS="$X_LIBS $XVIEW_LIBS -L$xview_libraries" + if test "`(uname) 2>/dev/null`" = SunOS && + uname -r | grep '^5' >/dev/null; then + XVIEW_LIBS="$XVIEW_LIBS -R$xview_libraries" + fi + fi + fi +fi +if test "x$no_xview" = xyes; then + HAVE_XVIEW=no +else + HAVE_XVIEW=yes +fi +if test "x$xview_no_private_headers" = xyes; then + HAVE_XVIEW_PRIVATE_HEADERS=no +else + HAVE_XVIEW_PRIVATE_HEADERS=yes +fi +AC_SUBST(XVIEW_CFLAGS)dnl +AC_SUBST(XVIEW_CPPFLAGS)dnl +AC_SUBST(XVIEW_LIBS)dnl +AC_SUBST(HAVE_XVIEW)dnl +AC_SUBST(HAVE_XVIEW_PRIVATE_HEADERS)dnl +])dnl + +dnl Internal subroutine of AC_PATH_SLINGSHOT +AC_DEFUN(AC_PATH_SLINGSHOT_DIRECT, +[ +AC_TRY_CPP([#include ],[no_ss= ac_ss_includes=], +[ for ac_dir in \ + $OPENWINHOME/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + ; \ + do + if test -r "$ac_dir/sspkg/rectobj.h"; then + no_ss= ac_ss_includes=$ac_dir + break + fi + done]) + +# Check for the libraries. +# See if we find them without any special options. +# Don't add to $LIBS permanently. +ac_save_LIBS="$LIBS" +ac_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $XVIEW_LIBS" +LIBS="-lsspkg -lm -lxview -lolgx $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" +AC_TRY_LINK([#include +], [rectobj_get_selected_list()], +[LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" no_ss= ac_ss_libraries=], +[LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_ss_includes" | sed s/include/lib/` \ + $OPENWINHOME/lib \ + $OPENWINHOME/share/lib \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + /usr/local/lib/X11 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/libsspkg.$ac_extension; then + no_ss= ac_ss_libraries=$ac_dir + break 2 + fi + done +done])]) + +dnl Set ss_includes, ss_libraries, and no_ss (initially yes). +AC_DEFUN(AC_PATH_SLINGSHOT, +[AC_REQUIRE([AC_PATH_XVIEW_XTRA])dnl +AC_MSG_CHECKING(for SlingShot) +AC_ARG_WITH(ss, [--with-ss Use the SlingShot extension]) + +AC_ARG_WITH(ss-includes, [--with-ss-includes=path Specifies SlingShot includes directory], +[ +if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-ss-includes=path) + ss_includes=NONE +else + ss_includes=$withval +fi +], +[ +ss_includes=NONE +])dnl +AC_ARG_WITH(ss-libraries, [--with-ss-libraries=path Specifies SlingShot libraries directory], +[ +if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-ss-libraries=path) + ss_libraries=NONE +else + ss_libraries=$withval +fi +], +[ +ss_libraries=NONE +])dnl + +if test "x$with_ss" = xno; then + no_ss=yes +else + if test "x$ss_includes" != xNONE && test "x$ss_libraries" != xNONE; then + no_ss= + else +AC_CACHE_VAL(ac_cv_path_ss, +[ + no_ss=yes +AC_PATH_SLINGSHOT_DIRECT + if test "x$no_ss" = xyes; then + ac_cv_path_ss="ac_noss=yes" + else + ac_cv_path_ss="ac_ss_includes=$ac_ss_includes ac_ss_libraries=$ac_ss_libraries" + fi +])dnl + eval "$ac_cv_path_ss" + fi +fi +fi +if test "x$no_ss" = xyes; then + AC_MSG_RESULT(no) +else + if test "x$ss_includes" = x || test "x$ss_includes" = xNONE; then + ss_includes=$ac_ss_includes + fi + if test "x$ss_libraries" = x || test "x$ss_libraries" = xNONE; then + ss_libraries=$ac_ss_libraries + fi + ac_cv_path_ss="no_ss= ac_ss_includes=$ss_includes ac_ss_libraries=$ss_libraries" + if test "x$ss_libraries" = x; then + if test "x$ss_includes" = x; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT([headers $ss_includes]) + fi + else + if test "x$ss_includes" = x; then + AC_MSG_RESULT([libraries $ss_libraries]) + else + AC_MSG_RESULT([libraries $ss_libraries, headers $ss_includes]) + fi + fi +fi +]) + +dnl Substitute SLINGSHOT_LIBS and SLINGSHOT_CFLAGS and +dnl HAVE_SLINGSHOT, which is either yes or no. +dnl Both contain XVIEW_LIBS resp. XVIEW_CFLAGS inside +AC_DEFUN(AC_PATH_SLINGSHOT_XTRA, +[AC_REQUIRE([AC_PATH_SLINGSHOT])dnl +if test "$no_ss" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + SLINGSHOT_CFLAGS="$XVIEW_CFGLAGS $SLINGSHOT_CFLAGS -DSLINGSHOT_MISSING" +else + if test -n "$ss_includes"; then + SLINGSHOT_CFLAGS="$XVIEW_CFLAGS $SLINGSHOT_CFGLAGS -I$ss_includes" + fi + + # It would be nice to have a more robust check for the -R ld option than + # just checking for Solaris. + # It would also be nice to do this for all -L options, not just this one. + if test -n "$ss_libraries"; then + SLINGSHOT_LIBS="$XVIEW_LIBS $SLINGSHOT_LIBS -L$ss_libraries" + if test "`(uname) 2>/dev/null`" = SunOS && + uname -r | grep '^5' >/dev/null; then + SLINGSHOT_LIBS="$SLINGSHOT_LIBS -R$ss_libraries" + fi + fi +fi +if test "x$no_ss" = xyes; then + HAVE_SLINGSHOT=no +else + HAVE_SLINGSHOT=yes +fi +AC_SUBST(SLINGSHOT_CFLAGS)dnl +AC_SUBST(SLINGSHOT_LIBS)dnl +AC_SUBST(HAVE_SLINGSHOT)dnl +])dnl + +dnl +dnl XView library checking end +dnl + +dnl +dnl Check for struct linger +dnl +AC_DEFUN(AC_STRUCT_LINGER, [ +av_struct_linger=no +AC_MSG_CHECKING(struct linger is available) +AC_TRY_RUN([ +#include +#include + +struct linger li; + +main () +{ + li.l_onoff = 1; + li.l_linger = 120; + exit (0); +} +],[ +AC_DEFINE(HAVE_STRUCT_LINGER) +av_struct_linger=yes +],[ +av_struct_linger=no +],[ +av_struct_linger=no +]) +AC_MSG_RESULT($av_struct_linger) +]) + +dnl +dnl Check for size of d_name dirent member +dnl +AC_DEFUN(AC_SHORT_D_NAME_LEN, [ +AC_MSG_CHECKING(filename fits on dirent.d_name) +AC_CACHE_VAL(ac_cv_dnamesize, [ +OCFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -I$srcdir" +AC_TRY_RUN([ +#include + +main () +{ + struct dirent ddd; + + if (sizeof (ddd.d_name) < 12) + exit (0); + else + exit (1); +} + +],[ + ac_cv_dnamesize="no" +], [ + ac_cv_dnamesize="yes" +], [ +# Cannot find out, so assume no + ac_cv_dnamesize="no" +]) +CFLAGS="$OCFLAGS" +]) +if test x$ac_cv_dnamesize = xno; then + AC_DEFINE(NEED_EXTRA_DIRENT_BUFFER) +fi +AC_MSG_RESULT($ac_cv_dnamesize) +]) + +dnl +dnl Filesystem information detection +dnl +dnl To get information about the disk, mount points, etc. +dnl + +AC_DEFUN(AC_GET_FS_INFO, [ + AC_CHECK_HEADERS(fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h) + AC_CHECK_HEADERS(mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h) + AC_CHECK_HEADERS(sys/mount.h sys/filsys.h sys/fs_types.h) + AC_CHECK_FUNCS(getmntinfo) + + dnl This configure.in code has been stolen from GNU fileutils-3.12. Its + dnl job is to detect a method to get list of mounted filesystems. + + AC_MSG_CHECKING([for d_ino member in directory struct]) + AC_CACHE_VAL(fu_cv_sys_d_ino_in_dirent, + [AC_TRY_LINK([ +#include +#ifdef HAVE_DIRENT_H +# include +#else /* not HAVE_DIRENT_H */ +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* HAVE_SYS_NDIR_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYS_DIR_H */ +# ifdef HAVE_NDIR_H +# include +# endif /* HAVE_NDIR_H */ +#endif /* HAVE_DIRENT_H */ + ], + [struct dirent dp; dp.d_ino = 0;], + fu_cv_sys_d_ino_in_dirent=yes, + fu_cv_sys_d_ino_in_dirent=no)]) + AC_MSG_RESULT($fu_cv_sys_d_ino_in_dirent) + if test $fu_cv_sys_d_ino_in_dirent = yes; then + AC_DEFINE(D_INO_IN_DIRENT) + fi + + # Determine how to get the list of mounted filesystems. + list_mounted_fs= + + # If the getmntent function is available but not in the standard library, + # make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). + AC_FUNC_GETMNTENT + + if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$list_mounted_fs"; then + # SVR4 + AC_MSG_CHECKING([for two-argument getmntent function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, + [AC_EGREP_HEADER(getmntent, sys/mnttab.h, + fu_cv_sys_mounted_getmntent2=yes, + fu_cv_sys_mounted_getmntent2=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) + if test $fu_cv_sys_mounted_getmntent2 = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTENT2) + fi + fi + + if test -z "$list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + AC_MSG_CHECKING([for one-argument getmntent function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, + [test $ac_cv_header_mntent_h = yes \ + && fu_cv_sys_mounted_getmntent1=yes \ + || fu_cv_sys_mounted_getmntent1=no]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) + if test $fu_cv_sys_mounted_getmntent1 = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTENT1) + fi + fi + + if test -z "$list_mounted_fs"; then + AC_WARN([could not determine how to read list of mounted fs]) + CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT" + fi + + fi + + if test -z "$list_mounted_fs"; then + # DEC Alpha running OSF/1. + AC_MSG_CHECKING([for getfsstat function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getsstat, + [AC_TRY_LINK([ +#include +#include +#include ], + [struct statfs *stats; + numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ], + fu_cv_sys_mounted_getsstat=yes, + fu_cv_sys_mounted_getsstat=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getsstat) + if test $fu_cv_sys_mounted_getsstat = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_GETFSSTAT) + fi + fi + + if test -z "$list_mounted_fs"; then + # AIX. + AC_MSG_CHECKING([for mntctl function and struct vmount]) + AC_CACHE_VAL(fu_cv_sys_mounted_vmount, + [AC_TRY_CPP([#include ], + fu_cv_sys_mounted_vmount=yes, + fu_cv_sys_mounted_vmount=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_vmount) + if test $fu_cv_sys_mounted_vmount = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_VMOUNT) + fi + fi + + if test -z "$list_mounted_fs"; then + # SVR3 + AC_MSG_CHECKING([for existence of three headers]) + AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, + [AC_TRY_CPP([ +#include +#include +#include ], + fu_cv_sys_mounted_fread_fstyp=yes, + fu_cv_sys_mounted_fread_fstyp=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_FREAD_FSTYP) + fi + fi + + if test -z "$list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + AC_MSG_CHECKING([for getmntinfo function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, + [ + ok= + if test $ac_cv_func_getmntinfo = yes; then + AC_EGREP_HEADER(f_type;, sys/mount.h, + ok=yes) + fi + test -n "$ok" \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + ]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) + if test $fu_cv_sys_mounted_getmntinfo = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO) + fi + fi + + # FIXME: add a test for netbsd-1.1 here + + if test -z "$list_mounted_fs"; then + # Ultrix + AC_MSG_CHECKING([for getmnt function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, + [AC_TRY_CPP([ +#include +#include ], + fu_cv_sys_mounted_getmnt=yes, + fu_cv_sys_mounted_getmnt=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) + if test $fu_cv_sys_mounted_getmnt = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNT) + fi + fi + + if test -z "$list_mounted_fs"; then + # SVR2 + AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) + AC_CACHE_VAL(fu_cv_sys_mounted_fread, + [AC_TRY_CPP([#include ], + fu_cv_sys_mounted_fread=yes, + fu_cv_sys_mounted_fread=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_fread) + if test $fu_cv_sys_mounted_fread = yes; then + list_mounted_fs=found + AC_DEFINE(MOUNTED_FREAD) + fi + fi + + if test -z "$list_mounted_fs"; then + AC_MSG_WARN([could not determine how to read list of mounted fs]) + CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT" + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions + fi + +dnl This configure.in code has been stolen from GNU fileutils-3.12. Its +dnl job is to detect a method to get file system information. + + AC_CHECKING(how to get filesystem space usage) + space=no + + # Here we'll compromise a little (and perform only the link test) + # since it seems there are no variants of the statvfs function. + if test $space = no; then + # SVR4 + AC_CHECK_FUNCS(statvfs) + if test $ac_cv_func_statvfs = yes; then + space=yes + AC_DEFINE(STAT_STATVFS) + fi + fi + + if test $space = no; then + # DEC Alpha running OSF/1 + AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, + [AC_TRY_RUN([ +#include +#include +#include + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd, sizeof (struct statfs))); + }], + fu_cv_sys_stat_statfs3_osf1=yes, + fu_cv_sys_stat_statfs3_osf1=no, + fu_cv_sys_stat_statfs3_osf1=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) + if test $fu_cv_sys_stat_statfs3_osf1 = yes; then + space=yes + AC_DEFINE(STAT_STATFS3_OSF1) + fi + fi + + if test $space = no; then + # AIX + AC_MSG_CHECKING([for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, + [AC_TRY_RUN([ +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_bsize = 0; + exit (statfs (".", &fsd)); + }], + fu_cv_sys_stat_statfs2_bsize=yes, + fu_cv_sys_stat_statfs2_bsize=no, + fu_cv_sys_stat_statfs2_bsize=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) + if test $fu_cv_sys_stat_statfs2_bsize = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_BSIZE) + fi + fi + + if test $space = no; then + # SVR3 + AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs4, + [AC_TRY_RUN([#include +#include + main () + { + struct statfs fsd; + exit (statfs (".", &fsd, sizeof fsd, 0)); + }], + fu_cv_sys_stat_statfs4=yes, + fu_cv_sys_stat_statfs4=no, + fu_cv_sys_stat_statfs4=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs4) + if test $fu_cv_sys_stat_statfs4 = yes; then + space=yes + AC_DEFINE(STAT_STATFS4) + fi + fi + + if test $space = no; then + # 4.4BSD and NetBSD + AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl + member (4.4BSD and NetBSD)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, + [AC_TRY_RUN([#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd)); + }], + fu_cv_sys_stat_statfs2_fsize=yes, + fu_cv_sys_stat_statfs2_fsize=no, + fu_cv_sys_stat_statfs2_fsize=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) + if test $fu_cv_sys_stat_statfs2_fsize = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_FSIZE) + fi + fi + + if test $space = no; then + # Ultrix + AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) + AC_CACHE_VAL(fu_cv_sys_stat_fs_data, + [AC_TRY_RUN([ +#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#endif + main () + { + struct fs_data fsd; + /* Ultrix's statfs returns 1 for success, + 0 for not mounted, -1 for failure. */ + exit (statfs (".", &fsd) != 1); + }], + fu_cv_sys_stat_fs_data=yes, + fu_cv_sys_stat_fs_data=no, + fu_cv_sys_stat_fs_data=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_fs_data) + if test $fu_cv_sys_stat_fs_data = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_FS_DATA) + fi + fi + + dnl Not supported + dnl if test $space = no; then + dnl # SVR2 + dnl AC_TRY_CPP([#include ], + dnl AC_DEFINE(STAT_READ_FILSYS) space=yes) + dnl fi +]) + +dnl AC_CHECK_HEADER_IN_PATH(HEADER-FILE, ADDITIONAL_PATH, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +AC_DEFUN(AC_CHECK_HEADER_IN_PATH, +[dnl Do the transliteration at runtime so arg 1 can be a shell variable. +ac_safe=`echo "$1" | tr './\055' '___'` +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_header_in_path_$ac_safe, +[AC_TRY_CPP([#include <$1>], ac_header_in_path=yes, [ + ac_header_in_path_found=no + for ac_header_in_path_value in [$2]; do + ac_in_path_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$ac_header_in_path_value" + AC_TRY_CPP([#include <$1>], [ +ac_header_in_path_found=yes +ac_header_in_path=$ac_header_in_path_value +], ) + CPPFLAGS=$ac_in_path_save_CPPFLAGS + if test x$ac_header_in_path_found = xyes; then + break + fi + done + if test $ac_header_in_path_found = xno; then + ac_header_in_path=no + fi +]) + eval "ac_cv_header_in_path_$ac_safe=$ac_header_in_path" +])dnl +eval "ac_header_in_path=`echo '$ac_cv_header_in_path_'$ac_safe`" +if test "$ac_header_in_path" = no; then + AC_MSG_RESULT(no) +ifelse([$4], , , [$4 +])dnl +else + if test -n "$ac_header_in_path"; then + AC_MSG_RESULT($ac_header_in_path) + else + AC_MSG_RESULT(yes) + fi + if test x$ac_header_in_path = xyes; then + ac_header_in_path= + eval "ac_cv_header_in_path_$ac_safe=" + fi + ifelse([$3], , , [$3 +])dnl +fi +]) + +dnl Hope I can check for libXpm only in the X11 library directory +AC_DEFUN(AC_LIB_XPM, [ +AC_MSG_CHECKING(for -lXpm) +AC_CACHE_VAL(ac_cv_has_xpm, [ + ac_cv_has_xpm=no + if test x$no_x = xyes; then + : + else + has_xpm_save_LIBS=$LIBS + LIBS="-lXpm $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + has_xpm_save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $X_LIBS" + has_xpm_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $X_CFLAGS" + AC_TRY_LINK([ +#include +#include +], [XpmLibraryVersion();], ac_cv_has_xpm=yes) + CFLAGS="$has_xpm_save_CFLAGS" + LDFLAGS="$has_xpm_save_LDFLAGS" + LIBS="$has_xpm_save_LIBS" + fi +]) +AC_MSG_RESULT($ac_cv_has_xpm) +]) + +dnl Hope I can check for libXext only in the X11 library directory +dnl and shape.h will be in X11/extensions/shape.h +AC_DEFUN(AC_X_SHAPE_EXTENSION, [ +AC_MSG_CHECKING(for X11 non-rectangular shape extension) +AC_CACHE_VAL(ac_cv_has_shape, [ + ac_cv_has_shape=no + if test x$no_x = xyes; then + : + else + has_shape_save_LIBS=$LIBS + LIBS="-lXext $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + has_shape_save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $X_LIBS" + has_shape_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $X_CFLAGS" + AC_TRY_LINK([ +#include +#include +#include +], [ +Display *dpy = (Display *)NULL; +int a, b; +XShapeQueryVersion(dpy,&a,&b); +], ac_cv_has_shape=yes) + CFLAGS="$has_shape_save_CFLAGS" + LDFLAGS="$has_shape_save_LDFLAGS" + LIBS="$has_shape_save_LIBS" + fi +]) +AC_MSG_RESULT($ac_cv_has_shape) +]) + +dnl AC_TRY_WARNINGS(INCLUDES, FUNCTION-BODY, +dnl ACTION-IF-NO-WARNINGS [, ACTION-IF-WARNINGS-OR-ERROR]) +AC_DEFUN(AC_TRY_WARNINGS, +[cat > conftest.$ac_ext <&AC_FD_CC 2>&AC_FD_CC; then + ifelse([$4], , :, [rm -rf conftest* + $4]) +ifelse([$3], , , [else + rm -rf conftest* + $3 +])dnl +fi +rm -f conftest*] +) + +dnl Find if make is GNU make. +AC_DEFUN(AC_PROG_GNU_MAKE, +[AC_MSG_CHECKING(whether we are using GNU make) +set dummy ${MAKE-make}; ac_make=[$]2 +AC_CACHE_VAL(ac_cv_prog_gnu_make, +[cat > conftestmake <<\EOF +all: + @echo ' ' +EOF +if ${MAKE-make} --version -f conftestmake 2>/dev/null | grep GNU >/dev/null 2>&1; then + ac_cv_prog_gnu_make=yes +else + ac_cv_prog_gnu_make=no +fi +rm -f conftestmake])dnl +if test $ac_cv_prog_gnu_make = yes; then + AC_MSG_RESULT(yes) + GNU_MAKE="GNU_MAKE=yes" +else + AC_MSG_RESULT(no) + GNU_MAKE= +fi +AC_SUBST([GNU_MAKE])dnl +]) + +dnl +dnl Local additions to Autoconf macros. +dnl Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +dnl François Pinard , 1992. + +dnl ## ----------------------------------------- ## +dnl ## ANSIfy the C compiler whenever possible. ## +dnl ## ----------------------------------------- ## + +dnl @defmac AC_PROG_CC_STDC +dnl @maindex PROG_CC_STDC +dnl @ovindex CC +dnl If the C compiler in not in ANSI C mode by default, try to add an option +dnl to output variable @code{CC} to make it so. This macro tries various +dnl options that select ANSI C on some system or another. It considers the +dnl compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and +dnl handles function prototypes correctly. +dnl +dnl If you use this macro, you should check after calling it whether the C +dnl compiler has been set to accept ANSI C; if not, the shell variable +dnl @code{ac_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source +dnl code in ANSI C, you can make an un-ANSIfied copy of it by using the +dnl program @code{ansi2knr}, which comes with Ghostscript. +dnl @end defmac + +dnl Unixware 2.1 defines __STDC__ to 1 only when some useful extensions are +dnl turned off. They are on by default and turned off with the option -Xc. +dnl The consequence is that __STDC__ is defined but e.g. struct sigaction +dnl is not defined. -- Norbert + +dnl Below all tests but the one for HP-UX are removed. They caused more +dnl problems than they soved, sigh. -- Norbert + +AC_DEFUN(fp_PROG_CC_STDC, +[AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) +AC_CACHE_VAL(ac_cv_prog_cc_stdc, +[ac_cv_prog_cc_stdc=no +ac_save_CFLAGS="$CFLAGS" +dnl Don't try gcc -ansi; that turns off useful extensions and +dnl breaks some systems' header files. +dnl AIX -qlanglvl=ansi (removed -- Norbert) +dnl Ultrix and OSF/1 -std1 (removed -- Norbert) +dnl HP-UX -Aa -D_HPUX_SOURCE +dnl SVR4 -Xc (removed -- Norbert) +for ac_arg in "" "-Aa -D_HPUX_SOURCE" +do + CFLAGS="$ac_save_CFLAGS $ac_arg" + AC_TRY_COMPILE( +[#include +#if !defined(__STDC__) || __STDC__ != 1 +choke me +#endif +], [int test (int i, double x); +struct sigaction sa; +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);};], +[ac_cv_prog_cc_stdc="$ac_arg"; break]) +done +CFLAGS="$ac_save_CFLAGS" +]) +AC_MSG_RESULT($ac_cv_prog_cc_stdc) +case "x$ac_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $ac_cv_prog_cc_stdc" ;; +esac +]) + diff --git a/config.h.in b/config.h.in new file mode 100644 index 000000000..2c4f45135 --- /dev/null +++ b/config.h.in @@ -0,0 +1,508 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* This is the configuration file for the Midnight Commander. It was generated + by autoconf's configure. + + Configure for Midnight Commander + Copyright (C) 1994, 1995 Janne Kukonlehto + Copyright (C) 1994, 1995 Miguel de Icaza + Copyright (C) 1995 Jakub Jelinek + + This program 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 + (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. + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include + + + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +#undef _ALL_SOURCE +#endif + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have the getmntent function. */ +#undef HAVE_GETMNTENT + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + +/* Define if your struct stat has st_blocks. */ +#undef HAVE_ST_BLOCKS + +/* Define if your struct stat has st_rdev. */ +#undef HAVE_ST_RDEV + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define if major, minor, and makedev are declared in . */ +#undef MAJOR_IN_MKDEV + +/* Define if major, minor, and makedev are declared in . */ +#undef MAJOR_IN_SYSMACROS + +/* Define if on MINIX. */ +#undef _MINIX + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define if the system does not provide POSIX.1 features except + with this defined. */ +#undef _POSIX_1_SOURCE + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Always defined */ +#undef D_INO_IN_DIRENT +#undef IS_AIX +#undef MOUNTED_FREAD +#undef MOUNTED_FREAD_FSTYP +#undef MOUNTED_GETFSSTAT +#undef MOUNTED_GETMNT +#undef MOUNTED_GETMNTENT1 +#undef MOUNTED_GETMNTENT2 +#undef MOUNTED_GETMNTINFO +#undef MOUNTED_VMOUNT +#undef STAT_STATFS2_BSIZE +#undef STAT_STATFS2_FSIZE +#undef STAT_STATFS2_FS_DATA +#undef STAT_STATFS3_OSF1 +#undef STAT_STATFS4 +#undef STAT_STATVFS + +/* Does your system provide the umode_t typedef? */ +#undef umode_t + +/* Does the file command accepts the -L option */ +#undef FILE_L + +/* Does the file command work well with - option for stdin? */ +#undef FILE_STDIN + +/* Does the grep command work well with - option for stdin? */ +#undef GREP_STDIN + +/* Is the program using the GPM library? */ +#undef HAVE_LIBGPM + +/* Is the program using the distributed slang library? */ +#undef HAVE_SLANG + +/* Is the program using a system-installed slang library? */ +#undef HAVE_SYSTEM_SLANG + +/* Define if the slang.h header file is inside a directory slang +** in the standard directories +*/ +#undef SLANG_H_INSIDE_SLANG_DIR + +/* Does the program have subshell support? */ +#undef HAVE_SUBSHELL_SUPPORT + +/* If you don't have gcc, define this */ +#undef OLD_TOOLS + +/* Is the subshell the default or optional? */ +#undef SUBSHELL_OPTIONAL + +/* Use SunOS SysV curses? */ +#undef SUNOS_CURSES + +/* Use SystemV curses? */ +#undef USE_SYSV_CURSES + +/* Use Ncurses? */ +#undef USE_NCURSES + +/* If you Curses does not have color define this one */ +#undef NO_COLOR_SUPPORT + +/* Support the Midnight Commander Virtual File System? */ +#undef USE_VFS + +/* Support for the Memory Allocation Debugger */ +#undef HAVE_MAD + +/* Extra Debugging */ +#undef MCDEBUG + +/* If the Slang library will be using it's own terminfo instead of termcap */ +#undef SLANG_TERMINFO + +/* If Slang library should use termcap */ +#undef USE_TERMCAP + +/* If you have socket and the rest of the net functions use this */ +#undef USE_NETCODE + +/* If defined, use .netrc for FTP connections */ +#undef USE_NETRC + +/* If your operating system does not have enough space for a file name + * in a struct dirent, then define this + */ +#undef NEED_EXTRA_DIRENT_BUFFER + +/* Define if you want the du -s summary */ +#undef HAVE_DUSUM + +/* Define if your du does handle -b correctly */ +#undef DUSUM_USEB + +/* Define to size of chunks du is displaying its information. + * If DUSUM_USEB is defined, this should be 1 + */ +#define DUSUM_FACTOR 512 + +/* Define this one if you want termnet support */ +#undef USE_TERMNET + +/* Defined if you have libXpm, , libXext, */ +#undef HAVE_XPM_SHAPE + +/* Defined if you have shadow passwords on Linux */ +#undef LINUX_SHADOW + +/* Defined if you have the crypt prototype in neither unistd.h nor crypt.h */ +#undef NEED_CRYPT_PROTOTYPE + +/* Define if you want to turn on SCO-specific code */ +#undef SCO_FLAVOR + +/* Define if your system has struct linger */ +#undef HAVE_STRUCT_LINGER + +/* Define if your curses has this one (AIX, OSF/1) */ +#undef USE_SETUPTERM + +/* Link in ext2fs code for delfs experimental file system */ +#undef USE_EXT2FSLIB + +/* Define if you want to use the HSC firewall */ +#undef HSC_PROXY + +/* Define if your system uses PAM for auth stuff */ +#undef HAVE_PAM + +/* Define if you have the get_process_stats function and have to use that instead of gettimeofday */ +#undef HAVE_GET_PROCESS_STATS + +/* Define if you want to call the internal routine edit() for the editor */ +#undef USE_INTERNAL_EDIT + +/* Define if your system has socketpair */ +#undef HAVE_SOCKETPAIR + +/* Version of ncurses */ +#undef NCURSES_970530 + +/* Define if you have the cfgetospeed function. */ +#undef HAVE_CFGETOSPEED + +/* Define if you have the crypt function. */ +#undef HAVE_CRYPT + +/* Define if you have the getmntinfo function. */ +#undef HAVE_GETMNTINFO + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the getwd function. */ +#undef HAVE_GETWD + +/* Define if you have the grantpt function. */ +#undef HAVE_GRANTPT + +/* Define if you have the initgroups function. */ +#undef HAVE_INITGROUPS + +/* Define if you have the keyok function. */ +#undef HAVE_KEYOK + +/* Define if you have the memcpy function. */ +#undef HAVE_MEMCPY + +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the memset function. */ +#undef HAVE_MEMSET + +/* Define if you have the pmap_getmaps function. */ +#undef HAVE_PMAP_GETMAPS + +/* Define if you have the pmap_getport function. */ +#undef HAVE_PMAP_GETPORT + +/* Define if you have the pmap_set function. */ +#undef HAVE_PMAP_SET + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the pwdauth function. */ +#undef HAVE_PWDAUTH + +/* Define if you have the resizeterm function. */ +#undef HAVE_RESIZETERM + +/* Define if you have the rresvport function. */ +#undef HAVE_RRESVPORT + +/* Define if you have the sigaction function. */ +#undef HAVE_SIGACTION + +/* Define if you have the sigaddset function. */ +#undef HAVE_SIGADDSET + +/* Define if you have the sigemptyset function. */ +#undef HAVE_SIGEMPTYSET + +/* Define if you have the sigprocmask function. */ +#undef HAVE_SIGPROCMASK + +/* Define if you have the socket function. */ +#undef HAVE_SOCKET + +/* Define if you have the socketpair function. */ +#undef HAVE_SOCKETPAIR + +/* Define if you have the statfs function. */ +#undef HAVE_STATFS + +/* Define if you have the statlstat function. */ +#undef HAVE_STATLSTAT + +/* Define if you have the statvfs function. */ +#undef HAVE_STATVFS + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strncasecmp function. */ +#undef HAVE_STRNCASECMP + +/* Define if you have the tcgetattr function. */ +#undef HAVE_TCGETATTR + +/* Define if you have the tcsetattr function. */ +#undef HAVE_TCSETATTR + +/* Define if you have the truncate function. */ +#undef HAVE_TRUNCATE + +/* Define if you have the valloc function. */ +#undef HAVE_VALLOC + +/* Define if you have the header file. */ +#undef HAVE_CRYPT_H + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#undef HAVE_EXT2FS_EXT2FS_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_GRP_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LINUX_EXT2_FS_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the header file. */ +#undef HAVE_MNTENT_H + +/* Define if you have the header file. */ +#undef HAVE_MNTTAB_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_RPC_PMAP_CLNT_H + +/* Define if you have the header file. */ +#undef HAVE_SHADOW_H + +/* Define if you have the header file. */ +#undef HAVE_SHADOW_SHADOW_H + +/* Define if you have the header file. */ +#undef HAVE_SLANG_H + +/* Define if you have the header file. */ +#undef HAVE_SLANG_SLANG_H + +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DUSTAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILSYS_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FS_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FSTYP_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the header file. */ +#undef HAVE_UTIME_H + +/* Define if you have the intl library (-lintl). */ +#undef HAVE_LIBINTL + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the pt library (-lpt). */ +#undef HAVE_LIBPT + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + +#ifdef HAVE_LIBPT +# define HAVE_GRANTPT +#endif + +#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBCRYPT_I) +# define HAVE_CRYPT +#endif + +#ifdef HAVE_XVIEW +# include +#endif + +#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET) +# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK) +# define SLANG_POSIX_SIGNALS +# endif +#endif + +#ifdef __os2__ +# define OS2_NT 1 +# define S_ISFIFO(x) 0 +#endif + +#ifdef _OS_NT +# define OS2_NT 1 +#endif + +#ifndef OS2_NT +/* some Unices do not define this, and slang requires it: */ +#ifndef unix +# define unix +#endif +#endif + diff --git a/configure b/configure new file mode 100755 index 000000000..4e6863c5e --- /dev/null +++ b/configure @@ -0,0 +1,8487 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.7 +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-x use the X Window System" +ac_help="$ac_help +--with-xview Use the XView toolkit" +ac_help="$ac_help +--with-xview-includes=path Specifies XView includes directory" +ac_help="$ac_help +--with-xview-libraries=path Specifies XView libraries directory" +ac_help="$ac_help +--with-xv-bindir=dir Specifies directory where to install XView version" +ac_help="$ac_help +--with-sco Use this to turn on SCO-specific code" +ac_help="$ac_help +--with-sunos-curses Used to force SunOS 4.x curses" +ac_help="$ac_help +--with-osf1-curses Used to force OSF/1 curses" +ac_help="$ac_help +--with-vcurses[=incdir] Used to force SysV curses" +ac_help="$ac_help +--with-gpm-mouse[=base-dir] Compile with gpm mouse support" +ac_help="$ac_help +--with-ncurses[=base-dir] Compile with ncurses/locate base dir" +ac_help="$ac_help +--with-hsc Compile with support for the HSC firewall" +ac_help="$ac_help +--with-tk Use the Tk toolkit" +ac_help="$ac_help +--with-tk-includes=dir Specifies the Tcl/Tk header directory" +ac_help="$ac_help +--with-tk-libraries=dir Specifies the Tcl/Tk library directory" +ac_help="$ac_help +--with-gnome Compile the GNOME edition" +ac_help="$ac_help +--with-dusum Support the du -s summaries" +ac_help="$ac_help +--with-termnet If you want a termified net support" +ac_help="$ac_help +--with-subshell If you want to use a concurrent shell" +ac_help="$ac_help +--with-debug For use by developers only: activates -Wall and MAD" +ac_help="$ac_help +--with-efence Developers only: activates -Wall and efence" +ac_help="$ac_help +--with-mmap To force using the mmap call (AIX)" +ac_help="$ac_help +--with-terminfo SLANG: Force usage of terminfo" +ac_help="$ac_help +--with-termcap SLANG: Force usage of termcap" +ac_help="$ac_help +--with-our-slang SLANG: Don't use system-installed SLang" +ac_help="$ac_help +--with-slang Compile with the slang screen manager" +ac_help="$ac_help +--with-vfs Compile with the VFS code" +ac_help="$ac_help +--with-edit Define INTERNAL_EDIT" +ac_help="$ac_help +--with-netrc Compile with ftp .netrc support" +ac_help="$ac_help +--with-ext2undel Compile with ext2 undelete code" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.7" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=create_vcs + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='echo $CPP $CPPFLAGS 1>&5; +$CPP $CPPFLAGS' +ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; +${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; +${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + +include_additional_path="/usr/local/include /opt/gnu/include" + +use_cc_g_flag=yes + +CCOPTS="$CFLAGS" +unset CFLAGS + +if test "x$prefix" = xNONE; then +echo $ac_n "checking for prefix by ""... $ac_c" 1>&6 +# Extract the first word of "mc", so it can be a program name with args. +set dummy mc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_MC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MC" in + /*) + ac_cv_path_MC="$MC" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_MC="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +MC="$ac_cv_path_MC" +if test -n "$MC"; then + echo "$ac_t""$MC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -n "$ac_cv_path_MC"; then + prefix=`echo $ac_cv_path_MC|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` + fi +fi + + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +set dummy ${MAKE-make}; ac_make=$2 +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5 | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +if test $ac_cv_prog_gcc = yes; then + GCC=yes + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_gcc_g=yes +else + ac_cv_prog_gcc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + +if test x"$AWK" = x; then + AWK=":" + AWK_VAR_OPTION="" + dep=slowdep +else + dep=fastdep + + # test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4) + if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then + AWK_VAR_OPTION="" + else + AWK_VAR_OPTION="-v" + fi +fi + + +echo $ac_n "checking whether we are using GNU make""... $ac_c" 1>&6 +set dummy ${MAKE-make}; ac_make=$2 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_make'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo ' ' +EOF +if ${MAKE-make} --version -f conftestmake 2>/dev/null | grep GNU >/dev/null 2>&1; then + ac_cv_prog_gnu_make=yes +else + ac_cv_prog_gnu_make=no +fi +rm -f conftestmake +fi +if test $ac_cv_prog_gnu_make = yes; then + echo "$ac_t""yes" 1>&6 + GNU_MAKE="GNU_MAKE=yes" +else + echo "$ac_t""no" 1>&6 + GNU_MAKE= +fi + + +echo $ac_n "checking for AIX""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +ac_safe=`echo "minix/config.h" | tr './\055' '___'` +echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MINIX=yes +else + echo "$ac_t""no" 1>&6 +MINIX= +fi + +if test "$MINIX" = yes; then + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_1_SOURCE 2 +EOF + + cat >> confdefs.h <<\EOF +#define _MINIX 1 +EOF + +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&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 "$ac_t""no" 1>&6 + ISC= +fi + +echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CFLAGS="$CFLAGS" +for ac_arg in "" "-Aa -D_HPUX_SOURCE" +do + CFLAGS="$ac_save_CFLAGS $ac_arg" + cat > conftest.$ac_ext < +#if !defined(__STDC__) || __STDC__ != 1 +choke me +#endif + +int main() { return 0; } +int t() { +int test (int i, double x); +struct sigaction sa; +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_prog_cc_stdc="$ac_arg"; break +fi +rm -f conftest* + +done +CFLAGS="$ac_save_CFLAGS" + +fi + +echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6 +case "x$ac_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { return 0; } +int t() { +return makedev(0, 0); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + ac_cv_header_sys_types_h_makedev=yes +else + rm -rf conftest* + ac_cv_header_sys_types_h_makedev=no +fi +rm -f conftest* + + +fi + +echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6 + +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_safe=`echo "sys/mkdev.h" | tr './\055' '___'` +echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define MAJOR_IN_MKDEV 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + if test $ac_cv_header_sys_mkdev_h = no; then +ac_safe=`echo "sys/sysmacros.h" | tr './\055' '___'` +echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define MAJOR_IN_SYSMACROS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + fi +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_c_const=yes +else + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +# Extract the first word of "mv", so it can be a program name with args. +set dummy mv; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MV" in + /*) + ac_cv_path_MV="$MV" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_MV="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" + ;; +esac +fi +MV="$ac_cv_path_MV" +if test -n "$MV"; then + echo "$ac_t""$MV" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "cp", so it can be a program name with args. +set dummy cp; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$CP" in + /*) + ac_cv_path_CP="$CP" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_CP="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp" + ;; +esac +fi +CP="$ac_cv_path_CP" +if test -n "$CP"; then + echo "$ac_t""$CP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$RM" in + /*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_RM="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" + ;; +esac +fi +RM="$ac_cv_path_RM" +if test -n "$RM"; then + echo "$ac_t""$RM" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "chmod", so it can be a program name with args. +set dummy chmod; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$CHMOD" in + /*) + ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_CHMOD="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":" + ;; +esac +fi +CHMOD="$ac_cv_path_CHMOD" +if test -n "$CHMOD"; then + echo "$ac_t""$CHMOD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$AR" in + /*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_AR="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_AR" && ac_cv_path_AR="ar" + ;; +esac +fi +AR="$ac_cv_path_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# Extract the first word of "uname", so it can be a program name with args. +set dummy uname; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_system'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$system"; then + ac_cv_prog_system="$system" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_system="`uname`" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_system" && ac_cv_prog_system="unknown" +fi +fi +system="$ac_cv_prog_system" +if test -n "$system"; then + echo "$ac_t""$system" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +for ac_prog in netscape arena Mosaic chimera +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_X11_WWW'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$X11_WWW"; then + ac_cv_prog_X11_WWW="$X11_WWW" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_X11_WWW="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +X11_WWW="$ac_cv_prog_X11_WWW" +if test -n "$X11_WWW"; then + echo "$ac_t""$X11_WWW" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$X11_WWW" && break +done + +if test x"$X11_WWW" = x; then + X11_WWW=lynx +fi + +cc_uses_g=yes +if test x$GCC = xyes; then + if test x$ac_cv_prog_gcc_g = xyes; then + : + else + cc_uses_g=no + fi +fi +if test "x$CCOPTS" = x; then + if test x$GCC = xyes; then + if test x$system = xLinux; then + CCOPTS='-O2 -fno-strength-reduce' + if test x$use_cc_g_flag = xyes; then + if test $cc_uses_g = yes; then + CCOPTS='-g -O' + fi + fi + else + CCOPTS='-O' + if test x$use_cc_g_flag = xyes; then + if test $cc_uses_g = yes; then + CCOPTS='-g -O' + fi + fi + fi + else + if test x$use_cc_g_flag = xyes; then + CCOPTS="$CFLAGS" + else + CCOPTS= + fi + fi +fi +CFLAGS="$CCOPTS" + + +posix_libs="" +if test $system = A/UX +then + posix_libs="-lposix" + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_ifs" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +for ac_hdr in unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in stdlib.h termios.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + +if test x$ac_cv_header_malloc_h = xno; then + echo '/* NeXTStep malloc.h stub */' > $srcdir/malloc.h +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { return 0; } +int t() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_hdr> +int main() { return 0; } +int t() { +DIR *dirp = 0; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +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 $ac_n "checking for -ldir""... $ac_c" 1>&6 +ac_lib_var=`echo dir | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for -lx""... $ac_c" 1>&6 +ac_lib_var=`echo x | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes +else +cat > conftest.$ac_ext </dev/null; then + ac_cv_c_cross=no +else + ac_cv_c_cross=yes +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross + + +echo $ac_n "checking filename fits on dirent.d_name""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_dnamesize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +OCFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -I$srcdir" +if test "$cross_compiling" = yes; then + +# Cannot find out, so assume no + ac_cv_dnamesize="no" + +else +cat > conftest.$ac_ext < + +main () +{ + struct dirent ddd; + + if (sizeof (ddd.d_name) < 12) + exit (0); + else + exit (1); +} + + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + + ac_cv_dnamesize="no" + +else + + ac_cv_dnamesize="yes" + +fi +fi +rm -fr conftest* +CFLAGS="$OCFLAGS" + +fi + +if test x$ac_cv_dnamesize = xno; then + cat >> confdefs.h <<\EOF +#define NEED_EXTRA_DIRENT_BUFFER 1 +EOF + +fi +echo "$ac_t""$ac_cv_dnamesize" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else +cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + : +else + ac_cv_header_stdc=no +fi +fi +rm -fr conftest* +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + + + +REGEX_O="regex.o" + + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { return 0; } +int t() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { return 0; } +int t() { +struct stat s; s.st_blocks; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_struct_st_blocks=yes +else + rm -rf conftest* + ac_cv_struct_st_blocks=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 +if test $ac_cv_struct_st_blocks = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLOCKS 1 +EOF + +else + LIBOBJS="$LIBOBJS fileblocks.o" +fi + +echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { return 0; } +int t() { +struct stat s; s.st_rdev; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes +else + rm -rf conftest* + ac_cv_struct_st_rdev=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 +if test $ac_cv_struct_st_rdev = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_RDEV 1 +EOF + +fi + + + +for ac_func in strerror statfs getwd strcasecmp strncasecmp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in strdup memmove pwdauth truncate initgroups putenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in memset memcpy tcsetattr tcgetattr cfgetospeed +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in sigaction sigemptyset sigprocmask sigaddset +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +SHADOWLIB= +if test x$system = xLinux; then +echo $ac_n "checking for -lshadow""... $ac_c" 1>&6 +ac_lib_var=`echo shadow | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lshadow $LIBS" +cat > conftest.$ac_ext <&6 + +shadow_header=no +for ac_hdr in shadow.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + +if test x$ac_cv_header_shadow_h = xyes; then + shadow_header=yes +else +for ac_hdr in shadow/shadow.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + if test x$ac_cv_shadow_shadow_h = xyes; then + shadow_header=yes + fi +fi +if test $shadow_header = yes; then + cat >> confdefs.h <<\EOF +#define LINUX_SHADOW 1 +EOF + + SHADOWLIB=-lshadow +fi + +else + echo "$ac_t""no" 1>&6 +fi + +fi + + +NEED_CRYPT_PROTOTYPE=yes +if test x$ac_cv_header_crypt_h = xyes; then +cat > conftest.$ac_ext < +int main() { return 0; } +int t() { +char *p = crypt("xxx", "yyy"); +; return 0; } +EOF +ac_compile_warn='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1' +if { if eval $ac_compile_warn; then :; else echo arning; fi; } | grep arning 1>&5 2>&5; then + : +else + rm -rf conftest* + +NEED_CRYPT_PROTOTYPE=no +fi +rm -f conftest* + +else + if test x$ac_cv_header_unistd_h = xyes; then +cat > conftest.$ac_ext < +int main() { return 0; } +int t() { +char *p = crypt("xxx", "yyy"); +; return 0; } +EOF +ac_compile_warn='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1' +if { if eval $ac_compile_warn; then :; else echo arning; fi; } | grep arning 1>&5 2>&5; then + : +else + rm -rf conftest* + +NEED_CRYPT_PROTOTYPE=no +fi +rm -f conftest* + + fi +fi +if test x$NEED_CRYPT_PROTOTYPE=xyes; then +cat >> confdefs.h <<\EOF +#define NEED_CRYPT_PROTOTYPE 1 +EOF + +fi + +for ac_hdr in sys/select.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + +for ac_func in crypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6 +ac_lib_var=`echo crypt | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -lcrypt" +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for -lcrypt_i""... $ac_c" 1>&6 +ac_lib_var=`echo crypt_i | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt_i $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -lcrypt_i" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +fi +done + + +for ac_func in grantpt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test x$ac_cv_func_grantpt = xyes; then + : +else + echo $ac_n "checking for -lpt""... $ac_c" 1>&6 +ac_lib_var=`echo pt | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpt $LIBS" +cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo pt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi + +fi + +if test x$GCC = xyes; then + echo $ac_n "checking for -lintl""... $ac_c" 1>&6 +ac_lib_var=`echo intl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo intl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi + +fi + +for ac_func in statlstat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +echo $ac_n "checking for AIX defines""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + +cat >> confdefs.h <<\EOF +#define IS_AIX 1 +EOF + +echo "$ac_t""yes" 1>&6 + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for -lgen""... $ac_c" 1>&6 +ac_lib_var=`echo gen | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="-lgen $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + + + for ac_hdr in fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + for ac_hdr in mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + for ac_hdr in sys/mount.h sys/filsys.h sys/fs_types.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in getmntinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + + echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_d_ino_in_dirent'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef HAVE_DIRENT_H +# include +#else /* not HAVE_DIRENT_H */ +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* HAVE_SYS_NDIR_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYS_DIR_H */ +# ifdef HAVE_NDIR_H +# include +# endif /* HAVE_NDIR_H */ +#endif /* HAVE_DIRENT_H */ + +int main() { return 0; } +int t() { +struct dirent dp; dp.d_ino = 0; +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + fu_cv_sys_d_ino_in_dirent=yes +else + rm -rf conftest* + fu_cv_sys_d_ino_in_dirent=no +fi +rm -f conftest* + +fi + + echo "$ac_t""$fu_cv_sys_d_ino_in_dirent" 1>&6 + if test $fu_cv_sys_d_ino_in_dirent = yes; then + cat >> confdefs.h <<\EOF +#define D_INO_IN_DIRENT 1 +EOF + + fi + + # Determine how to get the list of mounted filesystems. + list_mounted_fs= + + # If the getmntent function is available but not in the standard library, + # make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). + # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. +echo $ac_n "checking for -lsun""... $ac_c" 1>&6 +ac_lib_var=`echo sun | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsun $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="-lsun $LIBS" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for -lseq""... $ac_c" 1>&6 +ac_lib_var=`echo seq | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lseq $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="-lseq $LIBS" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for -lgen""... $ac_c" 1>&6 +ac_lib_var=`echo gen | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="-lgen $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +echo $ac_n "checking for getmntent""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char getmntent(); + +int main() { return 0; } +int t() { + +/* 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_getmntent) || defined (__stub___getmntent) +choke me +#else +getmntent(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_getmntent=yes" +else + rm -rf conftest* + eval "ac_cv_func_getmntent=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_GETMNTENT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$list_mounted_fs"; then + # SVR4 + echo $ac_n "checking for two-argument getmntent function""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getmntent" >/dev/null 2>&1; then + rm -rf conftest* + fu_cv_sys_mounted_getmntent2=yes +else + rm -rf conftest* + fu_cv_sys_mounted_getmntent2=no +fi +rm -f conftest* + +fi + + echo "$ac_t""$fu_cv_sys_mounted_getmntent2" 1>&6 + if test $fu_cv_sys_mounted_getmntent2 = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTENT2 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + echo $ac_n "checking for one-argument getmntent function""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + test $ac_cv_header_mntent_h = yes \ + && fu_cv_sys_mounted_getmntent1=yes \ + || fu_cv_sys_mounted_getmntent1=no +fi + + echo "$ac_t""$fu_cv_sys_mounted_getmntent1" 1>&6 + if test $fu_cv_sys_mounted_getmntent1 = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTENT1 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + echo "configure: warning: could not determine how to read list of mounted fs" 1>&2 + CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT" + fi + + fi + + if test -z "$list_mounted_fs"; then + # DEC Alpha running OSF/1. + echo $ac_n "checking for getfsstat function""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_getsstat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { return 0; } +int t() { +struct statfs *stats; + numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + fu_cv_sys_mounted_getsstat=yes +else + rm -rf conftest* + fu_cv_sys_mounted_getsstat=no +fi +rm -f conftest* + +fi + + echo "$ac_t""$fu_cv_sys_mounted_getsstat" 1>&6 + if test $fu_cv_sys_mounted_getsstat = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_GETFSSTAT 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + # AIX. + echo $ac_n "checking for mntctl function and struct vmount""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_vmount'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_vmount=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + fu_cv_sys_mounted_vmount=no +fi +rm -f conftest* +fi + + echo "$ac_t""$fu_cv_sys_mounted_vmount" 1>&6 + if test $fu_cv_sys_mounted_vmount = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_VMOUNT 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + # SVR3 + echo $ac_n "checking for existence of three headers""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread_fstyp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_fread_fstyp=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + fu_cv_sys_mounted_fread_fstyp=no +fi +rm -f conftest* +fi + + echo "$ac_t""$fu_cv_sys_mounted_fread_fstyp" 1>&6 + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_FREAD_FSTYP 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + echo $ac_n "checking for getmntinfo function""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ok= + if test $ac_cv_func_getmntinfo = yes; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "f_type;" >/dev/null 2>&1; then + rm -rf conftest* + ok=yes +fi +rm -f conftest* + + fi + test -n "$ok" \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + +fi + + echo "$ac_t""$fu_cv_sys_mounted_getmntinfo" 1>&6 + if test $fu_cv_sys_mounted_getmntinfo = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTINFO 1 +EOF + + fi + fi + + # FIXME: add a test for netbsd-1.1 here + + if test -z "$list_mounted_fs"; then + # Ultrix + echo $ac_n "checking for getmnt function""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_getmnt=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + fu_cv_sys_mounted_getmnt=no +fi +rm -f conftest* +fi + + echo "$ac_t""$fu_cv_sys_mounted_getmnt" 1>&6 + if test $fu_cv_sys_mounted_getmnt = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNT 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + # SVR2 + echo $ac_n "checking whether it is possible to resort to fread on /etc/mnttab""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_fread=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + fu_cv_sys_mounted_fread=no +fi +rm -f conftest* +fi + + echo "$ac_t""$fu_cv_sys_mounted_fread" 1>&6 + if test $fu_cv_sys_mounted_fread = yes; then + list_mounted_fs=found + cat >> confdefs.h <<\EOF +#define MOUNTED_FREAD 1 +EOF + + fi + fi + + if test -z "$list_mounted_fs"; then + echo "configure: warning: could not determine how to read list of mounted fs" 1>&2 + CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT" + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions + fi + + + echo "checking how to get filesystem space usage" 1>&6 + space=no + + # Here we'll compromise a little (and perform only the link test) + # since it seems there are no variants of the statvfs function. + if test $space = no; then + # SVR4 + for ac_func in statvfs +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_func_statvfs = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATVFS 1 +EOF + + fi + fi + + if test $space = no; then + # DEC Alpha running OSF/1 + echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs3_osf1=no +else +cat > conftest.$ac_ext < +#include +#include + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd, sizeof (struct statfs))); + } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + fu_cv_sys_stat_statfs3_osf1=yes +else + fu_cv_sys_stat_statfs3_osf1=no +fi +fi +rm -fr conftest* +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6 + if test $fu_cv_sys_stat_statfs3_osf1 = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS3_OSF1 1 +EOF + + fi + fi + + if test $space = no; then + # AIX + echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_bsize=no +else +cat > conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_bsize = 0; + exit (statfs (".", &fsd)); + } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + fu_cv_sys_stat_statfs2_bsize=yes +else + fu_cv_sys_stat_statfs2_bsize=no +fi +fi +rm -fr conftest* +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6 + if test $fu_cv_sys_stat_statfs2_bsize = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_BSIZE 1 +EOF + + fi + fi + + if test $space = no; then + # SVR3 + echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs4=no +else +cat > conftest.$ac_ext < +#include + main () + { + struct statfs fsd; + exit (statfs (".", &fsd, sizeof fsd, 0)); + } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + fu_cv_sys_stat_statfs4=yes +else + fu_cv_sys_stat_statfs4=no +fi +fi +rm -fr conftest* +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6 + if test $fu_cv_sys_stat_statfs4 = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS4 1 +EOF + + fi + fi + + if test $space = no; then + # 4.4BSD and NetBSD + echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_fsize=no +else +cat > conftest.$ac_ext < +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd)); + } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + fu_cv_sys_stat_statfs2_fsize=yes +else + fu_cv_sys_stat_statfs2_fsize=no +fi +fi +rm -fr conftest* +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6 + if test $fu_cv_sys_stat_statfs2_fsize = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FSIZE 1 +EOF + + fi + fi + + if test $space = no; then + # Ultrix + echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_fs_data=no +else +cat > conftest.$ac_ext < +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#endif + main () + { + struct fs_data fsd; + /* Ultrix's statfs returns 1 for success, + 0 for not mounted, -1 for failure. */ + exit (statfs (".", &fsd) != 1); + } +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + fu_cv_sys_stat_fs_data=yes +else + fu_cv_sys_stat_fs_data=no +fi +fi +rm -fr conftest* +fi + + echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6 + if test $fu_cv_sys_stat_fs_data = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FS_DATA 1 +EOF + + fi + fi + + + + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for umode_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_umode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "umode_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_umode_t=yes +else + rm -rf conftest* + ac_cv_type_umode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_umode_t" 1>&6 +if test $ac_cv_type_umode_t = no; then + cat >> confdefs.h <<\EOF +#define umode_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + + +for ac_func in valloc getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap=no +else +cat > conftest.$ac_ext < +#include +#include + +#ifndef HAVE_GETPAGESIZE +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# else +# ifdef NBPC +# define getpagesize() NBPC +# else +# define getpagesize() PAGESIZE /* SVR4 */ +# endif +# endif +# endif +#endif + +#ifndef HAVE_VALLOC +# define valloc malloc +#endif + +#ifdef __cplusplus +extern "C" { void *valloc(unsigned), *malloc(unsigned); } +#else +char *valloc(), *malloc(); +#endif + +int +main() +{ + char *buf1, *buf2, *buf3; + int i = getpagesize(), j; + int i2 = i * 2; + int fd; + + buf1 = (char *)valloc(i2); + buf2 = (char *)valloc(i); + buf3 = (char *)malloc(i2); + for (j = 0; j < i2; ++j) + *(buf1 + j) = rand(); + fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); + write(fd, buf1, i2); + mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); + for (j = 0; j < i; ++j) + if (*(buf1 + j) != *(buf2 + j)) + exit(1); + lseek(fd, (long)i, 0); + read(fd, buf2, i); /* read into mapped memory -- file should not change */ + /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ + lseek(fd, (long)0, 0); + read(fd, buf3, i2); + for (j = 0; j < i2; ++j) + if (*(buf1 + j) != *(buf3 + j)) + exit(1); + exit(0); +} + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_func_mmap=yes +else + ac_cv_func_mmap=no +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_func_mmap" 1>&6 +if test $ac_cv_func_mmap = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { return 0; } +int t() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + +int main() { return 0; } +int t() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + ac_cv_func_alloca=yes +else + rm -rf conftest* + ac_cv_func_alloca=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_func_alloca" 1>&6 +if test $ac_cv_func_alloca = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.o + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else +cat > conftest.$ac_ext < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <&6 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +if test "x$with_x" = xno; then + no_x=yes +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + no_x= + else +if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +no_x=yes +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + no_x= + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$no_x" = yes; then +test -z "$x_direct_test_library" && x_direct_test_library=Xt +test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc +test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h +cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + no_x= ac_x_includes= +else + echo "$ac_err" >&5 + rm -rf conftest* + for ac_dir in \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + no_x= ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* + +# Check for the libraries. +# See if we find them without any special options. +# Don't add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <&6 +else + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING" +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would be nice to have a more robust check for the -R ld option than + # just checking for Solaris. + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + if test "`(uname) 2>/dev/null`" = SunOS && + uname -r | grep '^5' >/dev/null; then + X_LIBS="$X_LIBS -R $x_libraries" + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + + ac_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for -lICE""... $ac_c" 1>&6 +ac_lib_var=`echo ICE | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lICE $LIBS" +cat > conftest.$ac_ext <&6 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + + # Check for system-dependent libraries X programs must link with. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for -ldnet""... $ac_c" 1>&6 +ac_lib_var=`echo dnet | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet $LIBS" +cat > conftest.$ac_ext <&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_lib_dnet = no; then + echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6 +ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Not sure which flavor of 386 UNIX this is, but it seems harmless to + # check for it. + echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 +ac_lib_var=`echo nsl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT 2.0. + # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. + if test "`(uname) 2>/dev/null`" != IRIX; then + echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 +ac_lib_var=`echo socket | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi +fi + + +xvers="none" +mxc="" + +no_xview=yes +# Check whether --with-xview or --without-xview was given. +if test "${with_xview+set}" = set; then + withval="$with_xview" + no_xview= +fi + + +# Check whether --with-xview-includes or --without-xview-includes was given. +if test "${with_xview_includes+set}" = set; then + withval="$with_xview_includes" + +if test x$withval = xyes; then + echo "configure: warning: Usage is: --with-xview-includes=path" 1>&2 + xview_includes=NONE + no_xview= +else + xview_includes=$withval +fi + +else + +xview_includes=NONE + +fi +# Check whether --with-xview-libraries or --without-xview-libraries was given. +if test "${with_xview_libraries+set}" = set; then + withval="$with_xview_libraries" + +if test x$withval = xyes; then + echo "configure: warning: Usage is: --with-xview-libraries=path" 1>&2 + xview_libraries=NONE + no_xview= +else + xview_libraries=$withval +fi + +else + +xview_libraries=NONE + +fi + +if test "$no_xview" != yes; then + if test "$no_x" = yes; then + no_xview=yes + fi +fi +if test "$no_xview" != yes; then +echo $ac_n "checking for XView""... $ac_c" 1>&6 +if test x$xview_libraries = xNONE; then + if test x$xview_includes = xNONE; then +if eval "test \"`echo '$''{'ac_cv_path_xview'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + no_xview=yes +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +#include +acfindxv: + @echo 'ac_im_library_dest="${LIBRARY_DEST}"; ac_im_header_dest="${HEADER_DEST}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + no_xview= + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `make acfindxv 2>/dev/null | grep -v make` + # Screen out bogus values from the imake configuration. + if test -f "$ac_im_header_dest/xview/xview.h"; then + ac_xview_includes="$ac_im_header_dest" + else + no_xview=yes + fi + if test -d "$ac_im_library_dest"; then + ac_xview_libraries="$ac_im_library_dest" + else + no_xview=yes + fi + fi + if test "x$no_xview" != xyes; then + if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then + ac_xview_no_private_headers= + else + ac_xview_no_private_headers=yes + fi + fi + cd .. + rm -fr conftestdir +fi + + if test "x$no_xview" = xyes; then +test -z "$xview_direct_test_library" && xview_direct_test_library=xview +test -z "$xview_direct_test_function" && xview_direct_test_function=xv_unique_key +test -z "$xview_direct_test_include" && xview_direct_test_include=xview/xview.h +cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + no_xview= ac_xview_includes= +else + echo "$ac_err" >&5 + rm -rf conftest* + for ac_dir in \ + $OPENWINHOME/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + ; \ + do + if test -r "$ac_dir/$xview_direct_test_include"; then + no_xview= ac_xview_includes=$ac_dir + break + fi + done +fi +rm -f conftest* + +if test "x$no_xview" != xyes; then + if test "x$ac_xview_includes" != x; then + if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then + ac_xview_no_private_headers= + else + ac_xview_no_private_headers=yes + fi + else +cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_xview_no_private_headers= +else + echo "$ac_err" >&5 + rm -rf conftest* + ac_xview_no_private_headers=yes +fi +rm -f conftest* + fi +fi + +# Check for the libraries. +# See if we find them without any special options. +# Don't add to $LIBS permanently. +ac_save_LIBS="$LIBS" +ac_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $X_LIBS" +LIBS="-l$xview_direct_test_library -lolgx $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" +cat > conftest.$ac_ext < + +int main() { return 0; } +int t() { +${xview_direct_test_function}() +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" no_xview= ac_xview_libraries= +else + rm -rf conftest* + LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_xview_includes" | sed s/include/lib/` \ + $OPENWINHOME/lib \ + $OPENWINHOME/share/lib \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + /usr/local/lib/X11 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${xview_direct_test_library}.$ac_extension; then + no_xview= ac_xview_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* + + fi + if test "x$no_xview" = xyes; then + ac_cv_path_xview="no_xview=yes" + else + ac_cv_path_xview="no_xview= ac_xview_includes=$ac_xview_includes ac_xview_libraries=$ac_xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers" + fi + +fi + eval "$ac_cv_path_xview" + fi +fi + +if test "x$no_xview" = xyes; then + echo "$ac_t""no" 1>&6 +else + if test "x$xview_includes" = x || test "x$xview_includes" = xNONE; then + xview_includes=$ac_xview_includes + fi + if test "x$xview_libraries" = x || test "x$xview_libraries" = xNONE; then + xview_libraries=$ac_xview_libraries + fi + xview_no_private_headers=$ac_xview_no_private_headers + ac_cv_path_xview="no_xview= ac_xview_includes=$xview_includes ac_xview_libraries=$xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers" + if test "x$xview_libraries" != x; then + ac_msg_xview="libraries $xview_libraries" + else + ac_msg_xview="" + fi + if test "x$xview_includes" != x; then + if test "x$ac_msg_xview" != x; then + ac_msg_xview="$ac_msg_xview, " + fi + ac_msg_xview="${ac_msg_xview}headers $xview_includes" + fi + if test "x$xview_no_private_headers" = xyes; then + if test "x$ac_msg_xview" != x; then + ac_msg_xview="$ac_msg_xview, " + fi + ac_msg_xview="${ac_msg_xview}without xview_private headers" + fi + echo "$ac_t""$ac_msg_xview" 1>&6 +fi +fi + +if test "$no_xview" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + XVIEW_CFLAGS="$X_CFGLAGS $XVIEW_CFLAGS -DXVIEW_MISSING" +else + if test -n "$xview_includes"; then + XVIEW_CFLAGS="$X_CFLAGS $XVIEW_CFGLAGS" + if test "$xview_includes" != "$x_includes"; then + XVIEW_CPPFLAGS="-I$xview_includes" + fi + fi + + # It would be nice to have a more robust check for the -R ld option than + # just checking for Solaris. + # It would also be nice to do this for all -L options, not just this one. + if test -n "$xview_libraries"; then + if test "$xview_libraries" = "$x_libraries"; then + XVIEW_LIBS="$X_LIBS $XVIEW_LIBS" + else + XVIEW_LIBS="$X_LIBS $XVIEW_LIBS -L$xview_libraries" + if test "`(uname) 2>/dev/null`" = SunOS && + uname -r | grep '^5' >/dev/null; then + XVIEW_LIBS="$XVIEW_LIBS -R$xview_libraries" + fi + fi + fi +fi +if test "x$no_xview" = xyes; then + HAVE_XVIEW=no +else + HAVE_XVIEW=yes +fi +if test "x$xview_no_private_headers" = xyes; then + HAVE_XVIEW_PRIVATE_HEADERS=no +else + HAVE_XVIEW_PRIVATE_HEADERS=yes +fi + +if test "x$no_xview" != "xyes"; then + mxc="mxc" + xvers="XView" + xvdep="xvdep" +else + mxc="" + xvdep="" +fi + + + +xv_bindir= +if test -n "$mxc"; then +# Check whether --with-xv-bindir or --without-xv-bindir was given. +if test "${with_xv_bindir+set}" = set; then + withval="$with_xv_bindir" + + if test x$withval = xyes; then + echo "configure: warning: Usage is: --with-xv-bindir=basedir" 1>&2 + else + if test x$withval = xno; then + echo "configure: warning: Usage is: --with-xv-bindir=basedir" 1>&2 + else + xv_bindir=$withval + fi + fi + +fi + +if test x$xv_bindir = x; then + xv_bindir=`echo $xv_includes | sed s/include/bin/` + if test ! -x $xv_bindir/openwin; then + if test ! -x $xv_bindir/olwm; then + if test ! -x $xv_bindir/olvwm; then + xv_bindir= + fi + fi + fi +fi +if test x$xv_bindir = x; then + if test "$OPENWINHOME"; then + xv_bindir=$OPENWINHOME/bin + else + # Extract the first word of "openwin", so it can be a program name with args. +set dummy openwin; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_ac_my_xp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ac_my_xp" in + /*) + ac_cv_path_ac_my_xp="$ac_my_xp" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ac_my_xp="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +ac_my_xp="$ac_cv_path_ac_my_xp" +if test -n "$ac_my_xp"; then + echo "$ac_t""$ac_my_xp" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test x$ac_my_xp = x; then + # Extract the first word of "X", so it can be a program name with args. +set dummy X; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_ac_my_xp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ac_my_xp" in + /*) + ac_cv_path_ac_my_xp="$ac_my_xp" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ac_my_xp="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +ac_my_xp="$ac_cv_path_ac_my_xp" +if test -n "$ac_my_xp"; then + echo "$ac_t""$ac_my_xp" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test x$ac_my_xp = x; then + xv_bindir="" + else + xv_bindir=`basename $ac_my_xp` + fi + else + xv_bindir=`basename $ac_my_xp` + fi + fi + if test ! -x $xv_bindir/openwin; then + if test ! -x $xv_bindir/olwm; then + if test ! -x $xv_bindir/olvwm; then + if test ! -x $xv_bindir/X; then + xv_bindir= + fi + fi + fi + fi +fi +if test x$xv_bindir = x; then + xv_bindir=$prefix/bin +fi +fi +if test x$xv_bindir = xNONE/bin; then + xv_bindir= +fi + + + +echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 +ac_lib_var=`echo nsl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 +ac_lib_var=`echo socket | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi + + +have_socket=no +for ac_func in socket +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test $have_socket = no; then + # socket is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + echo $ac_n "checking for -l$lib""... $ac_c" 1>&6 +ac_lib_var=`echo $lib | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$lib $LIBS" +cat > conftest.$ac_ext <&6 + + LIBS="$LIBS -l$lib" + have_socket=yes + cat >> confdefs.h <<\EOF +#define HAVE_SOCKET 1 +EOF + + break +else + echo "$ac_t""no" 1>&6 +fi + + done +fi + +have_gethostbyname=no +echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char gethostbyname(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_gethostbyname=yes +else + echo "$ac_t""no" 1>&6 +fi + +if test $have_gethostbyname = no; then + # gethostbyname is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + echo $ac_n "checking for -l$lib""... $ac_c" 1>&6 +ac_lib_var=`echo $lib | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$lib $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break +else + echo "$ac_t""no" 1>&6 +fi + + done +fi + +for ac_func in socketpair +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +echo $ac_n "checking for -lseq""... $ac_c" 1>&6 +ac_lib_var=`echo seq | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lseq $LIBS" +cat > conftest.$ac_ext <&6 + + LIBS="$LIBS -lseq" + cat >> confdefs.h <<\EOF +#define HAVE_GET_PROCESS_STATS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +NETFILES="" +vfs_flags="tarfs" +use_net_code=false +if test $have_socket = yes; then + +av_struct_linger=no +echo $ac_n "checking struct linger is available""... $ac_c" 1>&6 +if test "$cross_compiling" = yes; then + +av_struct_linger=no + +else +cat > conftest.$ac_ext < +#include + +struct linger li; + +main () +{ + li.l_onoff = 1; + li.l_linger = 120; + exit (0); +} + +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + +cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINGER 1 +EOF + +av_struct_linger=yes + +else + +av_struct_linger=no + +fi +fi +rm -fr conftest* +echo "$ac_t""$av_struct_linger" 1>&6 + + for ac_func in pmap_set +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +echo $ac_n "checking for -lrpc""... $ac_c" 1>&6 +ac_lib_var=`echo rpc | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lrpc $LIBS" +cat > conftest.$ac_ext <&6 + + LIBS="-lrpc $LIBS" + cat >> confdefs.h <<\EOF +#define HAVE_PMAP_SET 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + +fi +done + + for ac_func in pmap_getport pmap_getmaps rresvport +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_hdr in rpc/pmap_clnt.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + vfs_flags="$vfs_flags, mcfs, ftpfs" + NETFILES="\$(NETFILES)" + use_net_code=true +fi + + +screen_manager=unknown +search_ncurses=false + +CFLAGS=${CFLAGS--O} +LDFLAGS=${LDFLAGS--O} + + + + + + + +XCURSES="" + + + +# Check whether --with-sco or --without-sco was given. +if test "${with_sco+set}" = set; then + withval="$with_sco" + + if test x$withval = xyes; then + cat >> confdefs.h <<\EOF +#define SCO_FLAVOR 1 +EOF + + CFLAGS="$CFLAGS -D_SVID3" + fi + +fi + + +# Check whether --with-sunos-curses or --without-sunos-curses was given. +if test "${with_sunos_curses+set}" = set; then + withval="$with_sunos_curses" + + if test x$withval = xyes; then + + search_ncurses=false + screen_manager="SunOS 4.x /usr/5include curses" + echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6 + cat >> confdefs.h <<\EOF +#define SUNOS_CURSES 1 +EOF + + cat >> confdefs.h <<\EOF +#define NO_COLOR_SUPPORT 1 +EOF + + cat >> confdefs.h <<\EOF +#define USE_SYSV_CURSES 1 +EOF + + CPPFLAGS="$CPPFLAGS -I/usr/5include" + XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" + echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 + echo "configure: warning: Reconsider using Slang" 1>&2 + + fi + +fi + + +# Check whether --with-osf1-curses or --without-osf1-curses was given. +if test "${with_osf1_curses+set}" = set; then + withval="$with_osf1_curses" + + if test x$withval = xyes; then + + echo "$ac_t""Using OSF1 curses" 1>&6 + search_ncurses=false + screen_manager="OSF1 curses" + cat >> confdefs.h <<\EOF +#define NO_COLOR_SUPPORT 1 +EOF + + cat >> confdefs.h <<\EOF +#define USE_SYSV_CURSES 1 +EOF + + XCURSES="xcurses.o" + LIBS="$LIBS -lcurses" + + fi + +fi + + +# Check whether --with-vcurses or --without-vcurses was given. +if test "${with_vcurses+set}" = set; then + withval="$with_vcurses" + if test x$withval = xyes; then + CPPFLAGS="$CPPFLAGS" + else + CPPFLAGS="$CPPFLAGS -I$withval" + fi + + echo "$ac_t""Using SysV curses" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_SYSV_CURSES 1 +EOF + + XCURSES="" + search_ncurses=false + screen_manager="SysV/curses" + LIBS="$LIBS -lcurses" + + +fi + + +mouse_lib="xterm only" +# Check whether --with-gpm-mouse or --without-gpm-mouse was given. +if test "${with_gpm_mouse+set}" = set; then + withval="$with_gpm_mouse" + + if test x$withval != xno + then + if test x$withval != xyes + then + LIBS="$LIBS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + fi + cat >> confdefs.h <<\EOF +#define HAVE_LIBGPM 1 +EOF + + mouse_lib="GPM and xterm" + LIBS="$LIBS -lgpm" + fi + +else + + echo $ac_n "checking for -lgpm""... $ac_c" 1>&6 +ac_lib_var=`echo gpm | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS $LIBS" +cat > conftest.$ac_ext <&6 + + cat >> confdefs.h <<\EOF +#define HAVE_LIBGPM 1 +EOF + + mouse_lib="GPM and xterm" + LIBS="$LIBS -lgpm" +else + echo "$ac_t""no" 1>&6 + + if test $system = Linux + then + echo "configure: warning: "libgpm.a is missing or older than 0.18"" 1>&2 + fi + +fi + + + +fi + + +# Check whether --with-ncurses or --without-ncurses was given. +if test "${with_ncurses+set}" = set; then + withval="$with_ncurses" + if test x$withval = xyes + then + search_ncurses=true + else + LIBS="$LIBS -L$withval/lib -lncurses" + CPPFLAGS="$CPPFLAGS -I$withval/include" + search_ncurses=false + screen_manager="ncurses" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + +fi + + +# Check whether --with-hsc or --without-hsc was given. +if test "${with_hsc+set}" = set; then + withval="$with_hsc" + if test x$withval = xyes; then + cat >> confdefs.h <<\EOF +#define HSC_PROXY 1 +EOF + + fi + +fi + + + + +tkmc="" +tk_includes="" +tk_libs="" +if test x$no_x != xyes; then + # Check whether --with-tk or --without-tk was given. +if test "${with_tk+set}" = set; then + withval="$with_tk" + + if test x$withval = xyes; then + tkmc="tkmc" + fi +fi + + # Check whether --with-tk-includes or --without-tk-includes was given. +if test "${with_tk_includes+set}" = set; then + withval="$with_tk_includes" + + if test x$withval = xyes; then + echo "configure: warning: Usage is: --with-tk-includes=dir" 1>&2 + else + if test x$withval = xno; then + echo "configure: warning: Usage is: --with-tk-includes=dir" 1>&2 + else + tk_includes="-I$withval" + tkmc="tkmc" + fi + fi +fi + + # Check whether --with-tk-libraries or --without-tk-libraries was given. +if test "${with_tk_libraries+set}" = set; then + withval="$with_tk_libraries" + + if test x$withval = xyes; then + echo "configure: warning: Usage is: --with-tk-libraries=dir" 1>&2 + else + if test x$withval = xno; then + echo "configure: warning: Usage is: --with-tk-libraries=dir" 1>&2 + else + tk_libs="-L$withval" + tkmc="tkmc" + fi + fi +fi + + if test -n "$tkmc"; then + echo "checking for Tcl/Tk" 1>&6 + echo $ac_n "checking for -ldl""... $ac_c" 1>&6 +ac_lib_var=`echo dl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -ldl" +else + echo "$ac_t""no" 1>&6 +fi + + tk_headers_found=no + if test ! -n "$tk_includes"; then + ac_safe=`echo "tcl.h" | tr './\055' '___'` +echo $ac_n "checking for tcl.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_in_path_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_header_in_path=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + + ac_header_in_path_found=no + for ac_header_in_path_value in $include_additional_path; do + ac_in_path_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$ac_header_in_path_value" + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + +ac_header_in_path_found=yes +ac_header_in_path=$ac_header_in_path_value + +else + echo "$ac_err" >&5 +fi +rm -f conftest* + CPPFLAGS=$ac_in_path_save_CPPFLAGS + if test x$ac_header_in_path_found = xyes; then + break + fi + done + if test $ac_header_in_path_found = xno; then + ac_header_in_path=no + fi + +fi +rm -f conftest* + eval "ac_cv_header_in_path_$ac_safe=$ac_header_in_path" + +fi +eval "ac_header_in_path=`echo '$ac_cv_header_in_path_'$ac_safe`" +if test "$ac_header_in_path" = no; then + echo "$ac_t""no" 1>&6 +else + if test -n "$ac_header_in_path"; then + echo "$ac_t""$ac_header_in_path" 1>&6 + else + echo "$ac_t""yes" 1>&6 + fi + if test x$ac_header_in_path = xyes; then + ac_header_in_path= + eval "ac_cv_header_in_path_$ac_safe=" + fi + + ac_safe=`echo "tk.h" | tr './\055' '___'` +echo $ac_n "checking for tk.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_in_path_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_header_in_path=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + + ac_header_in_path_found=no + for ac_header_in_path_value in $include_additional_path; do + ac_in_path_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$ac_header_in_path_value" + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + +ac_header_in_path_found=yes +ac_header_in_path=$ac_header_in_path_value + +else + echo "$ac_err" >&5 +fi +rm -f conftest* + CPPFLAGS=$ac_in_path_save_CPPFLAGS + if test x$ac_header_in_path_found = xyes; then + break + fi + done + if test $ac_header_in_path_found = xno; then + ac_header_in_path=no + fi + +fi +rm -f conftest* + eval "ac_cv_header_in_path_$ac_safe=$ac_header_in_path" + +fi +eval "ac_header_in_path=`echo '$ac_cv_header_in_path_'$ac_safe`" +if test "$ac_header_in_path" = no; then + echo "$ac_t""no" 1>&6 +else + if test -n "$ac_header_in_path"; then + echo "$ac_t""$ac_header_in_path" 1>&6 + else + echo "$ac_t""yes" 1>&6 + fi + if test x$ac_header_in_path = xyes; then + ac_header_in_path= + eval "ac_cv_header_in_path_$ac_safe=" + fi + + tk_headers_found=yes + if test -n "$ac_cv_header_in_path_tcl_h"; then + tk_includes="-I$ac_cv_header_in_path_tcl_h"; + fi + if test -n "$ac_cv_header_in_path_tk_h"; then + if test "$ac_cv_header_in_path_tk_h" != "$ac_cv_header_in_path_tcl_h"; then + tk_includes="$tk_includes -I$ac_cv_header_in_path_tk_h" + fi + fi + +fi + + +fi + + else + tk_headers_found=yes + fi + if test $tk_headers_found = no; then + tkmc="" + else + tk_libs_found=no + ac_save_tk_LIBS="$LIBS" + ac_save_tk_LDFLAGS="$LDFLAGS" + LIBS="$X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + LDFLAGS="$LDFLAGS $X_LIBS" + if test ! -n "$tk_libs"; then + echo $ac_n "checking for -ltcl""... $ac_c" 1>&6 +ac_lib_var=`echo tcl | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltcl -lm $LIBS" +cat > conftest.$ac_ext <&6 + + echo $ac_n "checking for -ltk""... $ac_c" 1>&6 +ac_lib_var=`echo tk | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltk -ltcl -lm $LIBS" +cat > conftest.$ac_ext <&6 + + tk_libs_found=yes + +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 +fi + + else + tk_libs_found=yes + fi + LDFLAGS="$ac_save_tk_LDFLAGS" + LIBS="$ac_save_tk_LIBS" + if test $tk_libs_found = no; then + tkmc="" + fi + fi + fi +fi +if test -n "$tkmc"; then + + if test x$xvers = xnone; then + xvers="Tk" + else + xvers="XView+Tk" + fi + + tkdep="tkdep" +else + tkdep="" +fi + + + + + +gmc="" +gmcdep="" +if test x$no_x != xyes; then + # Check whether --with-gnome or --without-gnome was given. +if test "${with_gnome+set}" = set; then + withval="$with_gnome" + + if test x$withval = xyes; then + gmc=gmc + gmcdep=gmcdep + if test x"$xvers" = xnone; then + xvers="Gnome" + else + xvers="Gnome+$xvers" + fi + fi +fi + +fi + + + +# Extract the first word of "nroff", so it can be a program name with args. +set dummy nroff; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_HAVE_nroff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$HAVE_nroff"; then + ac_cv_prog_HAVE_nroff="$HAVE_nroff" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_HAVE_nroff="true" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_HAVE_nroff" && ac_cv_prog_HAVE_nroff="false" +fi +fi +HAVE_nroff="$ac_cv_prog_HAVE_nroff" +if test -n "$HAVE_nroff"; then + echo "$ac_t""$HAVE_nroff" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if $HAVE_nroff; then + echo $ac_n "checking for manual formatting macros""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_mandoc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null + if test $? = 0 + then + ac_cv_mandoc=-mandoc + else + ac_cv_mandoc=-man + fi + +fi + + MANDOC=$ac_cv_mandoc + echo "$ac_t""$MANDOC" 1>&6 +else + MANDOC=-man +fi + + +if $HAVE_nroff; then + echo $ac_n "checking If nroff accepts -Tascii""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_nroff_tascii'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null + if test $? = 0 + then + ac_cv_nroff_tascii=" -Tascii" + echo "$ac_t""yes" 1>&6 + else + ac_cv_nroff_tascii="" + echo "$ac_t""no" 1>&6 + fi + +fi + +fi +TROFFASCII="$ac_cv_nroff_tascii" + + +# Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_HAVE_FILECMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$HAVE_FILECMD"; then + ac_cv_prog_HAVE_FILECMD="$HAVE_FILECMD" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_HAVE_FILECMD="true" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_HAVE_FILECMD" && ac_cv_prog_HAVE_FILECMD="false" +fi +fi +HAVE_FILECMD="$ac_cv_prog_HAVE_FILECMD" +if test -n "$HAVE_FILECMD"; then + echo "$ac_t""$HAVE_FILECMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if $HAVE_FILECMD; then + echo $ac_n "checking for - option to file command""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_filestdin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.c < conftest.sed </dev/null | sed -f conftest.sed` + filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed` + if test "$filehyphen_1" = "$filehyphen_2"; then + ac_cv_filestdin=yes + else + ac_cv_filestdin=no + fi + + rm conftest.c conftest.sed + unset filehyphen_1 + unset filehyphen_2 + +fi + + + if test x$ac_cv_filestdin = xyes; then + cat >> confdefs.h <<\EOF +#define FILE_STDIN 1 +EOF + + fi + filestdin=$ac_cv_filestdin + echo "$ac_t""$filestdin" 1>&6 + + +echo $ac_n "checking for -L option to file command""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_filel'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +file -L . > /dev/null 2>&1 +if test $? = 0 +then + ac_cv_filel=yes +else + ac_cv_filel=no +fi + +fi + +if test x$ac_cv_filel = xyes; then + cat >> confdefs.h <<\EOF +#define FILE_L 1 +EOF + +fi +filel=$ac_cv_filel +echo "$ac_t""$filel" 1>&6 +fi + +echo $ac_n "checking for - option to grep command""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_grep_stdin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + grep ac_cv_grep_stdin - > /dev/null 2>&1 < ./configure + if test $? = 0; then + ac_cv_grep_stdin=yes + else + ac_cv_grep_stdin=no + fi + +fi + +if test x$ac_cv_grep_stdin = xyes; then + cat >> confdefs.h <<\EOF +#define GREP_STDIN 1 +EOF + +fi +echo "$ac_t""$ac_cv_grep_stdin" 1>&6 + + +have_dusum=yes +echo $ac_n "checking for du arguments""... $ac_c" 1>&6 +# Check whether --with-dusum or --without-dusum was given. +if test "${with_dusum+set}" = set; then + withval="$with_dusum" + + if test x$withval = xno; then + have_dusum=no + fi + +fi + +if test x$have_dusum = xyes; then + cat >> confdefs.h <<\EOF +#define HAVE_DUSUM 1 +EOF + + if eval "test \"`echo '$''{'ac_cv_dusum'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + du -s -b $srcdir/configure >/dev/null 2>&1 + if test $? = 0; then + ac_cv_dusum='dusum_useb=yes; dusum_factor=1' + else + ac_cv_dusum='dusum_useb=; dusum_factor=512' + fi + +fi + + eval "$ac_cv_dusum" + if test x$dusum_useb = xyes; then + cat >> confdefs.h <<\EOF +#define DUSUM_USEB 1 +EOF + + echo "$ac_t""-b" 1>&6 + else + echo "$ac_t""block size $dusum_factor" 1>&6 + fi + cat >> confdefs.h <> confdefs.h <<\EOF +#define USE_TERMNET 1 +EOF + + termnet=true + fi + +fi + + + +echo $ac_n "checking for subshell support""... $ac_c" 1>&6 +# Check whether --with-subshell or --without-subshell was given. +if test "${with_subshell+set}" = set; then + withval="$with_subshell" + result=no + if test x$withval = xoptional + then + cat >> confdefs.h <<\EOF +#define SUBSHELL_OPTIONAL 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_SUBSHELL_SUPPORT 1 +EOF + + result="optional" + fi + if test x$withval = xyes + then + cat >> confdefs.h <<\EOF +#define HAVE_SUBSHELL_SUPPORT 1 +EOF + + result="yes" + fi +else + if test $system = ULTRIX + then + result=no + else + cat >> confdefs.h <<\EOF +#define HAVE_SUBSHELL_SUPPORT 1 +EOF + + result=yes + fi + +fi + +echo "$ac_t""$result" 1>&6 +subshell="$result" + +if test x$GCC = x +then + cat >> confdefs.h <<\EOF +#define OLD_TOOLS 1 +EOF + + CPPFLAGS="$CPPFLAGS -Dinline=" +fi + +mem_debug="none" +# Check whether --with-debug or --without-debug was given. +if test "${with_debug+set}" = set; then + withval="$with_debug" + if test x$withval = xyes; then + CFLAGS="$CFLAGS -Wall" + mem_debug="Janne's MAD library" + cat >> confdefs.h <<\EOF +#define HAVE_MAD 1 +EOF + + cat >> confdefs.h <<\EOF +#define MCDEBUG 1 +EOF + + if echo `uname -s -r` | grep -q 'SunOS 4.1' + then + CFLAGS="$CFLAGS -Wno-implicit" + fi + if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then + : + else + if test $cc_uses_g = yes; then + CFLAGS="$CFLAGS -g" + fi + fi + echo "$ac_t""compiling with -Wall and the memory leak detector" 1>&6 +fi +fi + + +# Check whether --with-efence or --without-efence was given. +if test "${with_efence+set}" = set; then + withval="$with_efence" + if test x$withval = xyes; then + CFLAGS="$CFLAGS -Wall" + cat >> confdefs.h <<\EOF +#define MCDEBUG 1 +EOF + + LIBS="$LIBS -lefence" + if echo `uname -s -r` | grep -q 'SunOS 4.1' + then + CFLAGS="$CFLAGS -Wno-implicit" + fi + if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then + : + else + if test $cc_uses_g = yes; then + CFLAGS="$CFLAGS -g" + fi + fi + echo "$ac_t""compiling with -Wall and Electric fence" 1>&6 + mem_debug="Electric Fence" +fi +fi + + +# Check whether --with-mmap or --without-mmap was given. +if test "${with_mmap+set}" = set; then + withval="$with_mmap" + if test x$withval = xyes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + + echo "$ac_t""forcing MMAP support" 1>&6 +fi +fi + + + + + + +slang_check_lib=true +slang_term="" +slang_use_system_installed_lib=false +echo $ac_n "checking for -lslang""... $ac_c" 1>&6 +ac_lib_var=`echo slang | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lslang $LIBS" +cat > conftest.$ac_ext <&6 + for ac_hdr in slang.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + if test x$ac_cv_header_slang_h = xyes + then + slang_use_system_installed_lib=true + slang_check_lib=false + else + for ac_hdr in slang/slang.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + if test x$ac_cv_header_slang_slang_h = xyes + then + slang_use_system_installed_lib=true + slang_check_lib=false + cat >> confdefs.h <<\EOF +#define SLANG_H_INSIDE_SLANG_DIR 1 +EOF + + fi + fi + +else + echo "$ac_t""no" 1>&6 +fi + + +# Check whether --with-terminfo or --without-terminfo was given. +if test "${with_terminfo+set}" = set; then + withval="$with_terminfo" + + cat >> confdefs.h <<\EOF +#define SLANG_TERMINFO 1 +EOF + + echo "$ac_t""Using SLang screen manager/terminfo" 1>&6 + slang_term=" with terminfo" + + slang_check_lib=false + slang_use_system_installed_lib=false + + +fi + + +# Check whether --with-termcap or --without-termcap was given. +if test "${with_termcap+set}" = set; then + withval="$with_termcap" + + echo "$ac_t""Using SLang screen manager/termcap" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_TERMCAP 1 +EOF + + echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6 +ac_lib_var=`echo termcap | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -ltermcap" +else + echo "$ac_t""no" 1>&6 +fi + + slang_term=" with termcap" + + slang_check_lib=false + slang_use_system_installed_lib=false + + +fi + + +# Check whether --with-our-slang or --without-our-slang was given. +if test "${with_our_slang+set}" = set; then + withval="$with_our_slang" + + slang_use_system_installed_lib=false + slang_check_lib=true + + +fi + + + + +LIBSLANG="" +LSLANG="" +fastdepslang="" +# Check whether --with-slang or --without-slang was given. +if test "${with_slang+set}" = set; then + withval="$with_slang" + + if test x$withval = xyes; then + cat >> confdefs.h <<\EOF +#define HAVE_SLANG 1 +EOF + + search_ncurses=false + if $slang_use_system_installed_lib + then + cat >> confdefs.h <<\EOF +#define HAVE_SYSTEM_SLANG 1 +EOF + + LIBS="$LIBS -lslang" + screen_manager="SLang (using system-installed library)" + echo "$ac_t""Using system installed SLang library" 1>&6 + else + CPPFLAGS="$CPPFLAGS -I\$(slangdir)" + LIBSLANG="libmcslang.a" + screen_manager="SLang" + LSLANG="-lmcslang" + fastdepslang=fastdepslang + fi + if $slang_check_lib + then + use_terminfo=false + if test -d /usr/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/lib/terminfo; then + use_terminfo=true; + fi + if test -d /lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/share/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/terminfo; then + use_terminfo=true; + fi + if $use_terminfo; then + cat >> confdefs.h <<\EOF +#define SLANG_TERMINFO 1 +EOF + + echo "$ac_t""Using SLang screen manager/terminfo" 1>&6 + slang_term=" with terminfo" + + else + echo "$ac_t""Using SLang screen manager/termcap" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_TERMCAP 1 +EOF + + echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6 +ac_lib_var=`echo termcap | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -ltermcap" +else + echo "$ac_t""no" 1>&6 +fi + + slang_term=" with termcap" + + fi + fi + + fi + +fi + + + + + + +TERMNET="" + + + +LIBVFS="" +LVFS="" +fastdepvfs="" +mcserv="" +vfs_type="normal" +# Check whether --with-vfs or --without-vfs was given. +if test "${with_vfs+set}" = set; then + withval="$with_vfs" + if test x$withval = xyes + then + + cat >> confdefs.h <<\EOF +#define USE_VFS 1 +EOF + + if $use_net_code; then + cat >> confdefs.h <<\EOF +#define USE_NETCODE 1 +EOF + + fi + LIBVFS="libvfs.a" + LVFS="-lvfs" + fastdepvfs=fastdepvfs + if test $have_socket = yes; then + mcserv="mcserv" + if $termnet; then + TERMNET="-ltermnet" + fi + fi + CPPFLAGS="$CPPFLAGS -I\$(vfsdir)" + echo "$ac_t""Using the VFS switch code" 1>&6 + vfs_type="Midnight Commander Virtual File System" + + else + vfs_flags="" + fi +else + + cat >> confdefs.h <<\EOF +#define USE_VFS 1 +EOF + + if $use_net_code; then + cat >> confdefs.h <<\EOF +#define USE_NETCODE 1 +EOF + + fi + LIBVFS="libvfs.a" + LVFS="-lvfs" + fastdepvfs=fastdepvfs + if test $have_socket = yes; then + mcserv="mcserv" + if $termnet; then + TERMNET="-ltermnet" + fi + fi + CPPFLAGS="$CPPFLAGS -I\$(vfsdir)" + echo "$ac_t""Using the VFS switch code" 1>&6 + vfs_type="Midnight Commander Virtual File System" + + +fi + + + + + + + + +LIBEDIT_A="" +MCEDIT="" +LEDIT="" +EDIT_msg="" +# Check whether --with-edit or --without-edit was given. +if test "${with_edit+set}" = set; then + withval="$with_edit" + if test x$withval = xyes + then + + cat >> confdefs.h <<\EOF +#define USE_INTERNAL_EDIT 1 +EOF + + LIBEDIT_A="libedit.a" + MCEDIT="mcedit" + LEDIT="-ledit" + CPPFLAGS="$CPPFLAGS -I\$(rootdir)" + EDIT_msg="yes" + echo "$ac_t""will call internal editor" 1>&6 + + else + EDIT_msg="no" + fi +else + + cat >> confdefs.h <<\EOF +#define USE_INTERNAL_EDIT 1 +EOF + + LIBEDIT_A="libedit.a" + MCEDIT="mcedit" + LEDIT="-ledit" + CPPFLAGS="$CPPFLAGS -I\$(rootdir)" + EDIT_msg="yes" + echo "$ac_t""will call internal editor" 1>&6 + + +fi + + + + + +# Check whether --with-netrc or --without-netrc was given. +if test "${with_netrc+set}" = set; then + withval="$with_netrc" + + cat >> confdefs.h <<\EOF +#define USE_NETRC 1 +EOF + + echo "$ac_t""ftpfs will have .netrc parsing code" 1>&6 + +fi + + +undelfs_o="" + + +# Check whether --with-ext2undel or --without-ext2undel was given. +if test "${with_ext2undel+set}" = set; then + withval="$with_ext2undel" + + if test x$withval = xyes; + then + + for ac_hdr in ext2fs/ext2fs.h linux/ext2_fs.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + if test x$ac_cv_header_ext2fs_ext2fs_h = xyes + then + if test x$ac_cv_header_linux_ext2_fs_h = xyes + then + cat >> confdefs.h <<\EOF +#define USE_EXT2FSLIB 1 +EOF + + echo "$ac_t""With ext2fs file recovery code" 1>&6 + vfs_flags="${vfs_flags} undelfs" + undelfs_o="undelfs.o" + LIBS="$LIBS -lext2fs -lcom_err" + else + echo "configure: warning: No ext2fs file recovery code: linux/ext2_fs.h is missing" 1>&2 + fi + else + echo "configure: warning: No ext2fs file recovery code: ext2fs/ext2fs.h is missing" 1>&2 + fi + + fi +else + echo $ac_n "checking for -lext2fs""... $ac_c" 1>&6 +ac_lib_var=`echo ext2fs | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lext2fs -lcom_err $LIBS" +cat > conftest.$ac_ext <&6 + + for ac_hdr in ext2fs/ext2fs.h linux/ext2_fs.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done + + if test x$ac_cv_header_ext2fs_ext2fs_h = xyes + then + if test x$ac_cv_header_linux_ext2_fs_h = xyes + then + cat >> confdefs.h <<\EOF +#define USE_EXT2FSLIB 1 +EOF + + echo "$ac_t""With ext2fs file recovery code" 1>&6 + vfs_flags="${vfs_flags} undelfs" + undelfs_o="undelfs.o" + LIBS="$LIBS -lext2fs -lcom_err" + else + echo "configure: warning: No ext2fs file recovery code: linux/ext2_fs.h is missing" 1>&2 + fi + else + echo "configure: warning: No ext2fs file recovery code: ext2fs/ext2fs.h is missing" 1>&2 + fi + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + + + + +if $search_ncurses +then + echo "checking "location of ncurses.h file"" 1>&6 + + + if $search_ncurses + then + if test -f /usr/include/ncurses.h + then + echo "$ac_t""Found ncurses on /usr/include/ncurses.h" 1>&6 + LIBS="$LIBS -lncurses" + CPPFLAGS="$CPPFLAGS " + search_ncurses=false + screen_manager="ncurses on /usr/include" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + if $search_ncurses + then + if test -f /usr/include/ncurses/ncurses.h + then + echo "$ac_t""Found ncurses on /usr/include/ncurses/ncurses.h" 1>&6 + LIBS="$LIBS -lncurses" + CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" + search_ncurses=false + screen_manager="ncurses on /usr/include/ncurses" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + if $search_ncurses + then + if test -f /usr/local/include/ncurses.h + then + echo "$ac_t""Found ncurses on /usr/local/include/ncurses.h" 1>&6 + LIBS="$LIBS -lncurses -L/usr/local/lib" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + search_ncurses=false + screen_manager="ncurses on /usr/local" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + if $search_ncurses + then + if test -f /usr/local/include/ncurses/ncurses.h + then + echo "$ac_t""Found ncurses on /usr/local/include/ncurses/ncurses.h" 1>&6 + LIBS="$LIBS -lncurses -L/usr/local/lib -L/usr/local/lib/ncurses" + CPPFLAGS="$CPPFLAGS -I/usr/local/include/ncurses" + search_ncurses=false + screen_manager="ncurses on /usr/local/include/ncurses" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + + if $search_ncurses + then + if test -f /usr/local/include/ncurses/curses.h + then + echo "$ac_t""Found ncurses on /usr/local/include/ncurses/curses.h" 1>&6 + LIBS="$LIBS -lncurses -L/usr/local/lib" + CPPFLAGS="$CPPFLAGS -I/usr/local/include/ncurses -DRENAMED_NCURSES" + search_ncurses=false + screen_manager="renamed ncurses on /usr/local/.../ncurses" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + + if $search_ncurses + then + if test -f /usr/include/ncurses/curses.h + then + echo "$ac_t""Found ncurses on /usr/include/ncurses/curses.h" 1>&6 + LIBS="$LIBS -lncurses" + CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses -DRENAMED_NCURSES" + search_ncurses=false + screen_manager="renamed ncurses on /usr/include/ncurses" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + fi + fi + + + if $search_ncurses + then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "init_color" >/dev/null 2>&1; then + rm -rf conftest* + + echo "$ac_t""Using SysV curses" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_SYSV_CURSES 1 +EOF + + XCURSES="" + search_ncurses=false + screen_manager="SysV/curses" + LIBS="$LIBS -lcurses" + +fi +rm -f conftest* + + cat > conftest.$ac_ext < +#ifdef __NCURSES_H +#undef USE_NCURSES +USE_NCURSES +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "USE_NCURSES" >/dev/null 2>&1; then + rm -rf conftest* + + CPPFLAGS="$CPPFLAGS -DRENAMED_NCURSES" + cat >> confdefs.h <<\EOF +#define USE_NCURSES 1 +EOF + + search_ncurses=false + screen_manager="ncurses installed as curses" + +fi +rm -f conftest* + + fi + + if $search_ncurses + then + if test -f /usr/5include/curses.h + then + + search_ncurses=false + screen_manager="SunOS 4.x /usr/5include curses" + echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6 + cat >> confdefs.h <<\EOF +#define SUNOS_CURSES 1 +EOF + + cat >> confdefs.h <<\EOF +#define NO_COLOR_SUPPORT 1 +EOF + + cat >> confdefs.h <<\EOF +#define USE_SYSV_CURSES 1 +EOF + + CPPFLAGS="$CPPFLAGS -I/usr/5include" + XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" + echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 + echo "configure: warning: Reconsider using Slang" 1>&2 + + fi + else + # check for ncurses version, to properly ifdef mouse-fix + echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 + ncurses_version=unknown +cat > conftest.$ac_ext < +#else +#include +#endif +#undef VERSION +VERSION:NCURSES_VERSION +EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "VERSION:" >conftest.out 2>&1; then + ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` + fi + rm -rf conftext* + echo "$ac_t""$ncurses_version" 1>&6 + case "$ncurses_version" in + 4.[01]) + cat >> confdefs.h <<\EOF +#define NCURSES_970530 2 +EOF + + ;; + 1.9.9g) + cat >> confdefs.h <<\EOF +#define NCURSES_970530 1 +EOF + + ;; + 1*) + cat >> confdefs.h <<\EOF +#define NCURSES_970530 0 +EOF + + ;; + esac + fi +fi +for ac_func in resizeterm keyok +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +if test "x$screen_manager" = "xunknown"; then + cat >> confdefs.h <<\EOF +#define HAVE_SLANG 1 +EOF + + search_ncurses=false + if $slang_use_system_installed_lib + then + cat >> confdefs.h <<\EOF +#define HAVE_SYSTEM_SLANG 1 +EOF + + LIBS="$LIBS -lslang" + screen_manager="SLang (using system-installed library)" + echo "$ac_t""Using system installed SLang library" 1>&6 + else + CPPFLAGS="$CPPFLAGS -I\$(slangdir)" + LIBSLANG="libmcslang.a" + screen_manager="SLang" + LSLANG="-lmcslang" + fastdepslang=fastdepslang + fi + if $slang_check_lib + then + use_terminfo=false + if test -d /usr/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/lib/terminfo; then + use_terminfo=true; + fi + if test -d /lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/share/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/terminfo; then + use_terminfo=true; + fi + if $use_terminfo; then + cat >> confdefs.h <<\EOF +#define SLANG_TERMINFO 1 +EOF + + echo "$ac_t""Using SLang screen manager/terminfo" 1>&6 + slang_term=" with terminfo" + + else + echo "$ac_t""Using SLang screen manager/termcap" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_TERMCAP 1 +EOF + + echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6 +ac_lib_var=`echo termcap | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="$LIBS -ltermcap" +else + echo "$ac_t""no" 1>&6 +fi + + slang_term=" with termcap" + + fi + fi + +fi + +saver="" +saver_target="" +vcs="" +install_saver="no" +PAMLIBS="" +if test $system = Linux +then + saver="install.saver" + saver_target="cons.saver" + vcs="install.create_vcs" + install_saver="yes" + + echo $ac_n "checking for -lpam""... $ac_c" 1>&6 +ac_lib_var=`echo pam | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpam -ldl $LIBS" +cat > conftest.$ac_ext <&6 + + cat >> confdefs.h <<\EOF +#define HAVE_PAM 1 +EOF + + PAMLIBS="-lpam -ldl" + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + + + + SEDCMD="sed 's/-man/$MANDOC/'" + SEDCMD2="sed 's%@prefix@%\$(prefix)%'" + + + +if test x$no_xview = xyes; then + : +else + +echo $ac_n "checking for -lXpm""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_has_xpm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_has_xpm=no + if test x$no_x = xyes; then + : + else + has_xpm_save_LIBS=$LIBS + LIBS="-lXpm $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + has_xpm_save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $X_LIBS" + has_xpm_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +#include + +int main() { return 0; } +int t() { +XpmLibraryVersion(); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + ac_cv_has_xpm=yes +fi +rm -f conftest* + + CFLAGS="$has_xpm_save_CFLAGS" + LDFLAGS="$has_xpm_save_LDFLAGS" + LIBS="$has_xpm_save_LIBS" + fi + +fi + +echo "$ac_t""$ac_cv_has_xpm" 1>&6 + + if test x$ac_cv_has_xpm = xyes; then + XPM_LIB=-lXpm + + +echo $ac_n "checking for X11 non-rectangular shape extension""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_has_shape'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_has_shape=no + if test x$no_x = xyes; then + : + else + has_shape_save_LIBS=$LIBS + LIBS="-lXext $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + has_shape_save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $X_LIBS" + has_shape_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $X_CFLAGS" + cat > conftest.$ac_ext < +#include +#include + +int main() { return 0; } +int t() { + +Display *dpy = (Display *)NULL; +int a, b; +XShapeQueryVersion(dpy,&a,&b); + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + ac_cv_has_shape=yes +fi +rm -f conftest* + + CFLAGS="$has_shape_save_CFLAGS" + LDFLAGS="$has_shape_save_LDFLAGS" + LIBS="$has_shape_save_LIBS" + fi + +fi + +echo "$ac_t""$ac_cv_has_shape" 1>&6 + + if test x$ac_cv_has_shape = xyes; then + cat >> confdefs.h <<\EOF +#define HAVE_XPM_SHAPE 1 +EOF + + XEXT_LIB=-lXext + + fi + fi +fi + + +case $screen_manager in + [Ss][Ll][Aa][Nn][Gg]*) + if test $system = Linux + then + echo + else + echo $ac_n "checking for -lcurses""... $ac_c" 1>&6 +ac_lib_var=`echo curses | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <&6 + + cat > conftest.$ac_ext < +#include +int main() { return 0; } +int t() { + + if (key_end == parm_insert_line) + return 1; + return 0; + +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + + LIBS="$LIBS -lcurses" + cat >> confdefs.h <<\EOF +#define USE_SETUPTERM 1 +EOF + +fi +rm -f conftest* + +else + echo "$ac_t""no" 1>&6 +fi + + fi + ;; +esac + +LIBS="$LIBS $posix_libs" + +insticons= +if test "x$no_xview" != "xyes"; then + insticons=install_icons +fi + + +CPPFLAGS="-I.. $CPPFLAGS" + + + + + +ac_cv_make_with_percent_rules=no +if test x$ac_cv_prog_gnu_make = xyes; then + MCFG='include ../Make.common' + MCFGR='include ./Make.common' + MCF=/dev/null + PHONY='.PHONY:' + DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \ +include .depend \ +endif' + WRITEDEP=":" + ac_cv_make_with_percent_rules=yes +else + MCFG="" + MCFGR="" + MCF=./Make.common + PHONY='#' + DOTDEPEND="" + WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend' +fi + + + + + + + +if test x$ac_cv_make_with_percent_rules = xyes; then + PCENTRULE="" +else + PCENTRULE="#" +fi + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.7" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile \ + lib/mc.ext tk/Makefile gnome/Makefile xv/Makefile src/Makefile \ + slang/Makefile edit/Makefile icons/Makefile mcfn_install \ + vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR \ + vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar \ + doc/mc.1 doc/mcedit.1 doc/mcserv.8 config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@MC@%$MC%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@LN_S@%$LN_S%g +s%@AWK@%$AWK%g +s%@AWK_VAR_OPTION@%$AWK_VAR_OPTION%g +s%@dep@%$dep%g +s%@GNU_MAKE@%$GNU_MAKE%g +s%@MV@%$MV%g +s%@CP@%$CP%g +s%@RM@%$RM%g +s%@CHMOD@%$CHMOD%g +s%@AR@%$AR%g +s%@system@%$system%g +s%@X11_WWW@%$X11_WWW%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@REGEX_O@%$REGEX_O%g +s%@LIBOBJS@%$LIBOBJS%g +s%@SHADOWLIB@%$SHADOWLIB%g +s%@ALLOCA@%$ALLOCA%g +s%@X_CFLAGS@%$X_CFLAGS%g +s%@X_PRE_LIBS@%$X_PRE_LIBS%g +s%@X_LIBS@%$X_LIBS%g +s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g +s%@XVIEW_CFLAGS@%$XVIEW_CFLAGS%g +s%@XVIEW_CPPFLAGS@%$XVIEW_CPPFLAGS%g +s%@XVIEW_LIBS@%$XVIEW_LIBS%g +s%@HAVE_XVIEW@%$HAVE_XVIEW%g +s%@HAVE_XVIEW_PRIVATE_HEADERS@%$HAVE_XVIEW_PRIVATE_HEADERS%g +s%@mxc@%$mxc%g +s%@xvdep@%$xvdep%g +s%@ac_my_xp@%$ac_my_xp%g +s%@xv_bindir@%$xv_bindir%g +s%@NETFILES@%$NETFILES%g +s%@XCURSES@%$XCURSES%g +s%@tkmc@%$tkmc%g +s%@tkdep@%$tkdep%g +s%@tk_includes@%$tk_includes%g +s%@tk_libs@%$tk_libs%g +s%@gmc@%$gmc%g +s%@gmcdep@%$gmcdep%g +s%@HAVE_nroff@%$HAVE_nroff%g +s%@MANDOC@%$MANDOC%g +s%@TROFFASCII@%$TROFFASCII%g +s%@HAVE_FILECMD@%$HAVE_FILECMD%g +s%@LIBSLANG@%$LIBSLANG%g +s%@LSLANG@%$LSLANG%g +s%@fastdepslang@%$fastdepslang%g +s%@TERMNET@%$TERMNET%g +s%@LIBVFS@%$LIBVFS%g +s%@LVFS@%$LVFS%g +s%@fastdepvfs@%$fastdepvfs%g +s%@mcserv@%$mcserv%g +s%@LIBEDIT_A@%$LIBEDIT_A%g +s%@MCEDIT@%$MCEDIT%g +s%@LEDIT@%$LEDIT%g +s%@undelfs_o@%$undelfs_o%g +s%@saver_target@%$saver_target%g +s%@saver@%$saver%g +s%@vcs@%$vcs%g +s%@PAMLIBS@%$PAMLIBS%g +s%@SEDCMD@%$SEDCMD%g +s%@SEDCMD2@%$SEDCMD2%g +s%@XPM_LIB@%$XPM_LIB%g +s%@XEXT_LIB@%$XEXT_LIB%g +s%@insticons@%$insticons%g +s%@PHONY@%$PHONY%g +s%@WRITEDEP@%$WRITEDEP%g +s%@MCFG@%$MCFG%g +s%@MCFGR@%$MCFGR%g +s%@DOTDEPEND@%$DOTDEPEND%g +/@MCF@/r $MCF +s%@MCF@%%g +s%@PCENTRULE@%$PCENTRULE%g + +CEOF +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +fi; done +rm -f conftest.subs + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + cp $ac_given_srcdir/$ac_file_in conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. +# Maximum number of lines to put in a single here document. +ac_max_here_lines=12 + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + + + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + + +if test x$srcdir != x; then + if test $srcdir != .; then + cp $srcdir/VERSION VERSION + mkdir nt + mkdir os2 + cp $srcdir/nt/Makefile nt/Makefile + cp $srcdir/os2/Makefile os2/Makefile + fi +fi + +if test "x$screen_manager" = xSLang; then + screen_manager="${screen_manager}${slang_term}" +fi + +echo " +Configuration: + + Source code location: ${srcdir} + Compiler: ${CC} + Compiler flags: ${CFLAGS} + File system: ${vfs_type} + ${vfs_flags} + Text mode screen manager: ${screen_manager} + Install console saver: ${install_saver} + Text mode mouse library: ${mouse_lib} + Debugger code: ${mem_debug} + With subshell support: ${subshell} + X11 versions: ${xvers} + Internal editor: ${EDIT_msg} + Install path: ${prefix}/bin, ${prefix}/lib/mc" +if test -n "$xv_bindir"; then +echo " XView version install path: ${xv_bindir}" +fi +echo "" diff --git a/configure.in b/configure.in new file mode 100644 index 000000000..7aa1942f8 --- /dev/null +++ b/configure.in @@ -0,0 +1,1440 @@ +dnl +dnl Configure.in file for the Midnight Commander +dnl +AC_INIT(create_vcs) +AC_CONFIG_HEADER(config.h) + +dnl This is path where we're looking for headers in addition to /usr/include +dnl and whatever cpp defaults to. +include_additional_path="/usr/local/include /opt/gnu/include" + +dnl This sets/resets compiling with -g by default. It should be set to yes for +dnl development versions and set to no for release versions. +use_cc_g_flag=yes + +dnl We want autoconf to check whether -g is available +dnl We reset it back soon. +CCOPTS="$CFLAGS" +unset CFLAGS + +dnl Find out, if we should default to /usr/local or /usr +AC_PREFIX_PROGRAM(mc) + +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_CPP +AC_PROG_RANLIB +AC_PROG_LN_S +AC_PROG_AWK +if test x"$AWK" = x; then + AWK=":" + AWK_VAR_OPTION="" + dep=slowdep +else + dep=fastdep + + # test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4) + if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then + AWK_VAR_OPTION="" + else + AWK_VAR_OPTION="-v" + fi +fi +AC_SUBST(AWK_VAR_OPTION) +AC_SUBST(dep) +AC_PROG_GNU_MAKE + +AC_AIX +AC_MINIX +AC_ISC_POSIX +fp_PROG_CC_STDC +AC_HEADER_MAJOR +AC_C_CONST +AC_PATH_PROG(MV, mv, mv) +AC_PATH_PROG(CP, cp, cp) +AC_PATH_PROG(RM, rm, rm) +AC_PATH_PROG(CHMOD, chmod, :) +AC_PATH_PROG(AR, ar, ar) + +AC_CHECK_PROG(system,uname,`uname`,unknown) +AC_CHECK_PROGS(X11_WWW,netscape arena Mosaic chimera) +if test x"$X11_WWW" = x; then + X11_WWW=lynx +fi + +dnl +dnl This part supplies reasonable defaults for CFLAGS, if they weren't +dnl specified by ''CFLAGS=flags ./configure'' +dnl +cc_uses_g=yes +if test x$GCC = xyes; then + if test x$ac_cv_prog_gcc_g = xyes; then + : + else + cc_uses_g=no + fi +fi +if test "x$CCOPTS" = x; then + if test x$GCC = xyes; then + if test x$system = xLinux; then + CCOPTS='-O2 -fno-strength-reduce' + if test x$use_cc_g_flag = xyes; then + if test $cc_uses_g = yes; then + CCOPTS='-g -O' + fi + fi + else + CCOPTS='-O' + if test x$use_cc_g_flag = xyes; then + if test $cc_uses_g = yes; then + CCOPTS='-g -O' + fi + fi + fi + else + if test x$use_cc_g_flag = xyes; then + CCOPTS="$CFLAGS" + else + CCOPTS= + fi + fi +fi +CFLAGS="$CCOPTS" + +dnl +dnl For A/UX. Do not move +dnl + +posix_libs="" +if test $system = A/UX +then + posix_libs="-lposix" + AC_DEFINE(_POSIX_SOURCE) +fi + +AC_PROG_INSTALL +AC_CHECK_HEADERS(unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h) +AC_CHECK_HEADERS(stdlib.h termios.h) + +if test x$ac_cv_header_malloc_h = xno; then + echo '/* NeXTStep malloc.h stub */' > $srcdir/malloc.h +fi + +dnl (rx.h) +AC_HEADER_SYS_WAIT +AC_HEADER_DIRENT +AC_SHORT_D_NAME_LEN +AC_HEADER_STDC + +dnl +dnl Let me check for an incompatible regcomp in HP-UX before making this +dnl the default +dnl +dnl if test x$ac_cv_header_rx_h = xyes; then +dnl AC_CHECK_FUNCS(regcomp) +dnl if test x$ac_cv_func_regcomp = xyes; then +dnl REGEX_O="" +dnl fi +dnl fi + +REGEX_O="regex.o" +AC_SUBST(REGEX_O) + +dnl Missing structure components +AC_STRUCT_ST_BLKSIZE +AC_STRUCT_ST_BLOCKS +AC_STRUCT_ST_RDEV + +dnl +dnl Check availability of some functions +dnl + +AC_CHECK_FUNCS(strerror statfs getwd strcasecmp strncasecmp) +AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv) +AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed) +AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset) + +SHADOWLIB= +if test x$system = xLinux; then +AC_CHECK_LIB(shadow,pw_encrypt,[ +shadow_header=no +AC_CHECK_HEADERS(shadow.h) +if test x$ac_cv_header_shadow_h = xyes; then + shadow_header=yes +else +AC_CHECK_HEADERS(shadow/shadow.h) + if test x$ac_cv_shadow_shadow_h = xyes; then + shadow_header=yes + fi +fi +if test $shadow_header = yes; then + AC_DEFINE(LINUX_SHADOW) + SHADOWLIB=-lshadow +fi +]) +fi +AC_SUBST(SHADOWLIB) + +NEED_CRYPT_PROTOTYPE=yes +if test x$ac_cv_header_crypt_h = xyes; then +AC_TRY_WARNINGS([#include ], [char *p = crypt("xxx", "yyy");],[ +NEED_CRYPT_PROTOTYPE=no]) +else + if test x$ac_cv_header_unistd_h = xyes; then +AC_TRY_WARNINGS([#include ], [char *p = crypt("xxx", "yyy");],[ +NEED_CRYPT_PROTOTYPE=no]) + fi +fi +if test x$NEED_CRYPT_PROTOTYPE=xyes; then +AC_DEFINE(NEED_CRYPT_PROTOTYPE) +fi + +dnl +dnl AIX and Sequent need for fd_set +dnl +AC_CHECK_HEADERS(sys/select.h) + +dnl +dnl On SCO, crypt is on libcrypt.a +dnl grantpt in libpt.a +dnl +AC_CHECK_FUNCS(crypt, , [ + AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt",[ + AC_CHECK_LIB(crypt_i, crypt, LIBS="$LIBS -lcrypt_i")])]) + +dnl This is the correct version +dnl AC_CHECK_FUNCS(grantpt, , AC_CHECK_LIB(pt, grantpt)) +dnl +dnl And workaround for a Autoconf 2.4 bug: +AC_CHECK_FUNCS(grantpt) +if test x$ac_cv_func_grantpt = xyes; then + : +else + AC_CHECK_LIB(pt, grantpt) +fi + +dnl +dnl libintl.a required on SCO to provide proper NLS support +dnl (using native cc links it by default) +dnl +if test x$GCC = xyes; then + AC_CHECK_LIB(intl, tolower) +fi + +dnl replacing lstat with statlstat on sco makes it more portable between +dnl sco clones +AC_CHECK_FUNCS(statlstat) + +dnl +dnl If running under AIX, AC_AIX does not tell us that +dnl +AC_MSG_CHECKING(for AIX defines) +AC_EGREP_CPP(yes, +[#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix) +yes +#endif +], [ +AC_DEFINE(IS_AIX) +AC_MSG_RESULT(yes) +], AC_MSG_RESULT(no)) + +dnl +dnl This hack is here until autoconf adds it +dnl Needed for Unixware: getmntent is on libgen.a +dnl +AC_CHECK_LIB(gen, getmntent, [LIBS="-lgen $LIBS"]) + +dnl +dnl This is from GNU fileutils, check aclocal.m4 for more information +dnl +AC_GET_FS_INFO + +dnl +dnl Missing typedefs and replacements +dnl + +AC_TYPE_MODE_T +AC_CHECK_TYPE(umode_t, int) +AC_CHECK_TYPE(off_t, long) +AC_TYPE_PID_T +AC_TYPE_UID_T + +AC_FUNC_MMAP +AC_FUNC_ALLOCA + +dnl +dnl Cool hack, but we don't use it currently +dnl +dnl AC_MSG_CHECKING(for token pasting method) +dnl AC_EGREP_CPP(portable,[ +dnl #define tken(a, b) a##b +dnl tken(port, able) +dnl ], [AC_DEFINE(HAVE_PORTABLE_TOKEN_PASTING) +dnl AC_MSG_RESULT(portable) +dnl ], [ +dnl AC_MSG_RESULT(non-portable) +dnl ]) + +AC_PATH_XTRA + +xvers="none" +mxc="" +AC_PATH_XVIEW_XTRA +if test "x$no_xview" != "xyes"; then + mxc="mxc" + xvers="XView" + xvdep="xvdep" +else + mxc="" + xvdep="" +fi +AC_SUBST(mxc) +AC_SUBST(xvdep) + +xv_bindir= +if test -n "$mxc"; then +AC_ARG_WITH(xv-bindir, + [--with-xv-bindir=dir Specifies directory where to install XView version],[ + if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-xv-bindir=basedir) + else + if test x$withval = xno; then + AC_MSG_WARN(Usage is: --with-xv-bindir=basedir) + else + xv_bindir=$withval + fi + fi +]) +if test x$xv_bindir = x; then + xv_bindir=`echo $xv_includes | sed s/include/bin/` + if test ! -x $xv_bindir/openwin; then + if test ! -x $xv_bindir/olwm; then + if test ! -x $xv_bindir/olvwm; then + xv_bindir= + fi + fi + fi +fi +if test x$xv_bindir = x; then + if test "$OPENWINHOME"; then + xv_bindir=$OPENWINHOME/bin + else + AC_PATH_PROG(ac_my_xp, openwin) + if test x$ac_my_xp = x; then + AC_PATH_PROG(ac_my_xp, X) + if test x$ac_my_xp = x; then + xv_bindir="" + else + xv_bindir=`basename $ac_my_xp` + fi + else + xv_bindir=`basename $ac_my_xp` + fi + fi + if test ! -x $xv_bindir/openwin; then + if test ! -x $xv_bindir/olwm; then + if test ! -x $xv_bindir/olvwm; then + if test ! -x $xv_bindir/X; then + xv_bindir= + fi + fi + fi + fi +fi +if test x$xv_bindir = x; then + xv_bindir=$prefix/bin +fi +fi +if test x$xv_bindir = xNONE/bin; then + xv_bindir= +fi +AC_SUBST(xv_bindir) + +dnl +dnl Network related functions +dnl + +AC_CHECK_LIB(nsl, t_accept) +AC_CHECK_LIB(socket, socket) + +have_socket=no +AC_CHECK_FUNCS(socket, have_socket=yes) +if test $have_socket = no; then + # socket is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, socket, [ + LIBS="$LIBS -l$lib" + have_socket=yes + AC_DEFINE(HAVE_SOCKET) + break]) + done +fi + +have_gethostbyname=no +AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes) +if test $have_gethostbyname = no; then + # gethostbyname is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break]) + done +fi + +AC_CHECK_FUNCS(socketpair) + +dnl +dnl Sequent wants getprocessstats +dnl +AC_CHECK_LIB(seq, get_process_stats, [ + LIBS="$LIBS -lseq" + AC_DEFINE(HAVE_GET_PROCESS_STATS)]) + +NETFILES="" +vfs_flags="tarfs" +use_net_code=false +if test $have_socket = yes; then + AC_STRUCT_LINGER + AC_CHECK_FUNCS(pmap_set, , [ + AC_CHECK_LIB(rpc, pmap_set, [ + LIBS="-lrpc $LIBS" + AC_DEFINE(HAVE_PMAP_SET) + ])]) + AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport) +dnl add for source routing support setsockopt + AC_CHECK_HEADERS(rpc/pmap_clnt.h) + vfs_flags="$vfs_flags, mcfs, ftpfs" + NETFILES="\$(NETFILES)" + use_net_code=true +fi +AC_SUBST(NETFILES) + +screen_manager=unknown +search_ncurses=false + +CFLAGS=${CFLAGS--O} +LDFLAGS=${LDFLAGS--O} + +AC_DEFUN(AC_USE_SUNOS_CURSES, [ + search_ncurses=false + screen_manager="SunOS 4.x /usr/5include curses" + AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) + AC_DEFINE(SUNOS_CURSES) + AC_DEFINE(NO_COLOR_SUPPORT) + AC_DEFINE(USE_SYSV_CURSES) + CPPFLAGS="$CPPFLAGS -I/usr/5include" + XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" + AC_MSG_RESULT(Please note that some screen refreshs may fail) + AC_WARN(Reconsider using Slang) +]) + +AC_DEFUN(AC_USE_OSF1_CURSES, [ + AC_MSG_RESULT(Using OSF1 curses) + search_ncurses=false + screen_manager="OSF1 curses" + AC_DEFINE(NO_COLOR_SUPPORT) + AC_DEFINE(USE_SYSV_CURSES) + XCURSES="xcurses.o" + LIBS="$LIBS -lcurses" +]) + +AC_DEFUN(AC_USE_SYSV_CURSES, [ + AC_MSG_RESULT(Using SysV curses) + AC_DEFINE(USE_SYSV_CURSES) + XCURSES="" + search_ncurses=false + screen_manager="SysV/curses" + LIBS="$LIBS -lcurses" +]) + +XCURSES="" +AC_SUBST(XCURSES) + +dnl AC_ARG_WITH(bsd-curses, +dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], +dnl search_ncurses=false +dnl screen_manager="Ultrix/cursesX" +dnl if test $system = ULTRIX +dnl then +dnl THIS_CURSES=cursesX +dnl else +dnl THIS_CURSES=curses +dnl fi +dnl +dnl LIBS="$LIBS -l$THIS_CURSES -ltermcap" +dnl AC_DEFINE(USE_BSD_CURSES) +dnl XCURSES="xcurses.o" +dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) +dnl AC_WARN(Use of the bsdcurses extension has some) +dnl AC_WARN(display/input problems.) +dnl AC_WARN(Reconsider using xcurses) +dnl) + +AC_ARG_WITH(sco, + [--with-sco Use this to turn on SCO-specific code],[ + if test x$withval = xyes; then + AC_DEFINE(SCO_FLAVOR) + CFLAGS="$CFLAGS -D_SVID3" + fi +]) + +AC_ARG_WITH(sunos-curses, + [--with-sunos-curses Used to force SunOS 4.x curses],[ + if test x$withval = xyes; then + AC_USE_SUNOS_CURSES + fi +]) + +AC_ARG_WITH(osf1-curses, + [--with-osf1-curses Used to force OSF/1 curses],[ + if test x$withval = xyes; then + AC_USE_OSF1_CURSES + fi +]) + +AC_ARG_WITH(vcurses, + [--with-vcurses[=incdir] Used to force SysV curses], + if test x$withval = xyes; then + CPPFLAGS="$CPPFLAGS" + else + CPPFLAGS="$CPPFLAGS -I$withval" + fi + AC_USE_SYSV_CURSES +) + +mouse_lib="xterm only" +AC_ARG_WITH(gpm-mouse, + [--with-gpm-mouse[=base-dir] Compile with gpm mouse support],[ + if test x$withval != xno + then + if test x$withval != xyes + then + LIBS="$LIBS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + fi + AC_DEFINE(HAVE_LIBGPM) + mouse_lib="GPM and xterm" + LIBS="$LIBS -lgpm" + fi + ],[ + AC_CHECK_LIB(gpm, Gpm_Repeat,[ + AC_DEFINE(HAVE_LIBGPM) + mouse_lib="GPM and xterm" + LIBS="$LIBS -lgpm"],[ + if test $system = Linux + then + AC_MSG_WARN("libgpm.a is missing or older than 0.18") + fi + ], $LIBS) + ] +) + +AC_ARG_WITH(ncurses, + [--with-ncurses[=base-dir] Compile with ncurses/locate base dir], + if test x$withval = xyes + then + search_ncurses=true + else + LIBS="$LIBS -L$withval/lib -lncurses" + CPPFLAGS="$CPPFLAGS -I$withval/include" + search_ncurses=false + screen_manager="ncurses" + AC_DEFINE(USE_NCURSES) + fi +) + +AC_ARG_WITH(hsc, + [--with-hsc Compile with support for the HSC firewall], + if test x$withval = xyes; then + AC_DEFINE(HSC_PROXY) + fi +) + +AC_DEFUN(TK_MSG,[ + if test x$xvers = xnone; then + xvers="Tk" + else + xvers="XView+Tk" + fi +]) + +dnl +dnl Check for Tcl/Tk, should switch to Guile/Tk soon :-) +dnl +tkmc="" +tk_includes="" +tk_libs="" +if test x$no_x != xyes; then + AC_ARG_WITH(tk, + [--with-tk Use the Tk toolkit],[ + if test x$withval = xyes; then + tkmc="tkmc" + fi]) + AC_ARG_WITH(tk-includes, + [--with-tk-includes=dir Specifies the Tcl/Tk header directory],[ + if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-tk-includes=dir) + else + if test x$withval = xno; then + AC_MSG_WARN(Usage is: --with-tk-includes=dir) + else + tk_includes="-I$withval" + tkmc="tkmc" + fi + fi]) + AC_ARG_WITH(tk-libraries, + [--with-tk-libraries=dir Specifies the Tcl/Tk library directory],[ + if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-tk-libraries=dir) + else + if test x$withval = xno; then + AC_MSG_WARN(Usage is: --with-tk-libraries=dir) + else + tk_libs="-L$withval" + tkmc="tkmc" + fi + fi]) + if test -n "$tkmc"; then + AC_CHECKING(for Tcl/Tk) + AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl") + tk_headers_found=no + if test ! -n "$tk_includes"; then + AC_CHECK_HEADER_IN_PATH(tcl.h, $include_additional_path, [ + AC_CHECK_HEADER_IN_PATH(tk.h, $include_additional_path, [ + tk_headers_found=yes + if test -n "$ac_cv_header_in_path_tcl_h"; then + tk_includes="-I$ac_cv_header_in_path_tcl_h"; + fi + if test -n "$ac_cv_header_in_path_tk_h"; then + if test "$ac_cv_header_in_path_tk_h" != "$ac_cv_header_in_path_tcl_h"; then + tk_includes="$tk_includes -I$ac_cv_header_in_path_tk_h" + fi + fi + ]) + ]) + else + tk_headers_found=yes + fi + if test $tk_headers_found = no; then + tkmc="" + else + tk_libs_found=no + ac_save_tk_LIBS="$LIBS" + ac_save_tk_LDFLAGS="$LDFLAGS" + LIBS="$X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS" + LDFLAGS="$LDFLAGS $X_LIBS" + if test ! -n "$tk_libs"; then + AC_CHECK_LIB(tcl, Tcl_Eval, [ + AC_CHECK_LIB(tk, Tk_CreateWindow, [ + tk_libs_found=yes + ], , -ltcl -lm) + ], , -lm) + else + tk_libs_found=yes + fi + LDFLAGS="$ac_save_tk_LDFLAGS" + LIBS="$ac_save_tk_LIBS" + if test $tk_libs_found = no; then + tkmc="" + fi + fi + fi +fi +if test -n "$tkmc"; then + TK_MSG + tkdep="tkdep" +else + tkdep="" +fi +AC_SUBST(tkmc) +AC_SUBST(tkdep) +AC_SUBST(tk_includes) +AC_SUBST(tk_libs) + +dnl +dnl Check for Gnome +dnl +gmc="" +gmcdep="" +if test x$no_x != xyes; then + AC_ARG_WITH(gnome,[--with-gnome Compile the GNOME edition],[ + if test x$withval = xyes; then + gmc=gmc + gmcdep=gmcdep + if test x"$xvers" = xnone; then + xvers="Gnome" + else + xvers="Gnome+$xvers" + fi + fi]) +fi +AC_SUBST(gmc) +AC_SUBST(gmcdep) + +dnl +dnl Check for the -mandoc package +dnl +AC_CHECK_PROG(HAVE_nroff, nroff, true, false) +if $HAVE_nroff; then + AC_MSG_CHECKING(for manual formatting macros) + AC_CACHE_VAL(ac_cv_mandoc, [ + nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null + if test $? = 0 + then + ac_cv_mandoc=-mandoc + else + ac_cv_mandoc=-man + fi + ]) + MANDOC=$ac_cv_mandoc + AC_MSG_RESULT($MANDOC) +else + MANDOC=-man +fi +AC_SUBST(MANDOC) + +dnl +dnl Check if nroff accepts -Tascii +dnl +if $HAVE_nroff; then + AC_MSG_CHECKING(If nroff accepts -Tascii) + AC_CACHE_VAL(ac_cv_nroff_tascii, [ + nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null + if test $? = 0 + then + ac_cv_nroff_tascii=" -Tascii" + AC_MSG_RESULT(yes) + else + ac_cv_nroff_tascii="" + AC_MSG_RESULT(no) + fi + ]) +fi +TROFFASCII="$ac_cv_nroff_tascii" +AC_SUBST(TROFFASCII) + +dnl +dnl Check for - option to file +dnl +AC_CHECK_PROG(HAVE_FILECMD, file, true, false) +if $HAVE_FILECMD; then + AC_MSG_CHECKING(for - option to file command) + AC_CACHE_VAL(ac_cv_filestdin, [ + cat > conftest.c < conftest.sed </dev/null | sed -f conftest.sed` + filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed` + if test "$filehyphen_1" = "$filehyphen_2"; then + ac_cv_filestdin=yes + else + ac_cv_filestdin=no + fi + changequote([, ]) + rm conftest.c conftest.sed + unset filehyphen_1 + unset filehyphen_2 + ]) + + if test x$ac_cv_filestdin = xyes; then + AC_DEFINE(FILE_STDIN) + fi + filestdin=$ac_cv_filestdin + AC_MSG_RESULT($filestdin) + + dnl + dnl Check for -L option to file + dnl + +AC_MSG_CHECKING(for -L option to file command) +AC_CACHE_VAL(ac_cv_filel, [ +file -L . > /dev/null 2>&1 +if test $? = 0 +then + ac_cv_filel=yes +else + ac_cv_filel=no +fi +]) +if test x$ac_cv_filel = xyes; then + AC_DEFINE(FILE_L) +fi +filel=$ac_cv_filel +AC_MSG_RESULT($filel) +fi + +dnl +dnl Check to see if grep program allowes dash to denote stdin +dnl +AC_MSG_CHECKING(for - option to grep command) +AC_CACHE_VAL(ac_cv_grep_stdin, [ + grep ac_cv_grep_stdin - > /dev/null 2>&1 < ./configure + if test $? = 0; then + ac_cv_grep_stdin=yes + else + ac_cv_grep_stdin=no + fi +]) +if test x$ac_cv_grep_stdin = xyes; then + AC_DEFINE(GREP_STDIN) +fi +AC_MSG_RESULT($ac_cv_grep_stdin) + + +dnl +dnl HAVE_DUSUM is on by default, only if you have a strange du, you can +dnl turn it off by --without-dusum +dnl +have_dusum=yes +AC_MSG_CHECKING(for du arguments) +AC_ARG_WITH(dusum, + [--with-dusum Support the du -s summaries],[ + if test x$withval = xno; then + have_dusum=no + fi +]) +if test x$have_dusum = xyes; then + AC_DEFINE(HAVE_DUSUM) + AC_CACHE_VAL(ac_cv_dusum, [ + du -s -b $srcdir/configure >/dev/null 2>&1 + if test $? = 0; then + ac_cv_dusum='dusum_useb=yes; dusum_factor=1' + else + ac_cv_dusum='dusum_useb=; dusum_factor=512' + fi +]) + eval "$ac_cv_dusum" + if test x$dusum_useb = xyes; then + AC_DEFINE(DUSUM_USEB) + AC_MSG_RESULT(-b) + else + AC_MSG_RESULT(block size $dusum_factor) + fi + AC_DEFINE_UNQUOTED(DUSUM_FACTOR, $dusum_factor) +fi + +dnl +dnl The termnet support +dnl +termnet=false +AC_ARG_WITH(termnet, + [--with-termnet If you want a termified net support],[ + if test x$withval = xyes; then + AC_DEFINE(USE_TERMNET) + termnet=true + fi +]) + +dnl +dnl The subshell support +dnl + +AC_MSG_CHECKING(for subshell support) +AC_ARG_WITH(subshell, + [--with-subshell If you want to use a concurrent shell], + result=no + if test x$withval = xoptional + then + AC_DEFINE(SUBSHELL_OPTIONAL) + AC_DEFINE(HAVE_SUBSHELL_SUPPORT) + result="optional" + fi + if test x$withval = xyes + then + AC_DEFINE(HAVE_SUBSHELL_SUPPORT) + result="yes" + fi, + dnl Default: provide the subshell support on non-ultrix machines + if test $system = ULTRIX + then + result=no + else + AC_DEFINE(HAVE_SUBSHELL_SUPPORT) + result=yes + fi +) +AC_MSG_RESULT($result) +subshell="$result" + +dnl +dnl Check for GCC +dnl +if test x$GCC = x +then + AC_DEFINE(OLD_TOOLS) + CPPFLAGS="$CPPFLAGS -Dinline=" +fi + +dnl +dnl This option is only inteded for being used by me :-) +dnl It has some nasty hacks built in. +dnl +mem_debug="none" +AC_ARG_WITH(debug, +[--with-debug For use by developers only: activates -Wall and MAD], + [if test x$withval = xyes; then + CFLAGS="$CFLAGS -Wall" + mem_debug="Janne's MAD library" + AC_DEFINE(HAVE_MAD) + AC_DEFINE(MCDEBUG) + if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ] + then + CFLAGS="$CFLAGS -Wno-implicit" + fi + if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then + : + else + if test $cc_uses_g = yes; then + CFLAGS="$CFLAGS -g" + fi + fi + AC_MSG_RESULT(compiling with -Wall and the memory leak detector) +fi]) + +dnl +dnl This option is only inteded for being used by me :-) +dnl It has some nasty hacks built in. +dnl +AC_ARG_WITH(efence, +[--with-efence Developers only: activates -Wall and efence], + [if test x$withval = xyes; then + CFLAGS="$CFLAGS -Wall" + AC_DEFINE(MCDEBUG) + LIBS="$LIBS -lefence" + if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ] + then + CFLAGS="$CFLAGS -Wno-implicit" + fi + if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then + : + else + if test $cc_uses_g = yes; then + CFLAGS="$CFLAGS -g" + fi + fi + AC_MSG_RESULT(compiling with -Wall and Electric fence) + mem_debug="Electric Fence" +fi]) + +dnl +dnl To force mmap support +dnl We use only part of the functionality of mmap, so on AIX, +dnl it's possible to use mmap, even if it doesn't pass the autoconf test. +dnl +AC_ARG_WITH(mmap, + [--with-mmap To force using the mmap call (AIX)], + [if test x$withval = xyes; then + AC_DEFINE(HAVE_MMAP) + AC_MSG_RESULT(forcing MMAP support) +fi]) + +AC_DEFUN(AC_USE_TERMINFO, + AC_DEFINE(SLANG_TERMINFO) + AC_MSG_RESULT(Using SLang screen manager/terminfo) + slang_term=" with terminfo" +) + +AC_DEFUN(AC_USE_TERMCAP, + AC_MSG_RESULT(Using SLang screen manager/termcap) + AC_DEFINE(USE_TERMCAP) + dnl Check with $LIBS at the end so that it works with ELF libs. + AC_CHECK_LIB(termcap, tgoto, LIBS="$LIBS -ltermcap", , $LIBS) + slang_term=" with termcap" +) + +slang_check_lib=true +slang_term="" +slang_use_system_installed_lib=false +AC_CHECK_LIB(slang,SLang_init_tty, + AC_CHECK_HEADERS(slang.h) + if test x$ac_cv_header_slang_h = xyes + then + slang_use_system_installed_lib=true + slang_check_lib=false + else + AC_CHECK_HEADERS(slang/slang.h) + if test x$ac_cv_header_slang_slang_h = xyes + then + slang_use_system_installed_lib=true + slang_check_lib=false + AC_DEFINE(SLANG_H_INSIDE_SLANG_DIR) + fi + fi +) + +AC_ARG_WITH(terminfo, + [--with-terminfo SLANG: Force usage of terminfo],[ + AC_USE_TERMINFO + slang_check_lib=false + slang_use_system_installed_lib=false + ] +) + +AC_ARG_WITH(termcap, + [--with-termcap SLANG: Force usage of termcap],[ + AC_USE_TERMCAP + slang_check_lib=false + slang_use_system_installed_lib=false + ] +) + +AC_ARG_WITH(our-slang, + [--with-our-slang SLANG: Don't use system-installed SLang],[ + slang_use_system_installed_lib=false + slang_check_lib=true + ] +) + +AC_DEFUN(AC_WITH_SLANG, + AC_DEFINE(HAVE_SLANG) + search_ncurses=false + if $slang_use_system_installed_lib + then + AC_DEFINE(HAVE_SYSTEM_SLANG) + LIBS="$LIBS -lslang" + screen_manager="SLang (using system-installed library)" + AC_MSG_RESULT(Using system installed SLang library) + else + CPPFLAGS="$CPPFLAGS -I\$(slangdir)" + LIBSLANG="libmcslang.a" + screen_manager="SLang" + LSLANG="-lmcslang" + fastdepslang=fastdepslang + fi + if $slang_check_lib + then + use_terminfo=false + if test -d /usr/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/lib/terminfo; then + use_terminfo=true; + fi + if test -d /lib/terminfo; then + use_terminfo=true; + fi + if test -d /usr/local/share/terminfo; then + use_terminfo=true; + fi + if test -d /usr/share/terminfo; then + use_terminfo=true; + fi + if $use_terminfo; then + AC_USE_TERMINFO + else + AC_USE_TERMCAP + fi + fi +) + +LIBSLANG="" +LSLANG="" +fastdepslang="" +AC_ARG_WITH(slang, + [--with-slang Compile with the slang screen manager],[ + if test x$withval = xyes; then + AC_WITH_SLANG + fi +]) + +AC_SUBST(LIBSLANG) +AC_SUBST(LSLANG) +AC_SUBST(fastdepslang) + +TERMNET="" +AC_DEFUN(AC_WITH_VFS, [ + AC_DEFINE(USE_VFS) + if $use_net_code; then + AC_DEFINE(USE_NETCODE) + fi + LIBVFS="libvfs.a" + LVFS="-lvfs" + fastdepvfs=fastdepvfs + if test $have_socket = yes; then + mcserv="mcserv" + if $termnet; then + TERMNET="-ltermnet" + fi + fi + CPPFLAGS="$CPPFLAGS -I\$(vfsdir)" + AC_MSG_RESULT(Using the VFS switch code) + vfs_type="Midnight Commander Virtual File System" +]) +AC_SUBST(TERMNET) + +LIBVFS="" +LVFS="" +fastdepvfs="" +mcserv="" +vfs_type="normal" +AC_ARG_WITH(vfs, + [--with-vfs Compile with the VFS code], + if test x$withval = xyes + then + AC_WITH_VFS + else + vfs_flags="" + fi, + dnl Default: provide the VFS code + AC_WITH_VFS +) +AC_SUBST(LIBVFS) +AC_SUBST(LVFS) +AC_SUBST(fastdepvfs) +AC_SUBST(mcserv) + +AC_DEFUN(AC_WITH_EDIT, [ + AC_DEFINE(USE_INTERNAL_EDIT) + LIBEDIT_A="libedit.a" + MCEDIT="mcedit" + LEDIT="-ledit" + CPPFLAGS="$CPPFLAGS -I\$(rootdir)" + EDIT_msg="yes" + AC_MSG_RESULT(will call internal editor) +]) + +LIBEDIT_A="" +MCEDIT="" +LEDIT="" +EDIT_msg="" +AC_ARG_WITH(edit, + [--with-edit Define INTERNAL_EDIT], + if test x$withval = xyes + then + AC_WITH_EDIT + else + EDIT_msg="no" + fi, + dnl Default: provide the internal editor + AC_WITH_EDIT +) +AC_SUBST(LIBEDIT_A) +AC_SUBST(MCEDIT) +AC_SUBST(LEDIT) + +AC_ARG_WITH(netrc, + [--with-netrc Compile with ftp .netrc support],[ + AC_DEFINE(USE_NETRC) + AC_MSG_RESULT(ftpfs will have .netrc parsing code) +]) + +undelfs_o="" +AC_DEFUN(AC_EXT2_UNDEL, [ + AC_CHECK_HEADERS(ext2fs/ext2fs.h linux/ext2_fs.h) + if test x$ac_cv_header_ext2fs_ext2fs_h = xyes + then + if test x$ac_cv_header_linux_ext2_fs_h = xyes + then + AC_DEFINE(USE_EXT2FSLIB) + AC_MSG_RESULT(With ext2fs file recovery code) + vfs_flags="${vfs_flags} undelfs" + undelfs_o="undelfs.o" + LIBS="$LIBS -lext2fs -lcom_err" + else + AC_MSG_WARN(No ext2fs file recovery code: linux/ext2_fs.h is missing) + fi + else + AC_MSG_WARN(No ext2fs file recovery code: ext2fs/ext2fs.h is missing) + fi +]) + +AC_ARG_WITH(ext2undel, + [--with-ext2undel Compile with ext2 undelete code],[ + if test x$withval = xyes; + then + AC_EXT2_UNDEL + fi], + dnl Default: detect + AC_CHECK_LIB(ext2fs, ext2fs_close, AC_EXT2_UNDEL,,-lcom_err) +) + +AC_SUBST(undelfs_o) + +dnl +dnl Parameters: directory filename LIBS_append CPPFLAGS_append nicename +dnl +AC_DEFUN(AC_NCURSES, [ + if $search_ncurses + then + if test -f $1/$2 + then + AC_MSG_RESULT(Found ncurses on $1/$2) + LIBS="$LIBS $3" + CPPFLAGS="$CPPFLAGS $4" + search_ncurses=false + screen_manager=$5 + AC_DEFINE(USE_NCURSES) + fi + fi +]) + +if $search_ncurses +then + AC_CHECKING("location of ncurses.h file") + + AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") + AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") + AC_NCURSES(/usr/local/include, ncurses.h, -lncurses -L/usr/local/lib, -I/usr/local/include, "ncurses on /usr/local") + AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -lncurses -L/usr/local/lib -L/usr/local/lib/ncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") + + AC_NCURSES(/usr/local/include/ncurses, curses.h, -lncurses -L/usr/local/lib, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") + + AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") + + dnl + dnl We couldn't find ncurses, try SysV curses + dnl + if $search_ncurses + then + AC_EGREP_HEADER(init_color, /usr/include/curses.h, + AC_USE_SYSV_CURSES) + AC_EGREP_CPP(USE_NCURSES,[ +#include +#ifdef __NCURSES_H +#undef USE_NCURSES +USE_NCURSES +#endif +],[ + CPPFLAGS="$CPPFLAGS -DRENAMED_NCURSES" + AC_DEFINE(USE_NCURSES) + search_ncurses=false + screen_manager="ncurses installed as curses" +]) + fi + + dnl + dnl Try SunOS 4.x /usr/5{lib,include} ncurses + dnl The flags SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES + dnl should be replaced by a more fine grained selection routine + dnl + if $search_ncurses + then + if test -f /usr/5include/curses.h + then + AC_USE_SUNOS_CURSES + fi + else + # check for ncurses version, to properly ifdef mouse-fix + AC_MSG_CHECKING(for ncurses version) + ncurses_version=unknown +cat > conftest.$ac_ext < +#else +#include +#endif +#undef VERSION +VERSION:NCURSES_VERSION +EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | + egrep "VERSION:" >conftest.out 2>&1; then +changequote(,)dnl + ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` +changequote([,])dnl + fi + rm -rf conftext* + AC_MSG_RESULT($ncurses_version) + case "$ncurses_version" in +changequote(,)dnl + 4.[01]) +changequote([,])dnl + AC_DEFINE(NCURSES_970530,2) + ;; + 1.9.9g) + AC_DEFINE(NCURSES_970530,1) + ;; + 1*) + AC_DEFINE(NCURSES_970530,0) + ;; + esac + fi +fi +AC_CHECK_FUNCS(resizeterm keyok) + +if test "x$screen_manager" = "xunknown"; then + AC_WITH_SLANG +fi + +dnl +dnl The variables used for expanding the auto saver. +dnl +saver="" +saver_target="" +vcs="" +install_saver="no" +PAMLIBS="" +if test $system = Linux +then + saver="install.saver" + saver_target="cons.saver" + vcs="install.create_vcs" + install_saver="yes" + + dnl + dnl On Linux, check for PAM authentication available + dnl + AC_CHECK_LIB(pam, pam_start, [ + AC_DEFINE(HAVE_PAM) + PAMLIBS="-lpam -ldl" + ],[],[-ldl]) + +fi +AC_SUBST(saver_target) +AC_SUBST(saver) +AC_SUBST(vcs) +AC_SUBST(PAMLIBS) + +dnl +dnl We need sed in order to fix the library files +dnl + SEDCMD="sed 's/-man/$MANDOC/'" + SEDCMD2="sed 's%@prefix@%\$(prefix)%'" +AC_SUBST(SEDCMD) +AC_SUBST(SEDCMD2) + +if test x$no_xview = xyes; then + : +else + AC_LIB_XPM + if test x$ac_cv_has_xpm = xyes; then + XPM_LIB=-lXpm + AC_SUBST(XPM_LIB) + AC_X_SHAPE_EXTENSION + if test x$ac_cv_has_shape = xyes; then + AC_DEFINE(HAVE_XPM_SHAPE) + XEXT_LIB=-lXext + AC_SUBST(XEXT_LIB) + fi + fi +fi + + +dnl +dnl This code should be moved to the ac_WITH_SLANG +dnl +dnl We check for the existance of setupterm on curses library +dnl this is required to load certain definitions on some termcaps +dnl editions (AIX and OSF/1 I seem to remember). +dnl Note that we avoid using setupterm +case $screen_manager in +changequote(,)dnl + [Ss][Ll][Aa][Nn][Gg]*) +changequote([, ])dnl + if test $system = Linux + then + echo + else + AC_CHECK_LIB(curses,setupterm,[ + AC_TRY_COMPILE([ +#include +#include ],[ + if (key_end == parm_insert_line) + return 1; + return 0; +],[ + LIBS="$LIBS -lcurses" + AC_DEFINE(USE_SETUPTERM)])]) + fi + ;; +esac + +LIBS="$LIBS $posix_libs" + +insticons= +if test "x$no_xview" != "xyes"; then + insticons=install_icons +fi +AC_SUBST(insticons) + +CPPFLAGS="-I.. $CPPFLAGS" +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) + +ac_cv_make_with_percent_rules=no +if test x$ac_cv_prog_gnu_make = xyes; then + MCFG='include ../Make.common' + MCFGR='include ./Make.common' + MCF=/dev/null + PHONY='.PHONY:' + DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \ +include .depend \ +endif' + WRITEDEP=":" + ac_cv_make_with_percent_rules=yes +else + MCFG="" + MCFGR="" + MCF=./Make.common + PHONY='#' + DOTDEPEND="" + WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend' +fi +AC_SUBST(PHONY) +AC_SUBST(WRITEDEP) +AC_SUBST(MCFG) +AC_SUBST(MCFGR) +AC_SUBST(DOTDEPEND) +AC_SUBST_FILE(MCF) + +if test x$ac_cv_make_with_percent_rules = xyes; then + PCENTRULE="" +else + PCENTRULE="#" +fi +AC_SUBST(PCENTRULE) + +AC_OUTPUT(Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile \ + lib/mc.ext tk/Makefile gnome/Makefile xv/Makefile src/Makefile \ + slang/Makefile edit/Makefile icons/Makefile mcfn_install \ + vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR \ + vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar \ + doc/mc.1 doc/mcedit.1 doc/mcserv.8) + +if test x$srcdir != x; then + if test $srcdir != .; then + cp $srcdir/VERSION VERSION + mkdir nt + mkdir os2 + cp $srcdir/nt/Makefile nt/Makefile + cp $srcdir/os2/Makefile os2/Makefile + fi +fi + +if test "x$screen_manager" = xSLang; then + screen_manager="${screen_manager}${slang_term}" +fi + +echo " +Configuration: + + Source code location: ${srcdir} + Compiler: ${CC} + Compiler flags: ${CFLAGS} + File system: ${vfs_type} + ${vfs_flags} + Text mode screen manager: ${screen_manager} + Install console saver: ${install_saver} + Text mode mouse library: ${mouse_lib} + Debugger code: ${mem_debug} + With subshell support: ${subshell} + X11 versions: ${xvers} + Internal editor: ${EDIT_msg} + Install path: ${prefix}/bin, ${prefix}/lib/mc" +if test -n "$xv_bindir"; then +echo " XView version install path: ${xv_bindir}" +fi +echo "" diff --git a/create_vcs b/create_vcs new file mode 100755 index 000000000..389216f56 --- /dev/null +++ b/create_vcs @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Script by Jakub Jelinek +# +if test -e /dev/vcs0 +then + exit +fi + +I=0 +while [ $I -lt 64 ] +do + mknod /dev/vcs$I c 7 $I + chmod 622 /dev/vcs$I + chown root.tty /dev/vcs$I + mknod /dev/vcsa$I c 7 `expr $I + 128` + chmod 622 /dev/vcsa$I + chown root.tty /dev/vcsa$I + I=`expr $I + 1` +done diff --git a/doc/DEVEL b/doc/DEVEL new file mode 100644 index 000000000..6bee30dde --- /dev/null +++ b/doc/DEVEL @@ -0,0 +1,123 @@ +-*-outline-*- + +This is the developers' hint guide. +Some parts are based on mail messages. + +Please feel free to add your name to this list: +by Miguel de Icaza + +* Working with the Midnight Commander + + If you plan on working on the Midnight Commander, here are some + tips on how to make your development easier and my job of merging + your code easier, I find them useful. + +o Run make depend if you modify the source code structure (e.g. you + add/remove include files). This is very important, it will help you + to get an accurate compilation. + +o It's recommended that you use GNU Make (if you want to use the + depend feature). + +o I work with the tags feature of GNU emacs. Run the make tags + command to get an updated TAGS file. The command Alt-. will take + you to any function or variable definition. + +o Try to keep the indenting style as it is currently. Normally if you + just created a new file with a different coding style, run the GNU + indent program on it (remember to make a backup copy first) like + this: indent -kr -pcs filename.c + +o This code is distributed under the GNU General Public License and + Keep this in mind when adding code to the program. + +* Code structure. + + The program uses extensively the dialog manager written by Radek + Doulik. To understand how the dialog manager works, please read + the dlg.c and dlg.h. You will find the basic widgets in the file + widget.c and the widget.h file. If you understand this two files, + you are done. The files option.c and boxes.c contain some examples + of how the dialog manager functions are used. For a more complete + example, take a look at the main.c file. + + Take a look at the FILES file in the doc/ directory. It has a + roadmap of the files that make up the Midnight Commander. + + The file util.c has a lot of utility functions. Get familiar with + them, they are very simple. + + The code has almost no hardcoded limits, there are a lot of ways of + avoiding them. For example, when you want to concatenate strings, + use the copy_strings functions, it is used like this: + + new_text = copy_strings (username, " ", password, NULL); + + This mallocs the required area, so it still needs to be freed. + +* Upcoming changes. + +* Panels + +* Input handling + +The routines for input handling on the Midnight Commander are: +xgetch, get_key_code, mi_getch and get_event. + +xgetch is an interface to the low level system input mechanism. It +does not deal with the mouse. + + In the case of curses, this is a macro that translates to getch, on + BSD curses, it is an interface to x_getch. This routine on curses + translates key sequences to key codes (\E[A to something like + KEY_UP or whatever). + + In the case of slang there is no such conversion, that's why we + load a set of extra definitions. + +The get_key_code routine converts the data from xgetch to the +constants the Midnight Commander uses. + + In the case of slang, it will actually do all the jobs that getch + does for curses. In the case of curses it patches a couple of + sequences that are not available on some terminal databases. This + routine is the one you want to use if you want a character without + the mouse support. + +get_event is the routine you want to use if you want to handle mouse +events, it will return 0 on a mouse event, ERR if no input is +available or a key code if there is some input available. This +routine in turn uses get_key_code to decode the input stream and +convert it to useful constants. + +mi_getch is just a wrapper around get_event that ignores all the mouse +events. It's used only in a couple of places, this routine may return +ERR if no input is available (if you have set the nodelay option of +curses or slang with nodelay) or a character code if no such option is +available. + +* Mouse support. + +The mouse support in the Midnight Commander is based on the get_event +routine. The core of the mouse event dispatching is in the +dlg.c:run_dlg routine. + +* ncurses + +We are dropping it in favor of slang, but we will still support it. We +basically are using a small subset of ncurses because we want to be +compatible with Slang. + + +* The Dialog manager and the Widgets + +** Button widget + +** Check box widget + +** Radio widget + +** Input widget + +** Listbox widget + diff --git a/doc/FILES b/doc/FILES new file mode 100644 index 000000000..af7612513 --- /dev/null +++ b/doc/FILES @@ -0,0 +1,130 @@ +COPYING GNU General public license +INSTALL Installing directions +INSTALL.FAST Short directions for busy people +NEWS List of new features by version +README Mini documentation +create_vcs Creates /dev/vcs? entries for Linux > 1.1.92 +mcfn_install.in Templace for a script to install mc () function into your /etc/profile or ~/.profile +mc.spec.in Template for rpm specification file +mc.spec rpm secification file +doc/ Directory: Documentation files +doc/DEVEL Development hints +doc/FILES List of the files included in the distribution +doc/LSM Linux software map entry +doc/mc.1.in Template for MC anual page +doc/mcedit.1.in Template for MC edit anual page +doc/mcserv.8.in Template for MC file server manual page +install-sh Install command if BSD compatible install is not found +lib/ Directory: Additional useful files +lib/ansi.ti Terminfo database for generic ansi terminal +lib/linux.ti Enhanced terminfo database for Linux console +lib/mc.ext Sample executable extension file +lib/mc.menu Sample user menu file +lib/ncurses.h To be used if the real ncurses is not available +lib/tdiff Tool to compare two terminfo databases +lib/vt100.ti Enhanced terminfo database for vt100 terminal +lib/xnc.hlp The part of the mc.hlp file not produced from the mc.1 file +lib/xterm.ti Enhanced terminfo database for xterm terminal +lib/tkmc.wmconfig MC registration file for AnotherLevel RH desktop +lib/mcserv.pamd PAM registration file for mcserv service +lib/mcserv.init mcserv SySV init script for RH Linux +slang/ Directory: Slang screen manager (from Slang distribution) +slang/slang.h +slang/sldisply.c +slang/slerr.c +slang/slsmg.c +slang/slutty.c +src/ Directory: Midnight Commander source files +src/ChangeLog Detailed list of changes +src/GNUmakefile Makefile wrapper for GNU make +src/Makefile.in Makefile template for configure +src/TODO Things to be done, ongoing projects +src/achown.c Advanced chown/chmod dialog +src/auto.c Automatic mounting and unmounting +src/auto.h " +src/boxes.c Miscellaneous dialog boxes +src/boxes.h " +src/chmod.c Chown dialog +src/chmod.h " +src/chown.c Chmod dialog +src/chown.h " +src/cmd.c The commands implementation. +src/cmd.h " +src/color.c Color terminal detection and color definitions +src/color.h " +src/complete.c Completion of filenames etc. +src/complete.h " +src/configure Configures Midnight Commander for target machine +src/configure.in Configure template for GNU autoconf (2.x) +src/cons.handler.c API for taking advantage of cons.saver daemon +src/cons.saver.c Linux console image save and restore daemon +src/cons.saver.h Common header file for cons.handler.c and cons.saver.c +src/dialog.c Old dialog routines +src/dialog.h " +src/dir.c Loading and sorting of directory contents +src/dir.h " +src/dlg.c New dialog routines (see also widget.c) +src/dlg.h " +src/ext.c Executable extensions feature +src/ext.h " +src/file.c File operations (copy, move, delete) +src/file.h " +src/find.c File search feature +src/find.h " +src/fsusage.c File system space usage (from GNU fileutils) +src/fsusage.h " +src/gindex.pl Creates index for the mc.hlp file +src/global.h Some global definitions +src/help.c Hypertext help browser (for browsing the mc.hlp file) +src/help.h " +src/hotlist.c Directory hotlist +src/hotlist.h " +src/key.c Keyboard and mouse reading +src/key.h " +src/layout.c Division of the screen area between panels (layout dialog) +src/layout.h " +src/mad.c Simple memory allocation debugger (not normally used) +src/mad.h " +src/main.c Trash can +src/main.h " +src/man2hlp.c Creates mc.hlp and mc.html from mc.1 +src/mc.hlp Hypertext help file +src/mem.h Strcpy, memcpy, bcopy and friends +src/menu.c Menu bar and its drop-down menus +src/menu.h " +src/mountlist.c List of mounted filesystems (from GNU fileutils) +src/mountlist.h " +src/mouse.c Mouse initialization, mouse events (see also key.c) +src/mouse.h " +src/option.c Configuration dialog +src/option.h " +src/panel.h Directory panel structure definition +src/profile.c Code to handle MS-Windows style INI files (from WINE) +src/profile.h " +src/regex.c Regular expression code (from GNU regex library) +src/regex.h " +src/screen.c Outputting of the directory panels to the screen +src/setup.c Loading and saving of the setup +src/setup.h " +src/slint.c Support file for Slang screen manager +src/subshell.c Concurrent shell support (optional) +src/subshell.h " +src/terms.c Enter and exit the cursor addressing mode (xterm) +src/tree.c Directory tree feature +src/tree.h " +src/user.c User menu handling and macro capabilities +src/user.h " +src/util.c Useful utility routines (don't output to screen) +src/util.h " +src/vfs.c Virtual file system (to support transparent ftp, tar, zip etc.) +src/vfs.h " +src/view.c Internal file viewer +src/view.h " +src/widget.c Widgets for dialog manager (see also dlg.c) +src/widget.h " +src/win.c Useful utility routines (which output to screen) +src/win.h " +src/wtools.c Listbox and query dialog routines etc. +src/wtools.h " +src/xcurses.c BSD curses support +src/xmkdir Replacement for "mkdir -p /dir" because some systems don't support the -p flag diff --git a/doc/LSM b/doc/LSM new file mode 100644 index 000000000..ad87bc0d1 --- /dev/null +++ b/doc/LSM @@ -0,0 +1,57 @@ +Begin3 + +Title: Midnight Commander +Version: 4.1 +Entered-date: 25DEC97 + +Description: File manager and visual shell with transparent support + for tar, ftp, rpm, deb (and others) as file systems. + Builtin hex and text, editor and viewer. Online help, + file type interpretation, and hundreds of powerful + features and short cuts. + +Keywords: file directory manager shell browser utility curses + mouse menu visual user-friendly color vfs tar ftp gzip + undelete editor viewer + +Author: borsenkow.msk@sni.de (Andrej Borsenkow) + rodo@earn.cvut.cz (Radek Doulik) + mr854307@cs.nthu.edu.tw (Ching Hui) + miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) + jj@sunsite.mff.cuni.cz (Jakub Jelinek) + jtklehto@paju.oulu.fi (Janne Kukonlehto) + fredl@nebula.ow.org (Fred Leeflang) + mok@roxanne.nuclecu.unam.mx (Mauricio Plaza) + dugan@b011.eunet.es (Dugan Porter) + psheer@icon.co.za (Paul Sheer) + k3190@fh-sw.de (Norbert Warmuth) + +Maintained-by: miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) + +Primary-site: sunsite.unc.edu /pub/Linux/utils/file/managers/mc + 1200k mc-4.1.tar.gz + +Alternate-site: ftp.nuclecu.unam.mx /linux/local + 1200k mc-4.1.tar.gz + +Platforms: alpha-dec-osf, alpha-linux, hppa-hp-hpux, ix86-bsdi, + ix86-freebsd, ix86-linux, ix86-os2, ix86-sco, + ix86-solaris, ix86-windows95, ix86-windows-nt, + m68k-apple-aux, mc88110-aviion-dgux, mips-sgi-irix, + mips-dec-ultrix, powerpc-ibm-aix, powerpc-linux, + rs6000-ibm-aix, sparc-sun-netbsd, sparc-sun-solaris, + sparc-sun-sunos, sparc-linux, unixware. + + If mouse support is required on the + Linux console, then the GPM mouse server. + (available at iride.unipv.it:/pub/gpm) + (ftp.nuclecu.unam.mx:/linux/local) + + It is also preferable to use Rxvt as an X + Terminal if you are using mc under X. + (available at ftp.math.fu-berlin.de:/pub/rxvt) + (ftp.nuclecu.unam.mx:/linux/local) + +Copying-policy: GPL + +End diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 000000000..87d7f97a0 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,81 @@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +rootdir = $(srcdir)/.. +@MCFG@@MCF@ + +# +# Distribution variables +# + +DISTDOC = Makefile.in LSM DEVEL FILES mc.sgml linuxdoc-sgml.diff \ + mc.1.in mcedit.1.in mcserv.8.in +LINUXDOCDIR = /usr/local/linuxdoc-sgml + +all: + +install: + -$(SEDCMD2) < $(srcdir)/mc.1 > $(DESTDIR)$(mandir)/$(manprefix)mc.$(manext) + -$(SEDCMD2) < $(srcdir)/mcedit.1 > $(DESTDIR)$(mandir)/$(manprefix)mcedit.$(manext) + -$(SEDCMD2) < $(srcdir)/mcserv.8 > $(DESTDIR)$(man8dir)/$(manprefix)mcserv.$(man8ext) + +uninstall: + -cd $(mandir); $(RMF) $(manprefix)mc.$(manext) + -cd $(mandir); $(RMF) $manprefix)mcedit.$(manext) + -cd $(man8dir); $(RMF) $(manprefix)mcserv.$(man8ext) + +check: + @echo no tests are supplied. + +TAGS: + +cross: + +alldoc: mc.html mc.info mc.dvi mc.ps mc.tex mc.txt mc.hlp mc.texi mc.1 mcedit.1 + +mc.html: mc.sgml + -mkdir html + cd html; $(LN_S) $(srcdir)/mc.sgml .; $(LINUXDOCDIR)/bin/format -T htmlx mc; $(RMF) mc.sgml + if test -f html/FILEROOT.html; then mv html/FILEROOT.html html/mc.html; fi + +mc.info: mc.sgml + -mkdir info + cd info; $(LINUXDOCDIR)/bin/format -T info $(srcdir)/mc > mc.info + +mc.dvi: mc.sgml + $(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc | $(LINUXDOCDIR)/bin/qtex -d > mc.dvi + +mc.ps: mc.sgml + $(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc | $(LINUXDOCDIR)/bin/qtex > mc.ps + +mc.tex: mc.sgml + $(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc > mc.tex + +mc.txt: mc.sgml + $(LINUXDOCDIR)/bin/format -T ascii $(srcdir)/mc > mc.txt + +../src/fixhlp: + cd ../src; $(MAKE) fixhlp + +mc.hlp: mc.sgml ../src/fixhlp $(datadir)/xnc.hlp + $(LINUXDOCDIR)/bin/format -T hlp $(srcdir)/mc | ../src/fixhlp 58 mc.hlp.toc > mc.hlp.tmp + cat mc.hlp.toc mc.hlp.tmp $(datadir)/xnc.hlp > mc.hlp + $(RMF) mc.hlp.toc mc.hlp.tmp + +mc.texi: mc.sgml + $(LINUXDOCDIR)/bin/format -T texi $(srcdir)/mc > mc.texi + +mc.1: mc.sgml + $(LINUXDOCDIR)/bin/format -T man $(srcdir)/mc > mc.1 + +clean: + +realclean: + +distclean: + -$(RMF) $(srcdir)/*~ $(srcdir)/Makefile $(srcdir)/*.1 $(srcdir)/*.8 + +distcopy: + $(CP) $(DISTDOC) ../../mc-$(VERSION)/doc + +depend dep: diff --git a/doc/linuxdoc-sgml.diff b/doc/linuxdoc-sgml.diff new file mode 100644 index 000000000..b84eef855 --- /dev/null +++ b/doc/linuxdoc-sgml.diff @@ -0,0 +1,814 @@ +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/bin/format linuxdoc-sgml/bin/format +--- /home/jj/src/mc-old/linuxdoc-sgml/bin/format Sun Sep 17 23:34:49 1995 ++++ linuxdoc-sgml/bin/format Mon Sep 18 23:00:26 1995 +@@ -134,6 +134,16 @@ + $SGMLS | $SGMLSASP $USERREP $REP | expand $TABS | \ + mkinfo $SGMLFILE + ;; ++ texi) ++ # format the document, writing to standard out ++ TYPE=info ++ SGML_PATH=$REPDIR/$TYPE/%N:$SGML_PATH ++ REP=$REPDIR/$TYPE/mapping; ++ ++ sed 's/\@/\@\@/g' $SGMLFILE | \ ++ $SGMLS | $SGMLSASP $USERREP $REP | expand $TABS | \ ++ mkinfo $SGMLFILE -texi ++ ;; + *) + # format the document, writing to standard out + REP=$REPDIR/$TYPE/mapping; +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/bin/mkinfo linuxdoc-sgml/bin/mkinfo +--- /home/jj/src/mc-old/linuxdoc-sgml/bin/mkinfo Thu Aug 24 20:24:19 1995 ++++ linuxdoc-sgml/bin/mkinfo Mon Sep 18 22:43:43 1995 +@@ -171,7 +171,11 @@ + } + } + ' $TMP > $TMP2 ++if test -n "$2"; then ++cat $TMP2 ++else + $MAKEINFO $TMP2 -o $INFO ++fi + + rm -f $TMP $TMP2 + # end of mkinfo script +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/dtd/linuxdoc.dtd linuxdoc-sgml/dtd/linuxdoc.dtd +--- /home/jj/src/mc-old/linuxdoc-sgml/dtd/linuxdoc.dtd Sun Jun 18 21:02:42 1995 ++++ linuxdoc-sgml/dtd/linuxdoc.dtd Fri Sep 22 16:34:38 1995 +@@ -8,7 +8,7 @@ + + + ++ " label|ref|lnk|pageref|cite|url|htmlurl|ncite " > + + +@@ -138,7 +138,7 @@ + "^" circ + "{" lcub + "}" rcub +- "|" verbar> ++ "|" verbar > + --> + + +@@ -257,7 +257,7 @@ + "^" circ + "{" lcub + "}" rcub +- "|" verbar> ++ "|" verbar > + + + +@@ -274,7 +274,7 @@ + "^" circ + "{" lcub + "}" rcub +- "|" verbar> ++ "|" verbar > + + + +@@ -312,7 +312,7 @@ + "%" percnt + "^" circ + "{" lcub +- "}" rcub > ++ "}" rcub > + + + +@@ -350,7 +350,7 @@ + "^" circ + "{" lcub + "}" rcub +- "|" verbar> ++ "|" verbar > + + + +@@ -362,6 +362,12 @@ + id cdata #required + name cdata "&refnam"> + ++ ++ ++ ++ + + + + + +- ++ ++ ++ ++ + + + +@@ -532,7 +545,7 @@ + "^" circ + "{" lcub + "}" rcub +- "|" verbar> ++ "|" verbar > + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/lib/linuxdoc-sgml.sty linuxdoc-sgml/lib/linuxdoc-sgml.sty +--- /home/jj/src/mc-old/linuxdoc-sgml/lib/linuxdoc-sgml.sty Tue Jun 7 21:13:36 1994 ++++ linuxdoc-sgml/lib/linuxdoc-sgml.sty Mon Sep 18 23:22:36 1995 +@@ -69,7 +69,8 @@ + \noindent + {\huge\sf \@title}\\ + \rule{\textwidth}{1mm}\\ +-\mbox{} \@author\ \hfill \@date\ \\ ++\mbox{} \@author\ \\ ++\mbox{} \@date\ \\ + \vskip 1 ex + \noindent{\sf \@abstract} + \setcounter{footnote}{0}% +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/general linuxdoc-sgml/rep/grops/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/general Tue Jun 7 21:13:44 1994 ++++ linuxdoc-sgml/rep/grops/general Fri Sep 22 23:43:44 1995 +@@ -88,6 +88,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/mapping linuxdoc-sgml/rep/grops/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/mapping Tue Jun 7 21:13:44 1994 ++++ linuxdoc-sgml/rep/grops/mapping Fri Sep 22 23:57:42 1995 +@@ -562,6 +562,9 @@ + + + ".LP\np.s." + ++ "[URL]" ++ ++ + + % end of roff replacement file + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/general linuxdoc-sgml/rep/hlp/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/general Thu Jan 1 01:00:00 1970 ++++ linuxdoc-sgml/rep/hlp/general Fri Sep 22 23:43:59 1995 +@@ -0,0 +1,114 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++" > ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/mapping linuxdoc-sgml/rep/hlp/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/mapping Thu Jan 1 01:00:00 1970 ++++ linuxdoc-sgml/rep/hlp/mapping Thu Sep 21 23:04:06 1995 +@@ -0,0 +1,95 @@ ++ ++ ++% qwertz manual replacement file ++% produces GNU Midnight Commander's hlp format ++ ++
++
++ ++ + "\"" ++ ++ + "\"" ++ ++ + "\"" ++ ++ ++ + "\[" ++ ++ + "\[ " ++ ++ + "\[ " ++ ++ + "\[ " ++ ++ + "\[ " ++ ++ + "\[ " ++ ++ ++ ++ "\n\n" ++ ++

+ "\n" + ++

++ ++ ++ "7" ++ "1\n\n" ++ "7" ++ "1\n\n" ++ "7" ++ "1\n\n" ++ ++% number register bi means "begin item". Used in the .P macro to print ++% bullets or numbers at beginning of first paragraph of an item. ++% If bi=1 then the paragraph is the first one of the item. ++ ++ "\n4\n\no 7" ++ ++ ++ "\n4\n\n" ++ " /7" ++ ++ "" ++ "" ++ ++ "" ++ ++ ++ "" ++ " " ++ ++ "" ++ " " ++ ++ "" ++ " " ++ ++ "" ++ " " ++ ++ "" ++ " " ++ ++ "" ++ " " ++ ++ ++ + "" + ++ + "" + ++ ++ ++ ++ ++% within code and verb, first turn off the escape mechanism ++ ++ + "\nv" ++ + "n" ++ + "\nv" ++ + "n" ++ + "[NAME][ID]" ++ ++ + "[NAME][ID]" ++ ++ + "[URL]" ++ +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/math linuxdoc-sgml/rep/hlp/math +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/math Thu Jan 1 01:00:00 1970 ++++ linuxdoc-sgml/rep/hlp/math Tue Jun 7 21:13:42 1994 +@@ -0,0 +1,114 @@ ++ ++ ++ ++ ++=}' > ++ ++ ++ ++ ++ ++ ++ ++}' > ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++}' > ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/html/general linuxdoc-sgml/rep/html/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/html/general Tue Aug 15 06:15:35 1995 ++++ linuxdoc-sgml/rep/html/general Fri Sep 22 23:44:19 1995 +@@ -66,7 +66,10 @@ + + + +- ++ ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/html/mapping linuxdoc-sgml/rep/html/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/html/mapping Wed Aug 16 04:36:12 1995 ++++ linuxdoc-sgml/rep/html/mapping Sun Sep 17 22:48:50 1995 +@@ -171,6 +171,11 @@ + "<@@endref>" + + + ++ + "<@@ref>[ID]\n" ++ "[NAME] \n" ++ "<@@endref>" + ++ ++ + + "<@@ref>[ID]" + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/info/general linuxdoc-sgml/rep/info/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/info/general Sun Jun 25 04:13:41 1995 ++++ linuxdoc-sgml/rep/info/general Fri Sep 22 23:44:34 1995 +@@ -69,6 +69,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/info/mapping linuxdoc-sgml/rep/info/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/info/mapping Sun Jun 25 04:13:41 1995 ++++ linuxdoc-sgml/rep/info/mapping Fri Sep 22 23:58:20 1995 +@@ -166,6 +166,9 @@ + + "@REF [ID]" + + ++ + "[NAME]\n@REF [ID]" ++ ++ + "@REF [ID]" + + +@@ -330,6 +333,9 @@ + + + "\\hline" + + ++ ++ "[URL]" ++ + + % end of texinfo replacement file + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/general linuxdoc-sgml/rep/latex/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/general Tue Aug 15 06:13:56 1995 ++++ linuxdoc-sgml/rep/latex/general Fri Sep 22 23:44:54 1995 +@@ -67,6 +67,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/mapping linuxdoc-sgml/rep/latex/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/mapping Sun Jun 25 05:42:46 1995 ++++ linuxdoc-sgml/rep/latex/mapping Mon Sep 18 23:15:50 1995 +@@ -71,7 +71,7 @@ + " \\\\\n\\\\" + + + +- + "\\date{" ++ + "\n\n\\date{" + "}" + + + "\\\\ " +@@ -201,6 +201,9 @@ + + "\\ref{[ID]}" + ++ ++ "[NAME] (see \\ref{[ID]})" ++ + + "\\pageref{[ID]}" + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/general linuxdoc-sgml/rep/latin1/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/general Tue Jun 7 21:13:40 1994 ++++ linuxdoc-sgml/rep/latin1/general Fri Sep 22 23:45:09 1995 +@@ -66,6 +66,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/mapping linuxdoc-sgml/rep/latin1/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/mapping Tue Jun 7 21:13:41 1994 ++++ linuxdoc-sgml/rep/latin1/mapping Fri Sep 22 23:58:51 1995 +@@ -541,6 +541,9 @@ + + + ".LP\np.s." + ++ "[URL]" ++ ++ + + % end of roff replacement file + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/man/general linuxdoc-sgml/rep/man/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/man/general Sun Aug 6 22:00:58 1995 ++++ linuxdoc-sgml/rep/man/general Fri Sep 22 23:45:23 1995 +@@ -71,6 +71,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/man/mapping linuxdoc-sgml/rep/man/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/man/mapping Thu Jul 13 18:57:50 1995 ++++ linuxdoc-sgml/rep/man/mapping Fri Sep 22 23:59:07 1995 +@@ -3,12 +3,13 @@ + % qwertz manual replacement file + % produces nroff using the man macros + ++ + ".TH [TITLE] [SECTNUM] \"[DATE]\"\n.SH NAME\n[NAME]\n" + +- + ".if n .ds Q \\&\"\n" ++ ++
+ ".if n .ds Q \\&\"\n" + ".if t .ds Q ``\n" + ".if n .ds U \\&\"\n" + ".if t .ds U ''\n" +- ".TH [TITLE] [SECTNUM] \n" + + % James Clark's trick to prevent unintended paragraph + % breaks +@@ -56,10 +57,27 @@ + ".\\}\n" + "..\n" + +- ++
++ ++ + ".\\\"" ++ ++ + ".\\\"" ++ ++ + ".\\\"" ++ + ++ + ".SH " ++ + + ".SH " + ++ + ".SH " ++ ++ + ".SH " ++ ++ + ".SH " ++ ++ + ".SH " ++ + + + "\n\n" +@@ -154,4 +172,11 @@ + ".ft P\n" + ".sp" + + ++ + "[NAME]" ++ ++ ++ + "[NAME]" ++ + ++ + "[URL]" ++ +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/max/general linuxdoc-sgml/rep/max/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/max/general Tue Jun 7 21:13:39 1994 ++++ linuxdoc-sgml/rep/max/general Fri Sep 22 23:45:39 1995 +@@ -66,6 +66,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/max/mapping linuxdoc-sgml/rep/max/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/max/mapping Tue Jun 7 21:13:38 1994 ++++ linuxdoc-sgml/rep/max/mapping Fri Sep 22 23:59:46 1995 +@@ -10,6 +10,9 @@ +
+ "
" + +
+ "
" + + ++ + " ++ + + "" + + + "" + + +@@ -385,6 +388,9 @@ + + + "" + + + "" + ++ ++ "" ++ "" + + + % end of max replacement file +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/mgm/mapping linuxdoc-sgml/rep/mgm/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/mgm/mapping Tue Jun 7 21:13:37 1994 ++++ linuxdoc-sgml/rep/mgm/mapping Sat Sep 23 00:00:06 1995 +@@ -517,6 +517,9 @@ + + + ".P 0\np.s." + ++ "[URL]" ++ ++ + + % end of roff replacement file + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/min/general linuxdoc-sgml/rep/min/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/min/general Tue Jun 7 21:13:40 1994 ++++ linuxdoc-sgml/rep/min/general Fri Sep 22 23:45:56 1995 +@@ -66,6 +66,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/min/mapping linuxdoc-sgml/rep/min/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/min/mapping Tue Jun 7 21:13:39 1994 ++++ linuxdoc-sgml/rep/min/mapping Sat Sep 23 00:00:28 1995 +@@ -11,6 +11,9 @@ +
+ "
" + +
+ "
" + + ++ + " ++ + + "" + + + "" + + +@@ -385,6 +388,9 @@ + + + "" + + + "" + ++ ++ "[URL]" ++ + + + % end of min replacement file +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/general linuxdoc-sgml/rep/nroff/general +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/general Tue Jul 18 04:51:59 1995 ++++ linuxdoc-sgml/rep/nroff/general Sat Sep 23 00:01:38 1995 +@@ -72,6 +72,9 @@ + + + ++ ++ ++ + + + +diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/mapping linuxdoc-sgml/rep/nroff/mapping +--- /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/mapping Sun Jun 18 18:56:03 1995 ++++ linuxdoc-sgml/rep/nroff/mapping Sat Sep 23 00:00:48 1995 +@@ -637,5 +637,8 @@ + + + ".LP\np.s." + ++ "[URL]" ++ ++ + + % end of roff replacement file diff --git a/doc/mc.1.in b/doc/mc.1.in new file mode 100644 index 000000000..dffd951db --- /dev/null +++ b/doc/mc.1.in @@ -0,0 +1,3038 @@ +.TH mc 1 "20 October 1997" +.\"SKIP_SECTION" +.SH NAME +mc \- Visual shell for Unix-like systems. +.\"SKIP_SECTION" +.SH USAGE +.B mc +[\-abcCdfhPstuUVx?] [\-l log] [dir1 [dir2]] [-v file] +.SH DESCRIPTION +.LP +The Midnight Commander is a directory browser/file manager for +Unix-like operating systems. +.\".\"DONT_SPLIT" +.SH OPTIONS +.TP +.I "\-a" +Disables the usage of graphic characters for line drawing. +.TP +.I "\-b" +Forces black and white display. +.TP +.I "\-c" +Force color mode, please check the section +.\"LINK2" +Colors +.\"Colors" +for more information. +.TP +.I "\-C arg" +Used to specify a different color set in the command line. The format +of arg is documented in the +.\"LINK2" +Colors +.\"Colors" +section. +.TP +.I "\-d" +Disables mouse support. +.TP +.I "\-f" +Displays the compiled-in search paths for Midnight Commander files. +.TP +.I "\-k" +Reset softkeys to their default from the termcap/terminfo +database. Only useful on HP terminals when the function keys don't work. +.TP +.I "-l file" +Save the ftpfs dialog with the server in file. +.TP +.I "\-P" +At program end, the Midnight Commander will print the last working +directory; this, along with the shell function below, will allow you +to browse through your directories and automatically move to the last +directory you were in (thanks to Torben Fjerdingstad and Sergey for +contributing this function and the code which implements this option). +.nf + +bash and zsh users: + +mc () +{ + MC=/tmp/mc$$-"$RANDOM" + @prefix@/bin/mc -P "$@" > "$MC" + cd "`cat $MC`" + rm "$MC" + unset MC; +} + +tcsh users: +alias mc 'setenv MC `@prefix@/bin/mc -P \!*`; cd $MC; unsetenv MC' +.fi +.TP +I know the bash function could be shorter for zsh and bash but the +backquotes on bash won't accept your suspension the program with +C-z. +.TP +.I "\-s" +Turns on the slow terminal mode, in this mode the program will not +draw expensive line drawing characters and will toggle verbose mode +off. +.TP +.I "\-t" +Used only if the code was compiled with Slang and terminfo: it makes +the Midnight Commander use the value of the +.B TERMCAP +variable for the terminal information instead of the information on +the system wide terminal database +.TP +.I "\-u" +Disables the use of a concurrent shell (only makes sense if the +Midnight Commander has been built with concurrent shell support). +.TP +.I "\-U" +Enables the use of the concurrent shell support (only makes sense if +the Midnight Commander was built with the subshell support set as an +optional feature). +.TP +.I "\-v file" +Enters the internal viewer to view the file specified. +.TP +.I "\-V" +Displays the version of the program. +.TP +.I "\-x" +Forces xterm mode. Used when running on xterm-capable terminals (two +screen modes, and able to send mouse escape sequences). +.PP +If specified, the first path name is the directory to show in the +selected panel; the second path name is the directory to be shown in +the other panel. +.PP +.SH "Overview" +The screen of the Midnight Commander is divided into four parts. Almost +all of the screen space is taken up by two directory panels. By default, +the second bottommost line of the screen is the shell command line, and +the bottom line shows the function key labels. The topmost line is the +.\"LINK2" +menu bar line. +.\"Menu Bar" +The menu bar line may not be visible, but appears if you click the +topmost line with the mouse or press the F9 key. +.PP +The Midnight Commander provides a view of two directories at the same +time. One of the panels is the current panel (a selection bar is in +the current panel). Almost all operations take place on the current +panel. Some file operations like Rename and Copy by default use the +directory of the unselected panel as a destination (don't worry, they +always ask you for confirmation first). For more information, see the +sections on the +.\"LINK2" +Directory Panels, +.\"Directory Panels" +the +.\"LINK2" +Left and Right Menus +.\"Left and Right Menus" +and the +.\"LINK2" +File Menu. +.\"File Menu" +.PP +You can execute system commands from the Midnight Commander by simply +typing them. Everything you type will appear on the shell command line, +and when you press Enter the Midnight Commander will execute the +command line you typed; read the +.\"LINK2" +Shell Command Line +.\"Shell Command Line" +and +.\"LINK2" +Input Line Keys +.\"Input Line Keys" +sections to learn more about the command line. +.PP +.SH "Mouse Support" +The Midnight Commander comes with mouse support. It is activated +whenever you are running on an +.B xterm(1) +terminal (it even works if you take a telnet or rlogin connection to +another machine from the xterm) or if you are running on a Linux +console and have the +.B gpm +mouse server running. +.PP +When you left click on a file in the directory panels, that file is +selected; if you click with the right button, the file is marked (or +unmarked, depending on the previous state). +.PP +Double-clicking on a file will try to execute the command if it is +an executable program; and if the +.\"LINK2" +extension file +.\"Extension File Edit" +has a program specified for the file's extension, the specified +program is executed. +.PP +Also, it is possible to execute the commands assigned to the function +key labels by clicking on them. +.PP +If a mouse button is clicked on the top frame line of the directory +panel, it is scrolled one pageful backward. Correspondingly, a click on +the bottom frame line will cause a scroll of one pageful forward. This +frame line method works also in the +.\"LINK2" +Help Viewer +.\"Help" +and the +.\"LINK2" +Directory Tree. +."Directory Tree" +.PP +The default auto repeat rate for the mouse buttons is 400 +milliseconds. This may be changed to other values by editing the +.\"LINK2" +\&~/.mc/ini +.\"Save Setup" +file and changing the +.I mouse_repeat_rate +parameter. +.PP +If you are running the Commander with the mouse support, you can bypass +the Commander and get the default mouse behavior (cutting and pasting +text) by holding down the Shift key. +.SH "" +.SH "Keys" +Some commands in the Midnight Commander involve the use of the +.I Control +(sometimes labeled CTRL or CTL) and the +.I Meta +(sometimes labeled ALT or even Compose) keys. In this manual we will +use the following abbreviations: +.PP +C- means hold the Control key while typing the character +. Thus C-f would be: hold the Control key and type f. +.PP +M- means hold the Meta or Alt key down while typing . If +there is no Meta or Alt key, type ESC, release it, then type the +character . +.PP +All input lines in the Midnight Commander use an approximation to +the GNU Emacs editor's key bindings. +.PP +There are many sections which tell about the keys. The following are +the most important. +.PP +The +.\"LINK2" +File Menu +.\"File Menu" +section documents the keyboard shortcuts for the commands appearing in +the File menu. This section includes the function keys. Most of these +commands perform some action, usually on the selected file or the +tagged files. +.PP +The +.\"LINK2" +Directory Panels +.\"Directory Panels" +section documents the keys which select a file or tag files as a +target for a later action (the action is usually one from the file +menu). +.PP +The +.\"LINK2" +Shell Command Line +.\"Shell Command Line" +section list the keys which are used for entering and editing command +lines. Most of these copy file names and such from the directory +panels to the command line (to avoid excessive typing) or access the +command line history. +.PP +.\"LINK2" +Input Line Keys +.\"Input Line Keys" +are used for editing input lines. This means both the command line and +the input lines in the query dialogs. +.PP +.SH " Miscellaneous Keys" +Here are some keys which don't fall into any of the other categories: +.PP +.B Enter. +If there is some text in the command line (the one at the bottom of +the panels), then that command is executed. If there is no text in the +command line then if the selection bar is over a directory the +Midnight Commander does a +.B chdir(2) +to the selected directory and reloads the information on the panel; +if the selection is an executable file then it is executed. Finally, +if the extension of the selected file name matches one of the +extensions in the +.\"LINK2" +extensions file +.\"Extension File Edit" +then the corresponding command is executed. +.PP +.B C-l. +Repaint all the information in the Midnight Commander. +.PP +.B C-x c. +Run the +.\"LINK2" +Chmod +.\"Chmod" +command on a file or on the tagged files. +.PP +.B C-x o. +Run the +.\"LINK2" +Chown +.\"Chown" +command on the current file or on the tagged files. +.PP +.B C-x l. +Run the link command. +.PP +.B C-x s. +Run the symbolic link command. +.PP +.B C-x i. +Set the other panel display mode to information. +.PP +.B C-x q. +Set the other panel display mode to quick view. +.PP +.B C-x !. +Execute the +.\"LINK2" +External panelize +.\"External panelize" +command. +.PP +.B C-x h +Run the +.\"LINK2" +add directory to hotlist +.\"Hotlist" +command. +.PP +.B M-!, +Executes the Filtered view command, described in the +.\"LINK2" +view command. +.\"Internal File Viewer" +.PP +.B M-?, +Executes the +.\"LINK2" +Find file +.\"Find File" +command. +.PP +.B M-c, +Pops up the +.\"LINK2" +quick cd +.\"Quick cd" +dialog. +.PP +.B C-o, +When the program is being run in the Linux or SCO console or under an xterm, +it will show you the output of the previous command. When ran on the +Linux console, the Midnight Commander uses an external program +(cons.saver) to handle saving and restoring of information on the +screen. +.PP +When the subshell support is compiled in, you can type C-o at any time +and you will be taken back to the Midnight Commander main screen, to +return to your application just type C-o. If you have an application +suspended by using this trick, you won't be able to execute other +programs from the Midnight Commander until you terminate the suspended +application. +.PP +.SH " Directory Panels" +This section lists the keys which operate on the directory panels. If +you want to know how to change the appearance of the panels take a +look at the section on +.\"LINK2" +Left and Right Menus. +.\"Left and Right Menus" +.PP +.B Tab, C-i. +Change the current panel. The old other panel becomes the new current +panel and the old current panel becomes the new other panel. The +selection bar moves from the old current panel to the new current +panel. +.PP +.B Insert, C-t. +To tag files you may use the Insert key (the kich1 terminfo sequence) +or the C-t (Control-t) sequence. To untag files, just retag a tagged +file. +.PP +.B M-g, M-h (or M-r), M-j. +Used to select the top file in a panel, the middle file and the bottom one, +respectively. +.PP +.B C-s, M-s. +Start a filename search in the directory listing. When the search is +active the keypresses will be added to the search string instead of +the command line. If the +.I "Show mini-status" +option is enabled the search string is shown on the mini-status +line. When typing, the selection bar will move to the next file +starting with the typed letters. The +.I "backspace" or DEL +keys can be used to correct typing mistakes. If C-s is pressed +again, the next match is searched for. +.PP +.B M-t +Toggle the current display listing to show the next display listing +mode. With this it is possible to quickly switch from long listing +to regular listing and the user defined listing mode. +.PP +.B C-\\\\ (control-backslash). +Show the +.\"LINK2" +directory hotlist +.\"Hotlist" +and change to the selected directory. +.PP +.B + \ (plus). +This is used to select (tag) a group of files. The Midnight Commander +will prompt for a regular expression describing the group. When +.I Shell Patterns +are enabled, the regular expression is much like the regular +expressions in the shell (* standing for zero or more characters and ? +standing for one character). If +.I Shell Patterns +is off, then the tagging of files is done with normal regular +expressions (see ed (1)). +.PP +If the expression starts or ends with a slash (/), then it will select +directories instead of files. +.PP +.B \\\\ (backslash). +Use the "\\" key to unselect a group of files. This is the opposite of +the Plus key. +.PP +.B up-key, C-p. +Move the selection bar to the previous entry in the panel. +.PP +.B down-key, C-n. +Move the selection bar to the next entry in the panel. +.PP +.B home, a1, M-<. +Move the selection bar to the first entry in the panel. +.PP +.B end, c1, M->. +Move the selection bar to the last entry in the panel. +.PP +.B next-page, C-v. +Move the selection bar one page down. +.PP +.B prev-page, M-v. +Move the selection bar one page up. +.PP +.B M-o, +If the other panel is a listing panel and you are standing on a +directory in the current panel, then the other panel contents are set +to the contents of the currently selected directory (like Emacs' dired +C-o key) otherwise the other panel contents are set to the parent dir +of the current dir. +.PP +.B C-PageUp, C-PageDown +Only when ran on the Linux console: does a chdir to ".." and to the +currently selected directory respectively. +.PP +.SH " Shell Command Line" +This section lists keys which are useful to avoid excessive typing when +entering shell commands. +.PP +.B M-Enter. +Copy the currently selected file name to the command line. +.PP +.B C-Enter. +Same a M-Enter, this one only works on the Linux console. +.PP +.B M-Tab. +Does the filename, command, variable, username and hostname +.\"LINK2" +completion +.\"Completion" +for you. +.PP +.B C-x t, C-x C-t. +Copy the tagged files (or if there are no tagged files, the selected +file) of the current panel (C-x t) or of the other panel (C-x C-t) to +the command line. +.PP +.B C-x p, C-x C-p. +The first key sequence copies the current path name to the command +line, and the second one copies the unselected panel's path name to +the command line. +.PP +.B C-q. +The quote command can be used to insert characters that are otherwise +interpreted by the Midnight Commander (like the '+' symbol) +.PP +.B M-p, M-n. +Use these keys to browse through the command history. M-p takes you +to the last entry, M-n takes you to the next one. +.PP +.B M-h. +Displays the history for the current input line. +.PP +.SH " General Movement Keys" +The help viewer, the file viewer and the directory tree use common +code to handle moving. Therefore they accept exactly the same +keys. Each of them also accepts some keys of its own. +.PP +Other parts of the Midnight Commander use some of the same movement +keys, so this section may be of use for those parts too. +.PP +.B Up, C-p. +Moves one line backward. +.PP +.B Down, C-n. +Moves one line forward. +.PP +.B Prev Page, Page Up, M-v. +Moves one pageful backward. +.PP +.B Next Page, Page Down, C-v. +Moves one pageful forward. +.PP +.B Home, A1. +Moves to the beginning. +.PP +.B End, C1. +Move to the end. +.PP +The help viewer and the file viewer accept the following keys in +addition the to ones mentioned above: +.PP +.B b, C-b, C-h, Backspace, Delete. +Moves one pageful backward. +.PP +.B Space bar. +Moves one pageful forward. +.PP +.B u, d. +Moves one half of a page backward or forward. +.PP +.B g, G. +Moves to the beginning or to the end. +.PP +.SH " Input Line Keys" +The input lines (they are used for the +.\"LINK2" +command line +.\"Shell Command Line" +and for the query dialogs in the program) accept these keys: +.PP +.B C-a +puts the cursor at the beginning of line. +.PP +.B C-e +puts the cursor at the end of the line. +.PP +.B C-b, move-left +move the cursor one position left. +.PP +.B C-f, move-right +move the cursor one position right. +.PP +.B M-f +moves one word forward. +.PP +.B M-b +moves one word backward. +.PP +.B C-h, backspace +delete the previous character. +.PP +.B C-d, Delete +delete the character in the point (over the cursor). +.PP +.B C-@ +sets the mark for cutting. +.PP +.B C-w +copies the text between the cursor and the mark to a kill buffer and +removes the text from the input line. +.PP +.B M-w +copies the text between the cursor and the mark to a kill buffer. +.PP +.B C-y +yanks back the contents of the kill buffer. +.PP +.B C-k +kills the text from the cursor to the end of the line. +.PP +.B M-p, M-n +Use these keys to browse through the command history. M-p takes you +to the last entry, M-n takes you to the next one. +.PP +.B M-C-h, M-Backspace +delete one word backward. +.PP +.B M-Tab +does the filename, command, variable, username and hostname +.\"LINK2" +completion +.\"Completion" +for you. +.PP +.SH "" +.SH "Menu Bar" +The menu bar pops up when you press F9 or click the mouse on the top +row of the screen. The menu bar has five menus: "Left", "File", +"Command", "Options" and "Right". +.PP +The +.\"LINK2" +Left and Right Menus +.\"Left and Right Menus" +allow you to modify the appearance of the left and right directory +panels. +.PP +The +.\"LINK2" +File Menu +.\"File Menu" +lists the actions you can perform on the currently selected file or +the tagged files. +.PP +The +.\"LINK2" +Command Menu +.\"Command Menu" +lists the actions which are more general and bear no relation to the +currently selected file or the tagged files. +.PP +.SH " Left and Right Menus" +The outlook of the directory panels can be changed from the +.B "Left" +and +.B "Right" +menus. +.PP +.SH " Listing Mode..." +The listing mode view is used to display a listing of files, there are +four different listing modes available: +.B Full, +.B Brief, +.B Long, +and +.B User. +The full directory view shows the file name, the size of the file and +the modification time. +.PP +The brief view shows only the file name and it has two columns +(therefore showing twice as many files as other views). The long view +is similar to the output of +.B "ls -l" +command. The long view takes the whole screen width. +.PP +If you choose the "User" display format, then you have to specify +the display format. +.PP +The user display format must start with a panel size specifier. This +may be "half" or "full", and they specify a half screen panel and a +full screen panel respectively. +.PP +After the panel size, you may specify the two columns mode on the +panel, this is done by adding the number "2" to the user format +string. +.PP +After this you add the name of the fields with an optional size +specifier. This are the available fields you may display: +.PP +.B name, +displays the file name. +.PP +.B size, +displays the file size. +.PP +.B bsize, +is an alternative form of the