Back in the Mac OS X 10.2.x days, compiling mc on your own wasn't for the faint of heart. I too have almost given up hope on getting it to work when I noticed that the nice people at the Fink project have it. Unfortunately, the Fink copy is barely usable, with the Fink project seemingly more interested in the GUI part of mc - there is a graphical counterpart which is an integral part of the GNOME desktop. Not exactly what I wanted. All this means you end up with a dozen unnecessary packages getting installed on your system, along with a console version which you'll find yourself starting as:
screen /sw/bin/mc
... just to get a proper display and your function keys working. Unfortunately, using screen immediately adds two disadvantages: you lose Contrl-O, which requires an xterm Terminal; also, after quitting, you get returned to the directory you originally started from instead of where you were last working in mc. And this is just in addition to the seemingly absent subshell support - the command prompt in mc was always stuck displaying a mere $ sign instead of my complete bash prompt.
The great news is that you no longer have to put up with all these deficiencies, thanks to the improvements in Panther and mc, you can now compile your own copy without a hitch! Read on to see how.NOTE: If you do have Fink, you can comfortably install glib with it and skip right ahead to STEP 2.
STEP 0: Install some prerequisites
pkgconfig is needed to compile glib, a library mc relies on. Download the latest version from its official site. Currently, it's pkgconfig-0.15.0.tar.gz. Then unpack, compile & install:
% tar -xvzf ~/Desktop/pkgconfig-0.15.0.tar.gz
% cd pkgconfig-0.15.0/
% ./configure
% make
% sudo make install
You'll also need GNU gettext, which can be found in this folder: gettext-0.13.tar.gz.
The same tired routine:
% tar -xvzf ~/Desktop/gettext-0.13.tar.gz
% cd gettext-0.13/
% ./configure
% make
% sudo make install
STEP 1: Install glib
With Panther, the only additional library you have to install for mc is reduced to glib. Opening the GTK+ home page, click on the topmost Source link and download the latest .bz2-compressed version of glib from the FTP directory which appears. At the time of writing, this file is called glib-2.2.3.tar.bz2. Compiling and installing it couldn't be any simpler:
% tar -xvjf ~/Desktop/glib-2.2.3.tar.bz2
% cd glib-2.2.3/
% ./configure
% make
% sudo make install
STEP 2: Install mc
Time to obtain a copy of mc, at the time of this writing, it was up to version 4.6.1-pre1. Compiling is again quite simple, with the one notable exception of the ncurses switch for ./configure, which makes it all work properly with Panther. You might want to experiment with the mc Autoconf script's other switches for enabling/disabling features; the list of available switches can be read by invoking ./configure --help | less as usual.
% tar -xvzf ~/Desktop/mc-4.6.1-pre1.tar.gz
% cd mc-4.6.1-pre1/
% ./configure --without-x --with-screen=ncurses
% make
% sudo make install
And that was it, you should now have a fully functional copy of mc on your Mac. Midnight Commander finally works as well on OS X as you are used to from the bundled copy in your favorite Linux distro. The same limitations apply as to most anything in the BSD subsystem: mc can't read nor copy file type/creator codes or resource forks; it sees application bundles as what they really are - directories, and the hidden system folders aren't hidden at all. Just remember that you can open a Finder window for the directory you're currently in by typing open ..
Bonus tip: mc comes with a quite capable and reasonably user-friendly built-in editor (much better than pico, in my opinion). You can start it directly with the -e parameter as follows:
% mc -e filename

