[33045] branches/release_1_6/base

jmpp at macports.org jmpp at macports.org
Wed Jan 16 22:12:00 PST 2008


Revision: 33045
          http://trac.macosforge.org/projects/macports/changeset/33045
Author:   jmpp at macports.org
Date:     2008-01-16 22:11:54 -0800 (Wed, 16 Jan 2008)

Log Message:
-----------
Merged revisions 32096-32193,32195-32335,32337-32365,32367-32499,32502-32721,32724-32800,32802-32999 via svnmerge from 
http://svn.macports.org/repository/macports/trunk/base

........
  r32096 | jmpp at macports.org | 2007-12-16 16:00:13 -0400 (Sun, 16 Dec 2007) | 1 line
  
  Manually merge in 1.6.0 release date into the trunk ChangeLog, off from its branches/release_1_6 guise.
........
  r32097 | jmpp at macports.org | 2007-12-16 16:01:50 -0400 (Sun, 16 Dec 2007) | 1 line
  
  Correct a URL to our svn repo.
........
  r32100 | jmpp at macports.org | 2007-12-16 18:20:41 -0400 (Sun, 16 Dec 2007) | 5 lines
  
  
  We only produce tarballs for major releases, which should always come with the "archive" tarballs, so always advise to create them
  (with alternate advise on how to not create them).
........
  r32101 | jmpp at macports.org | 2007-12-16 19:11:48 -0400 (Sun, 16 Dec 2007) | 7 lines
  
  
  It makes much more sense to group all three types of checksums for a single tarball together
  in the chk file that comes with each release (from the base/Makefile's "distfromsvn" target), as in
  {md5,sha1,ripemd160} for tar.gz and then for tar.bz2, rather than all types of tarballs for a single
  checksum type, as in {tar.gz,tar.bz2} for md5 and then for sha1 and ripemd160.
........
  r32102 | jmpp at macports.org | 2007-12-16 19:24:21 -0400 (Sun, 16 Dec 2007) | 4 lines
  
  
  Move the UPGRADECHECK abstraction variable into the base/Mk/macports.upgrade.mk where it belongs.
........
  r32103 | jmpp at macports.org | 2007-12-16 19:36:49 -0400 (Sun, 16 Dec 2007) | 4 lines
  
  
  Release 1.6.0 for selfupdate, dmg's will follow.
........
  r32105 | jmpp at macports.org | 2007-12-16 21:17:00 -0400 (Sun, 16 Dec 2007) | 9 lines
  
  
  Pass the generated static cregistry.a archive through ranlib to fix it for universal building,
  which is enforced by the MacPorts portfile on Tiger or newer.
  
  This patch will be applied manaully while building the dmg's, since the alternative is merging it
  now into the release branch and hence invalidating all the work I've done so far in the release process
  (release tag, tarballs, selfupdate, etc...)
........
  r32111 | jmpp at macports.org | 2007-12-17 01:20:40 -0400 (Mon, 17 Dec 2007) | 1 line
  
  Whitespace cleanups only, no functional changes. Add modeline.
........
  r32113 | jmpp at macports.org | 2007-12-17 01:35:36 -0400 (Mon, 17 Dec 2007) | 4 lines
  
  
  Explain that resource files in the MacPorts' port's files dir are fetched through svn:externals now.
........
  r32114 | jmpp at macports.org | 2007-12-17 01:52:46 -0400 (Mon, 17 Dec 2007) | 7 lines
  
  
   * Update checksums instructions for the dmg to output them in the same fashion as we now do for the source tarballs;
   * Include the ${destroot}/opt/local/share/macports/Tcl/registry2.0/registry.dylib library for linking validation when
     validating the contents of the pkg installer;
   * Add a check for binaries with two architectures when building universal dmg's.
........
  r32116 | jmpp at macports.org | 2007-12-17 02:14:28 -0400 (Mon, 17 Dec 2007) | 1 line
  
  More whitespace fixes.
........
  r32132 | jmpp at macports.org | 2007-12-17 14:20:49 -0400 (Mon, 17 Dec 2007) | 5 lines
  
  
  We now have an announcements list (http://lists.macosforge.org/mailman/listinfo/macports-announce/), so use it as such
  (also remove the long domain names from this document, we all know them).
........
  r32133 | jmpp at macports.org | 2007-12-17 14:22:00 -0400 (Mon, 17 Dec 2007) | 1 line
  
  Remove unnecessary launchd plist, the guide regen job runs as a post-commit hook to the trunk/doc-new directory.
........
  r32134 | jmpp at macports.org | 2007-12-17 14:23:09 -0400 (Mon, 17 Dec 2007) | 1 line
  
  Correct comment about the new guide.
........
  r32167 | jmpp at macports.org | 2007-12-18 19:11:29 -0400 (Tue, 18 Dec 2007) | 8 lines
  
  
   * base/configure.ac: reorder the macros reading our version number from the base/config/mp_version file, export MP_VERSION
     (It would be great to figure out how to use the result of $MP_VERSION in AC_INIT, to avoid the code duplication that's
      present with the esyscmd command);
   * configure: regen;
   * base/src/macports1.0/macports_autoconf.tcl.in: save the MacPorts version number in the macports1.0 namespace as `macports_version`.
........
  r32169 | jmpp at macports.org | 2007-12-18 19:53:32 -0400 (Tue, 18 Dec 2007) | 4 lines
  
  
  Use the new $macports::autoconf::macports_version variable to get our own version and remove some now unnecessary code.
........
  r32170 | jmpp at macports.org | 2007-12-18 20:17:14 -0400 (Tue, 18 Dec 2007) | 4 lines
  
  
  Simplify the macports::version proc by use of the $macports::autoconf::macports_version variable (also remove some globals that weren't necessary in any case).
........
  r32172 | jmpp at macports.org | 2007-12-18 20:47:53 -0400 (Tue, 18 Dec 2007) | 1 line
  
  Whitespace cleanup.
........
  r32202 | jmpp at macports.org | 2007-12-19 17:29:34 -0400 (Wed, 19 Dec 2007) | 1 line
  
  Add sourceforge to our list of 3rd party sites we submit our downloads to, reorder other site entries a bit.
........
  r32206 | wsiegrist at apple.com | 2007-12-19 20:31:31 -0400 (Wed, 19 Dec 2007) | 1 line
  
  generalized script to /tmp/mpdocs instead of /Users/... Also removed any PATH assumptions. Added MacOSForge sysadmin to the mail address list.
........
  r32208 | jmpp at macports.org | 2007-12-20 04:20:37 -0400 (Thu, 20 Dec 2007) | 1 line
  
  Whitespace cleanups.
........
  r32209 | jmpp at macports.org | 2007-12-20 04:27:05 -0400 (Thu, 20 Dec 2007) | 1 line
  
  Simple whitespace fix.
........
  r32210 | jmpp at macports.org | 2007-12-20 04:30:45 -0400 (Thu, 20 Dec 2007) | 1 line
  
  Whitespace cleanups.
........
  r32212 | jmpp at macports.org | 2007-12-20 04:45:23 -0400 (Thu, 20 Dec 2007) | 8 lines
  
  
  When building on Panther, the new registry sources (cregistry and registry2.0) fail 'cause there's no sqlite3
  on that platform. In this case we build with our bundled sqlite3, so if we're doing that go ahead and append
  a "-I../sqlite-3.1.3" rule to our includes search path, so that sqlite3 headers are found.
  
  Maun Suang, can you please try building trunk + this patch on Panther?
........
  r32223 | jmpp at macports.org | 2007-12-20 15:53:51 -0400 (Thu, 20 Dec 2007) | 5 lines
  
  
  Rename the $mp_base_path variable to $mp_source_path in the selfupdate proc, to make its intent clearer from its name.
  Also change a debug comment accordingly.
........
  r32224 | jmpp at macports.org | 2007-12-20 16:02:53 -0400 (Thu, 20 Dec 2007) | 4 lines
  
  
  Another variable rename, no functional changes: $mp_version_new to $macports_version_new, to match the naming of $macports::autoconf::macports_version.
........
  r32353 | jmpp at macports.org | 2007-12-27 03:35:22 -0400 (Thu, 27 Dec 2007) | 12 lines
  
  
  $(find . -type f \! -path "*.svn/*" | xargs grep -nH mp_version) assures me nothing else but macports::selfupdate and macports::version
  reads the ${prefix}/etc/macports/mp_version installed file, and I've already taken care of those to to read $macports::autoconf::macports_version
  for our version number instead, so let's not install the base/config/mp_version file anymore.
  
  Note that base/config/mp_version cannot disappear from svn, though, as that's what's read by macports::selfupdate to determine if the
  selfupdate'd sources are newer than what's installed.
  
  BRAINSTORM: After this commit, the ${prefix}/etc/macports/mp_version installed file is going to stall and thus might confuse people,
  so should we delete it upon installing a new release?
........
  r32354 | jmpp at macports.org | 2007-12-27 03:36:48 -0400 (Thu, 27 Dec 2007) | 1 line
  
  Grammar++
........
  r32363 | jmpp at macports.org | 2007-12-27 15:03:53 -0400 (Thu, 27 Dec 2007) | 7 lines
  
  
  Delete the base/config/dp_version file as a sort of stealth test: only pre dp2mp-move sources use it
  and will not be able to selfupdate without it (but don't worry, the problem is easily solved by forcing
  the selfupdate through port(1)'s -f flag). The number of complaints we get about a missing dp_version file
  will give us a hint about how many out there are still using pre dp2mp-move MacPorts releases (if small,
  we might be able to remove all the related upgrade code).
........
  r32364 | jmpp at macports.org | 2007-12-27 16:07:33 -0400 (Thu, 27 Dec 2007) | 13 lines
  
  
  Don't use plain arithmetical comparison to determine if the downloaded sources are newer than the installed MacPorts,
  but rather our own rpm-vercomp to compare $macports_version_new against $macports::autoconf::macports_version.
  As of this moment, the result is the same (and will be the same when we release 1.xyz, with x > 6 and/or y,z > 0)
  as the arithmetical comparison, but in the future this change will allow us to introduce real version numbers into
  MacPorts.
  
  My current idea is to create a base/config/macports_version file holding something like 1.6.1, but the selfupdate
  logic of reading the latter over base/config/mp_version has to be thoroughly thought out: 600 (from base/config/mp_version's 1.600)
  is greater than 6, so if we flat out select base/config/macports_version to read the new version we will break
  selfupdating for everyone, as rpm-vercomp will not see 1.6.1 as greater than 1.600.
........
  r32365 | jmpp at macports.org | 2007-12-27 16:31:52 -0400 (Thu, 27 Dec 2007) | 11 lines
  
  
  Add the base/config/macports_version file holding the 1.7.0 version number (for trunk), with limited usage for the time being:
  
   * Read it in for the autoconf @MACPORTS_VERSION@ variable;
   * Stop the Snoopy talk in configure.ac to convert the floating point format to a regular versions, reading base/config/macports_version directly instead;
   * Switch files with @VER@ substitution over to @MACPORTS_VERSION at .
  
  The $macports::autoconf::macports_version will still read from @MP_VERSION@, the floating point format,
  until a good logic for selfupdate magically emerges (cf. r32364).
........
  r32394 | jmpp at macports.org | 2007-12-29 00:43:49 -0400 (Sat, 29 Dec 2007) | 16 lines
  
  
  A thoroughly rewritten selfupdate proc:
  
   * steps now happen in a more logical order: first we sync the ports tree, then the base sources, then see if we're being forced
     or if we're using version numbers to discern upgrading or not and, lastly, we rebuild accordingly;
   * the above reordering allows us to force the selfupdate to get around no rsync'd version file being found for whatever reason;
     previously such event would lead to a situation in which not even forcing would help, affected users had to grab the dmg or
     rebuild from source manually;
   * in case we're not being forced, choose between two rsync'd version files: the old, floating point format (mp_version) or the new,
     real version number format (macports_version); we're still using the old one (cf. r32364), but when we release something like 2.0.0
     we'll switch to the new one;
   * improved MacPorts installation owner detection and setting upon reinstallation: we now read ${prefix}'s attributes;
   * ${prefix} permissions are now also preserved across selfupdates (REMINDER: this should be a NEWS & ChangeLog entry);
   * renamed some variables to clearer names;
   * improved many informational and debug messages and in-source comments.
........
  r32395 | jmpp at macports.org | 2007-12-29 01:08:23 -0400 (Sat, 29 Dec 2007) | 4 lines
  
  
  Remove the ${sysconfdir}/macports/mp_version file prior to reinstalling MacPorts, as its installation is now deprecated.
........
  r32396 | jmpp at macports.org | 2007-12-29 01:17:25 -0400 (Sat, 29 Dec 2007) | 6 lines
  
  
  Include my r32395 deletion of the /opt/local/etc/macports/mp_version file deletion into the preflight script of the pkg, for future major version releases.
  Note that this is not the best place to put this rule, as currently preflight takes care of the dp2mp-move for the pkg installer and they are orthogonal sets
  of upgrading rules..., but I simply don't know of anywhere else to put this one so that it is performed when installing from the pkg.
........
  r32397 | jmpp at macports.org | 2007-12-29 01:29:39 -0400 (Sat, 29 Dec 2007) | 8 lines
  
  
  Some syntax tweaks:
  
   * we're using bash, to use echo's -e flag and remove useless echo calls for newline characters;
   * whitespace cleanups;
   * remove useless semicolons.
........
  r32398 | jmpp at macports.org | 2007-12-29 01:37:39 -0400 (Sat, 29 Dec 2007) | 1 line
  
  Whitespace cleanups.
........
  r32430 | afb at macports.org | 2007-12-31 06:19:09 -0400 (Mon, 31 Dec 2007) | 1 line
  
  make configure.pipe hackable from Portfiles too (#13636)
........
  r32441 | jberry at macports.org | 2008-01-01 12:39:21 -0430 (Tue, 01 Jan 2008) | 4 lines
  
  If checksum is mismatched, and in verbose mode, present a corrected pre-fabricated
  checksum statement to make it easy to update a port.
........
  r32480 | afb at macports.org | 2008-01-04 05:15:34 -0430 (Fri, 04 Jan 2008) | 1 line
  
  recognize non-canonical modelines (#13496)
........
  r32514 | eridius at macports.org | 2008-01-05 20:50:25 -0430 (Sat, 05 Jan 2008) | 1 line
  
  Replace the ui_channels if statement with a try-catch to try and fix the mysterious 10.3 issue
........
  r32525 | eridius at macports.org | 2008-01-06 18:08:34 -0430 (Sun, 06 Jan 2008) | 1 line
  
  Change the ui_prefix if-else block to a try-catch block
........
  r32526 | ryandesign at macports.org | 2008-01-06 18:44:15 -0430 (Sun, 06 Jan 2008) | 1 line
  
  fix typo in comment
........
  r32537 | jmpp at macports.org | 2008-01-07 05:31:03 -0430 (Mon, 07 Jan 2008) | 5 lines
  
  
  Simplify the test that errors out if we're not selfupdating with the needed power: bail out right away if $installing_user doesn't own ${prefix}.
  Also improve some of the comments we output.
........
  r32541 | eridius at macports.org | 2008-01-07 14:58:25 -0430 (Mon, 07 Jan 2008) | 1 line
  
  Tweak autoconf scripts to avoid duplication of the shell stuff to read macports_version
........
  r32542 | jmpp at macports.org | 2008-01-07 15:17:37 -0430 (Mon, 07 Jan 2008) | 7 lines
  
  
  Move all autoconf macros files into a dedicated m4 directory, adapting aclocal.m4 to load them
  from their new home (but leaving the latter right next to configure.ac, as otherwise the loading
  paths become a bit cumbersome -- even though aclocal.m4 can indeed be moved into the base/m4/
  directory).
........
  r32543 | jmpp at macports.org | 2008-01-07 15:24:26 -0430 (Mon, 07 Jan 2008) | 4 lines
  
  Add svn:eol-style to all autoconf m4 macros files, remove the Id keyword from base/m4/tcl.m4 as we're probably not meant to be touching it in any case.
  Use $Id$ in aclocal.m4.
........
  r32544 | eridius at macports.org | 2008-01-07 16:03:17 -0430 (Mon, 07 Jan 2008) | 2 lines
  
  Fix permissions code in selfupdate.
  Change from /usr/bin/whoami to /usr/bin/id -un as whoami is deprecated
........
  r32546 | jmpp at macports.org | 2008-01-07 16:44:11 -0430 (Mon, 07 Jan 2008) | 5 lines
  
  
  If selfupdate is forced, the setting of the `$macports_version_new` var is skipped, so the `if {[rpm-vercomp $macports_version_new $macports::autoconf::macports_version] > 0 || $use_the_force_luke == "yes"}`
  test fails because the `$macports_version_new` variable is not defined. Swap the two tests in the if clause so that we can short circuit around the second one and thus not fail if forcing is requested.
........
  r32549 | jmpp at macports.org | 2008-01-07 18:20:38 -0430 (Mon, 07 Jan 2008) | 4 lines
  
  Tweak the visual aspect of the selfupdate output yet again, updating the documentation URLs we hand off to users through the main base/Makefile
  (mentioning our new guide).
........
  r32597 | jmpp at macports.org | 2008-01-08 17:29:50 -0430 (Tue, 08 Jan 2008) | 4 lines
  
  
  Add a README file that explains how our server side jobs work and when (how often).
........
  r32598 | jmpp at macports.org | 2008-01-08 17:31:22 -0430 (Tue, 08 Jan 2008) | 1 line
  
  Little rewording.
........
  r32600 | jmpp at macports.org | 2008-01-08 17:43:07 -0430 (Tue, 08 Jan 2008) | 1 line
  
  Itemize binaries that need linking verification when building the dmg, for better readability.
........
  r32605 | jmpp at macports.org | 2008-01-08 23:22:37 -0430 (Tue, 08 Jan 2008) | 4 lines
  
  
  The start of the documentation of the potential chanegs that will go into the 1.6.1 release.
........
  r32606 | jmpp at macports.org | 2008-01-08 23:23:50 -0430 (Tue, 08 Jan 2008) | 1 line
  
  Add the svn:eol-style keyword to the NEWS file.
........
  r32615 | ryandesign at macports.org | 2008-01-09 05:09:51 -0430 (Wed, 09 Jan 2008) | 1 line
  
  typos and hyphenation
........
  r32631 | boeyms at macports.org | 2008-01-10 01:26:22 -0430 (Thu, 10 Jan 2008) | 2 lines
  
  portmgr/ReleaseProcess: add note that daemondo is not built on Panther and so does not need checking.
........
  r32720 | afb at macports.org | 2008-01-12 05:56:59 -0430 (Sat, 12 Jan 2008) | 1 line
  
  make sure install depends on scripts
........
  r32721 | afb at macports.org | 2008-01-12 06:04:00 -0430 (Sat, 12 Jan 2008) | 4 lines
  
  * Sort in NVR (name at version_revision) order (#13031)
  - currently resorts the "port installed" list, it was
    showing in string order even ::installed was sorted?
........
  r32724 | afb at macports.org | 2008-01-12 07:39:50 -0430 (Sat, 12 Jan 2008) | 1 line
  
  port platform, info target (#12302)
........
  r32725 | eridius at macports.org | 2008-01-12 10:41:57 -0430 (Sat, 12 Jan 2008) | 1 line
  
  Teach port info that depends_run is a list
........
  r32741 | ryandesign at macports.org | 2008-01-12 18:27:57 -0430 (Sat, 12 Jan 2008) | 1 line
  
  add archive to apache mirror sites so older versions of things can still be downloaded; fixes #13891
........
  r32821 | jmpp at macports.org | 2008-01-13 23:08:58 -0430 (Sun, 13 Jan 2008) | 5 lines
  
  
  Follow the proper error reporting procedure if stale lock files are found (put together a mail and send it to the people in charge),
  don't just exit with an error line to the console as that can be easily lost.
........
  r32822 | wsiegrist at apple.com | 2008-01-13 23:17:01 -0430 (Sun, 13 Jan 2008) | 1 line
  
  removing dluke from error emails per his request
........
  r32824 | eridius at macports.org | 2008-01-13 23:49:33 -0430 (Sun, 13 Jan 2008) | 1 line
  
  Add our version to the User-Agent in libcurl
........
  r32832 | jmpp at macports.org | 2008-01-14 00:36:34 -0430 (Mon, 14 Jan 2008) | 1 line
  
  Whitespace fix.
........
  r32893 | jmpp at macports.org | 2008-01-14 11:04:44 -0430 (Mon, 14 Jan 2008) | 1 line
  
  Use new variable names controling our website.
........
  r32999 | afb at macports.org | 2008-01-16 08:25:44 -0430 (Wed, 16 Jan 2008) | 1 line
  
  update changelog for r32194 and r32724
........

Modified Paths:
--------------
    branches/release_1_6/base/ChangeLog
    branches/release_1_6/base/Makefile.in
    branches/release_1_6/base/Mk/macports.autoconf.mk.in
    branches/release_1_6/base/Mk/macports.upgrade.mk
    branches/release_1_6/base/NEWS
    branches/release_1_6/base/aclocal.m4
    branches/release_1_6/base/config/README.TXT
    branches/release_1_6/base/config/RELEASE_URL
    branches/release_1_6/base/configure.ac
    branches/release_1_6/base/m4/foundation.m4
    branches/release_1_6/base/m4/objc.m4
    branches/release_1_6/base/m4/pthread.m4
    branches/release_1_6/base/m4/tcl.m4
    branches/release_1_6/base/portmgr/ReleaseProcess
    branches/release_1_6/base/portmgr/dmg/preflight
    branches/release_1_6/base/portmgr/fedora/macports.spec.in
    branches/release_1_6/base/portmgr/freebsd/Makefile.in
    branches/release_1_6/base/portmgr/freebsd/pkg-plist
    branches/release_1_6/base/portmgr/jobs/GuideRegen.sh
    branches/release_1_6/base/portmgr/jobs/PortIndexRegen.sh
    branches/release_1_6/base/src/cregistry/Makefile
    branches/release_1_6/base/src/macports1.0/macports.tcl
    branches/release_1_6/base/src/macports1.0/macports_autoconf.tcl.in
    branches/release_1_6/base/src/package1.0/portpkg.tcl
    branches/release_1_6/base/src/pextlib1.0/curl.c
    branches/release_1_6/base/src/port/Makefile
    branches/release_1_6/base/src/port/port.tcl
    branches/release_1_6/base/src/port1.0/portchecksum.tcl
    branches/release_1_6/base/src/port1.0/portconfigure.tcl
    branches/release_1_6/base/src/port1.0/portlint.tcl
    branches/release_1_6/base/src/port1.0/portutil.tcl
    branches/release_1_6/base/src/port1.0/resources/fetch/mirror_sites.tcl
    branches/release_1_6/base/src/registry2.0/Makefile

Added Paths:
-----------
    branches/release_1_6/base/config/macports_version
    branches/release_1_6/base/m4/
    branches/release_1_6/base/portmgr/jobs/README

Removed Paths:
-------------
    branches/release_1_6/base/config/Makefile
    branches/release_1_6/base/config/dp_version
    branches/release_1_6/base/foundation.m4
    branches/release_1_6/base/objc.m4
    branches/release_1_6/base/portmgr/jobs/org.macports.GuideRegen.plist
    branches/release_1_6/base/pthread.m4
    branches/release_1_6/base/tcl.m4

Property Changed:
----------------
    branches/release_1_6/base/
    branches/release_1_6/base/NEWS


Property changes on: branches/release_1_6/base
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/base:1-31490,31493-31494,31497-31499,31501-31519,31521-31599,31601-31770,31772-31906,31909-31945,31947-31950,31971-32060
   + /trunk/base:1-31490,31493-31494,31497-31499,31501-31519,31521-31599,31601-31770,31772-31906,31909-31945,31947-31950,31971-32060,32096-32193,32195-32335,32337-32365,32367-32499,32502-32721,32724-32800,32802-32999

Modified: branches/release_1_6/base/ChangeLog
===================================================================
--- branches/release_1_6/base/ChangeLog	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/ChangeLog	2008-01-17 06:11:54 UTC (rev 33045)
@@ -4,6 +4,42 @@
 ###
 
 
+Unreleased:
+
+    - Add `port platform` info target that outputs current platform (#12302, afb in r32724).
+
+    - Enable 64 bit environment, ppc64 x86_64, for all +universal builds (mww in r32194).
+
+    - Add 'merge' function for merging multiple (single arch) destroots into one (universal)
+      destroot (mww in r31954).
+
+
+Release 1.6.1 (unreleased):
+
+    - If checksum is mismatched, and in verbose mode, present a corrected pre-fabricated checksum statement
+      to make it easy to update a port (jberry in r32441).
+
+    - Fixed the "Error: Unable to open port: invalid command name "ui_prefix"" runtime error on Panther
+      (eridius in r32525).
+
+    - Fixed the "Error: Unable to open port: invalid command name "ui_channels"" runtime error on Panther
+      (eridius in r32514).
+
+    - "port lint" now recognizes non-canonical modelines (afb in r32480).
+
+    - "configure.pipe" is now hackable from Portfiles (afb in r32430).
+
+    - MacPorts no longer installs the "base/config/mp_version" file, as the release version is now stored
+      internally in $macports::autoconf::macports_vesion (jmpp in r32353).
+
+    - Bail out with a suitable message if the requested port is not installed when polling its dependents
+      (jmpp in r32336).
+
+    - Fixed a Panther build failure due to missing sqlite headers (jmpp in r32212).
+
+    - Fixed a build failure by passing the base/src/cregistry/cregistry.a archive through ranlib (jmpp in r32105).
+
+
 Release 1.6.0 (16-December-2007 by jmpp):
 
     - Revamped the postflight script that is run by Installer.app with our pkg installer to gracefully

Modified: branches/release_1_6/base/Makefile.in
===================================================================
--- branches/release_1_6/base/Makefile.in	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/Makefile.in	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBDIR		= config doc src
+SUBDIR		= doc src
 DISTDIR		= dist
 DISTVER		=
 DISTTAG		= release_${subst .,_,${DISTVER}}
@@ -8,7 +8,6 @@
 DISTARCTAG	= ${DISTTAG}-archive
 DISTARCNAME	= ${DISTNAME}-archive
 SVNURL		= http://svn.macports.org/repository/macports
-UPGRADECHECK	= ${localstatedir}/macports/.mprename
 
 
 include Mk/macports.autoconf.mk
@@ -33,13 +32,14 @@
 include Mk/macports.upgrade.mk
 
 install:: upgrade
+	[ ! -f ${sysconfdir}/macports/mp_version ] || rm -vf ${sysconfdir}/macports/mp_version
 
 include Mk/macports.subdir.mk
 
 install::
 	@echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo ""
-	@echo "sudo port selfupdate"; echo ""
-	@echo "Please read port(1) and the MacPorts Wiki at http://trac.macports.org/ for full documentation."; echo ""
+	@echo "sudo port -v selfupdate"; echo ""
+	@echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo ""
 	@echo "Stray sources might have been left in the legacy ${localstatedir}/db/dports directory after this upgrade, which moved most of what it could to ${localstatedir}/macports, so you might want to look in the former and cleanup manually."; echo ""
 
 clean::
@@ -57,7 +57,11 @@
 	cd ${DISTDIR}; svn export ${PKGNAME}-svn ${PKGNAME}
 	cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz
 	cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2
-	cd ${DISTDIR}; for type in -md5 -sha1 -ripemd160; do openssl dgst $$type ${PKGNAME}.tar.gz ${PKGNAME}.tar.bz2; done >> ${DISTNAME}.chk.txt
+	cd ${DISTDIR}; for tarball in ${PKGNAME}.tar.*; do { \
+		for type in -md5 -sha1 -ripemd160; do { \
+			openssl dgst $$type $$tarball; \
+		}; done >> ${DISTNAME}.chk.txt; \
+	}; done
 
 _dopkg: _gettag _pkgdist
 

Modified: branches/release_1_6/base/Mk/macports.autoconf.mk.in
===================================================================
--- branches/release_1_6/base/Mk/macports.autoconf.mk.in	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/Mk/macports.autoconf.mk.in	2008-01-17 06:11:54 UTC (rev 33045)
@@ -18,13 +18,13 @@
 CFLAGS_WERROR		= @CFLAGS_WERROR@
 
 READLINE_CFLAGS		=
-MD5_CFLAGS			=
+MD5_CFLAGS		=
 SQLITE3_CFLAGS		=
-CURL_CFLAGS			= @CFLAGS_LIBCURL@
+CURL_CFLAGS		= @CFLAGS_LIBCURL@
 
 OBJC_RUNTIME		= @OBJC_RUNTIME@
 OBJC_RUNTIME_FLAGS	= @OBJC_RUNTIME_FLAGS@
-OBJC_LIBS			= @OBJC_LIBS@
+OBJC_LIBS		= @OBJC_LIBS@
 
 OBJC_FOUNDATION		= @OBJC_FOUNDATION@
 OBJC_FOUNDATION_CPPFLAGS	= @OBJC_FOUNDATION_CPPFLAGS@
@@ -35,14 +35,14 @@
 SHLIB_LD		= @SHLIB_LD@
 STLIB_LD		= @STLIB_LD@
 LDFLAGS			= -L/usr/local/lib @LDFLAGS@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@ ${LDFLAGS}
+SHLIB_LDFLAGS		= @SHLIB_LDFLAGS@ ${LDFLAGS}
 SHLIB_SUFFIX		= @SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC	= @TCL_STUB_LIB_SPEC@
 
 LIBS			= @LIBS@
-READLINE_LIBS	= @READLINE_LIBS@
+READLINE_LIBS		= @READLINE_LIBS@
 MD5_LIBS		= @MD5_LIBS@
-SQLITE3_LIBS	= @SQLITE3_LIBS@
+SQLITE3_LIBS		= @SQLITE3_LIBS@
 CURL_LIBS		= @LDFLAGS_LIBCURL@
 INSTALL			= @INSTALL@
 MTREE			= @MTREE@
@@ -51,7 +51,7 @@
 BZIP2			= @BZIP2@
 
 TCLSH			= @TCLSH@
-TCL_PACKAGE_DIR	= @TCL_PACKAGE_DIR@
+TCL_PACKAGE_DIR		= @TCL_PACKAGE_DIR@
 
 DSTUSR			= @DSTUSR@
 DSTGRP			= @DSTGRP@
@@ -65,7 +65,7 @@
 datarootdir		= @datarootdir@
 datadir			= @datadir@
 libdir			= @libdir@
-localstatedir	= @localstatedir@
+localstatedir		= @localstatedir@
 infodir			= @infodir@
 
 mpconfigdir		= @MPCONFIGDIR@

Modified: branches/release_1_6/base/Mk/macports.upgrade.mk
===================================================================
--- branches/release_1_6/base/Mk/macports.upgrade.mk	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/Mk/macports.upgrade.mk	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,5 +1,8 @@
 # $Id$
 
+UPGRADECHECK    = ${localstatedir}/macports/.mprename
+
+
 upgrade::
 	@echo ""; echo "Upgrading your existing MacPorts installation to the new namespace if necessary:"; echo ""
 
@@ -27,8 +30,9 @@
 
 # Move the default ports tree to the new layout:
 	[ ! -d ${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports ] || { mkdir -vp \
-	${localstatedir}/macports/sources/rsync.macports.org/release && mv -v \
-	${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports ${localstatedir}/macports/sources/rsync.macports.org/release/ports ; }
+		${localstatedir}/macports/sources/rsync.macports.org/release && mv -v \
+		${localstatedir}/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports ${localstatedir}/macports/sources/rsync.macports.org/release/ports ; \
+	}
 
 # Open up receipts and upgrade any paths in them containing old conventions to the new namespace:
 	for receipt in ${localstatedir}/macports/receipts/*/*/receipt.bz2 ; do [ ! \( -f $${receipt} -a ! -f $${receipt}.mpsaved \) ] || { \
@@ -108,4 +112,4 @@
 
 # Upgrade success announcement (meaning we're done ;):
 	@[ -f ${UPGRADECHECK} ] || { echo ""; echo "MacPorts installation successfully upgraded from the old DarwinPorts namespace!"; echo ""; \
-	echo "MacPorts rename update done!" > ${UPGRADECHECK} ; }
+		echo "MacPorts rename update done!" > ${UPGRADECHECK} ; }

Modified: branches/release_1_6/base/NEWS
===================================================================
--- branches/release_1_6/base/NEWS	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/NEWS	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,18 +1,33 @@
 
-What's new:
+== Overview of changes from MacPorts 1.6.0 to 1.6.1 ==
 
-*) Revived and thoroughly refreshed web presence at http://www.macports.org/ , with more improvements still on the way;
-*) New project guide temporarily at http://trac.macports.org/projects/macports/ ;
+# For regular users:
 
+* A suitable message is output when the requested port is not installed when polling its dependents;
+* Fixed the "Error: Unable to open port: invalid command name "ui_prefix"" runtime error on Panther;
+* Fixed the "Error: Unable to open port: invalid command name "ui_channels"" runtime error on Panther;
+* Fixed a MacPorts, Panther specific build failure due to missing sqlite headers on that platform;
+* Fixed a MacPorts build failure when building itself in universal fashion;
 
-Overview of Changes from MacPorts 1.5.2 to MacPorts 1.6.0:
 
+# For Portfile writers:
+
+*) Pre-fabricated statements with correct checksums are output when in verbose mode if the existing ones in the Portfile are incorrect;
+*) "port lint" now recognizes non-canonical modelines;
+*) Added a 'configure.pipe' Portfile option for using pipes rather than intermediate files when compiling C/C++ based ports;
+
+
+
+== Overview of changes from MacPorts 1.5.2 to 1.6.0 ==
+
 # For regular usage:
 
+*) Revived and thoroughly refreshed web presence at http://www.macports.org/ , with more improvements still on the way;
+*) New project guide at http://guide.macports.org/
 *) Fixed the "upgrade" target of the port(1) command to properly handle installed versions beginning with letters;
 *) Improved the "variants" target of the port(1) command to behave like the "info" target to poll the requested Portfile directly
     rather than the index for more up-to-date information, while also providing a --index flag for legacy behavior;
-*) Fixed a bug by which a user specific 'macports.conf' file would not be read;
+*) Fixed a bug by which a user-specific 'macports.conf' file would not be read;
 *) Tightened security by installing MacPorts in 0755 mode (no write permission for group and others) by default;
 *) Added 'none' as a possible option for supported types of startupitems scripts;
 *) Disabled readline support in interactive mode of the port(1) command by deafult;
@@ -24,7 +39,7 @@
     (http://guide.macports.org/#installing.binary.postflight.details for more information);
 
 
-# Individual port-building related improvements:
+# Individual port-building-related improvements:
 
 *) Eugene Pimenov's GSoC2007 work on improving "trace mode" for the building of ports in clean environments,
     http://trac.macports.org/projects/macports/wiki/soc2007/epimenov ;
@@ -40,13 +55,13 @@
     on Tiger and above;
 
 
-# Packaging related improvements:
+# Packaging-related improvements:
 
 *) Created pkg's no longer have /etc, /var/ or /tmp directories in them;
 *) Fixed a bug by which all .mpkg packages were missing their welcome page;
 *) Fixed a bug by which HTML contents were written as a pkg's Welcome.rtf file, causing it to not display at all;
 *) Made the homepage clickable in a pkg's welcoming screen;
-*) Added support lzma compression for archives;
+*) Added support for lzma compression for archives;
 *) Improved pkg & dmg creation on Leopard, for both Intel and PowerPC platforms;
 *) Added an 'mdmg' target, for the creation of a dmg for a port and its dependencies;
 *) Dramatically improved performace of the port(1) command's Portfile level actions like "file", "dir", "work" and "url"
@@ -64,12 +79,11 @@
 *) Added Portfile group code for Python 3.0 based ports and deprecated the plain 'python' group code;
 *) Added generic GNU livecheck rules;
 *) The "x86" platform has been normalized as "i386";
-*) Added a 'use_parallel_build' Portfile option for declaring if a particular port can be built in paralel through make's -j flag,
+*) Added a 'use_parallel_build' Portfile option for declaring if a particular port can be built in parallel through make's -j flag,
     defaulting to no;
 *) Added 'configure.awk', 'configure.bison', 'configure.pkg_config', 'configure.pkg_config_path' Portfile options to point to the
     relevant programs/paths to use;
 *) Added a 'extract.mkdir' Portfile option to better deal with so-called "tar bombs";
-*) Added a 'configure.pipe' Portfile option for using pipes rather than intermediate files when compiling C/C++ based ports;
 
 
 # For MacPorts scripting:
@@ -79,10 +93,10 @@
 *) Improved defaults for implicit ui_prefix and ui_channels behaviour at the macports1.0 layer;
 
 
-# Miscellaenous:
+# Miscellaneous:
 
 *) Added MacPorts-configure time checks for Mac OS X and Xcode versions and warnings for old versions;
-*) Added a 'user-agent' parameters to our libcurl based fetching of sources for sites that require a user agent;
+*) Added a 'user-agent' parameters to our libcurl-based fetching of sources for sites that require a user agent;
 *) 'livecheck' regular expressions are now checked against each entry in the listed master_site in the Portfile;
 *) Fixed regexp in livecheck code to work when there is both a tag and a subdir in the mirror uri;
 *) Improved the integrated "daemondo" program to better handle the death of startupitem-based programs;
@@ -90,8 +104,8 @@
     the process it is monitoring, defaulting to 3;
 *) Enabled building of our objc bridge against GNUStep on platforms other than Mac OS X;
 *) Added support for packing of MacPorts itself on FreeBSD and Fedora platforms;
-*) Added SourceForge.jp to our list of SourceForge based mirrors for sources fetching;
+*) Added SourceForge.jp to our list of SourceForge-based mirrors for sources fetching;
 *) Added http mirror sites for the postgresql mirrors list;
 *) Added the ftp://ftp.gnu.org/old-gnu/ mirror to the GNU mirrors list;
-*) Fixed a bug by which paths with embedded spaces would cause the "dp2mp-move" upgrade code to fail when trying to find user specific
+*) Fixed a bug by which paths with embedded spaces would cause the "dp2mp-move" upgrade code to fail when trying to find user-specific
     'macports.conf' files;


Property changes on: branches/release_1_6/base/NEWS
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: branches/release_1_6/base/aclocal.m4
===================================================================
--- branches/release_1_6/base/aclocal.m4	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/aclocal.m4	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,7 +1,8 @@
-builtin(include,tcl.m4)
-builtin(include,objc.m4)
-builtin(include,pthread.m4)
-builtin(include,foundation.m4)
+dnl $Id$
+builtin(include,m4/tcl.m4)
+builtin(include,m4/objc.m4)
+builtin(include,m4/pthread.m4)
+builtin(include,m4/foundation.m4)
 
 #------------------------------------------------------------------------
 # MP_CHECK_FRAMEWORK_COREFOUNDATION --

Deleted: branches/release_1_6/base/config/Makefile
===================================================================
--- branches/release_1_6/base/config/Makefile	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/config/Makefile	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,13 +0,0 @@
-include ../Mk/macports.autoconf.mk
-
-all:
-
-clean:
-
-test:
-
-distclean: clean
-
-install::
-	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${DESTDIR}${mpconfigdir}
-	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 mp_version ${DESTDIR}${mpconfigdir}

Modified: branches/release_1_6/base/config/README.TXT
===================================================================
--- branches/release_1_6/base/config/README.TXT	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/config/README.TXT	2008-01-17 06:11:54 UTC (rev 33045)
@@ -4,4 +4,4 @@
 
 The script handling that operation checks out from svn the code tagged by the
 contents of the RELEASE_URL file and makes that code available via rsync.
-The script is svn at base/portmgr/mprsyncup.
+The script is in svn at base/portmgr/mprsyncup.

Modified: branches/release_1_6/base/config/RELEASE_URL
===================================================================
--- branches/release_1_6/base/config/RELEASE_URL	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/config/RELEASE_URL	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1 +1 @@
-http://svn.macports.org/repository/macports/tags/release_1_5_2/base
+http://svn.macports.org/repository/macports/tags/release_1_6_0/base

Deleted: branches/release_1_6/base/config/dp_version
===================================================================
--- branches/release_1_6/base/config/dp_version	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/config/dp_version	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1 +0,0 @@
-1.600

Added: branches/release_1_6/base/config/macports_version
===================================================================
--- branches/release_1_6/base/config/macports_version	                        (rev 0)
+++ branches/release_1_6/base/config/macports_version	2008-01-17 06:11:54 UTC (rev 33045)
@@ -0,0 +1 @@
+1.7.0

Modified: branches/release_1_6/base/configure.ac
===================================================================
--- branches/release_1_6/base/configure.ac	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/configure.ac	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,11 +1,21 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
 AC_PREREQ(2.52)
-AC_INIT([MacPorts], [esyscmd(cat config/mp_version | tr -d '\n')], [macports-dev at lists.macosforge.org], [macports])
+AC_DEFUN([MACPORTS_VERSION_MACRO], [esyscmd(cat config/macports_version | tr -d '\n')])
+AC_INIT([MacPorts], [MACPORTS_VERSION_MACRO], [macports-dev at lists.macosforge.org], [macports])
 AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
 AC_CONFIG_HEADERS([src/config.h])
 AC_CANONICAL_SYSTEM
 
+# Read in the MacPorts version from the base/config/macports_vesion file
+AC_MSG_CHECKING(MacPorts version)
+MACPORTS_VERSION=MACPORTS_VERSION_MACRO
+AC_MSG_RESULT([$MACPORTS_VERSION])
+AC_SUBST(MACPORTS_VERSION)
+# Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
+MP_VERSION=$(cat config/mp_version | tr -d '\n')
+AC_SUBST(MP_VERSION)
+
 # Check user PATH for MP paths, and remove as necessary.
 MP_PATH_SCAN
 
@@ -55,13 +65,6 @@
     ;;
 esac
 
-# translate mp_version (1.600) to regular version (1.6.0)
-AC_MSG_CHECKING(MacPorts version)
-MP_VERSION=`cat config/mp_version | tr -d '\n'`
-VER=`echo $MP_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)0\{0,1\}\([[0-9]][[1-9]]\{0,1\}\)0\{0,1\}/\1.\2.\3/'`
-AC_MSG_RESULT([$VER])
-AC_SUBST(VER)
-
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_OBJC
@@ -260,6 +263,7 @@
 # If sqlite3 package isn't installed, configure and install sqlite3 package.
 if test "$with_included_sqlite3" = "yes"; then
 	OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES sqlite-3.1.3"
+	INCLUDES="$INCLUDES -I../sqlite-3.1.3"
 	AC_CONFIG_SUBDIRS([src/sqlite-3.1.3])
 	# Extract sqlite3 package
 	(cd src/; gzip -d < sqlite-3.1.3.tar.gz | tar xf -)

Deleted: branches/release_1_6/base/foundation.m4
===================================================================
--- branches/release_1_6/base/foundation.m4	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/foundation.m4	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,418 +0,0 @@
-#------------------------------------------------------------------------
-# MP_COMPILER_ATTRIBUTE_LF_PRIVATE
-#
-#	Determines whether the compiler supports the symbol
-#	'visibility("hidden")' attribute
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	none
-#
-# Depends:
-#	none
-#
-# Results:
-#
-#	Defines the following macros:
-#		LF_PRIVATE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN([MP_COMPILER_ATTRIBUTE_LF_PRIVATE], [
-	AC_MSG_CHECKING([for gcc symbol visibility attribute])
-	AC_CACHE_VAL(mp_cv_attribute_mp_private, [
-		AC_COMPILE_IFELSE([
-			AC_LANG_SOURCE([
-				#if defined(__GNUC__) && defined(__APPLE__) && __GNUC__ < 4
-				# error Darwin does not support the visibility attribute with gcc releases prior to 4
-				#elif defined(WIN32) && __GNUC__ < 4
-				# error MinGW/Cygwin do not support the visibility attribute with gcc releases prior to 4.
-				#endif
-				int a __attribute__ ((visibility("hidden")));
-			])
-		],[
-			mp_cv_attribute_mp_private="__attribute__((visibility(\"hidden\")))"
-		],[
-			mp_cv_attribute_mp_private="no"
-		])
-	])
-
-	AC_MSG_RESULT([$mp_cv_attribute_mp_private])
-	
-	if test x"$mp_cv_attribute_mp_private" = "xno"; then
-		MP_PRIVATE=""
-	else
-		MP_PRIVATE="$mp_cv_attribute_mp_private"
-	fi
-
-	AC_DEFINE_UNQUOTED(MP_PRIVATE, $MP_PRIVATE, [Mark private symbols])
-])
-
-
-#------------------------------------------------------------------------
-# MP_OBJC_RUNTIME --
-#
-#	Determine the default, working Objective C runtime
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	none
-#
-# Depends:
-#	AC_PROG_OBJC from objc.m4
-#
-# Results:
-#
-#	Adds a --with-objc-runtime switch to configure.
-#	Result is cached.
-#
-#	Defines one of the following preprocessor macros:
-#		APPLE_RUNTIME GNU_RUNTIME
-#
-#	Substitutes the following variables:
-#		OBJC_RUNTIME OBJC_RUNTIME_FLAGS OBJC_LIBS
-#		OBJC_PTHREAD_CFLAGS OBJC_PTHREAD_LIBS
-#------------------------------------------------------------------------
-AC_DEFUN([MP_OBJC_RUNTIME],[
-	AC_REQUIRE([AC_PROG_OBJC])
-	AC_ARG_WITH(objc-runtime, AC_HELP_STRING([--with-objc-runtime], [Specify either "GNU" or "apple"]), [with_objc_runtime=${withval}])
-
-	if test x"${with_objc_runtime}" != x; then
-		case "${with_objc_runtime}" in
-			GNU)
-				;;
-			apple)
-				;;
-			*)
-				AC_MSG_ERROR([${with_objc_runtime} is not a valid argument to --with-objc-runtime. Please specify either "GNU" or "apple"])
-				;;
-		esac
-	fi
-
-	AC_LANG_PUSH([Objective C])
-
-	# Check for common header, objc/objc.h
-	AC_CHECK_HEADERS([objc/objc.h], ,[AC_MSG_ERROR([Can't locate Objective C runtime headers])])
-
-	# Save LIBS & OBJCFLAGS 
-	# depending on whether the cache is used,
-	# the variables may or may not be modified.
-	OLD_LIBS="${LIBS}"
-	OLD_OBJCFLAGS="${OBJCFLAGS}"
-
-	# Add -lobjc. The following tests will ensure that the library exists and functions with the detected Objective C compiler
-	LIBS="${LIBS} -lobjc"
-
-	# Test if pthreads are required to link against
-	# libobjc - this is the case on FreeBSD.
-
-	AC_MSG_CHECKING([if linking libobjc requires pthreads])
-	AC_CACHE_VAL(mp_cv_objc_req_pthread, [
-		# First, test if objc links without pthreads
-		# The following uses quadrigraphs
-		# '@<:@' = '['
-		# '@:>@' = ']'
-		AC_LINK_IFELSE([
-				AC_LANG_PROGRAM([
-						#include <objc/objc.h>
-						#include <objc/Object.h>
-					], [
-						Object *obj = @<:@Object alloc@:>@;
-						puts(@<:@obj name@:>@);
-					])
-				], [
-					# Linked without -pthread
-					mp_cv_objc_req_pthread="no"
-				], [
-					# Failed to link without -pthread
-					mp_cv_objc_req_pthread="yes"
-				]
-		)
-
-		# If the above failed, try with pthreads
-		if test x"${mp_cv_objc_req_pthread}" = x"yes"; then
-			LIBS="${LIBS} ${PTHREAD_LIBS}"
-			OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
-			AC_LINK_IFELSE([
-					AC_LANG_PROGRAM([
-							#include <objc/objc.h>
-							#include <objc/Object.h>
-						], [
-							Object *obj = @<:@Object alloc@:>@;
-							puts(@<:@obj name@:>@);
-						])
-					], [
-						# Linked with -lpthread 
-						mp_cv_objc_req_pthread="yes"
-					], [
-						# Failed to link against objc at all
-						# This will be caught in the runtime
-						# checks below
-						mp_cv_objc_req_pthread="no"
-					]
-			)
-		fi
-	])
-	AC_MSG_RESULT(${mp_cv_objc_req_pthread})
-
-	if test x"${mp_cv_objc_req_pthread}" = x"no"; then
-		OBJC_LIBS="-lobjc"
-		OBJC_PTHREAD_LIBS="${PTHREAD_LIBS}"
-		OBJC_PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
-	elif test x"${mp_cv_objc_req_pthread}" = x"yes"; then
-		OBJC_LIBS="-lobjc ${PTHREAD_LIBS}"
-		OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
-	fi
-
-	if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"apple"; then
-		AC_MSG_CHECKING([for Apple Objective-C runtime])
-		AC_CACHE_VAL(mp_cv_objc_runtime_apple, [
-			# The following uses quadrigraphs
-			# '@<:@' = '['
-			# '@:>@' = ']'
-			AC_LINK_IFELSE([
-					AC_LANG_PROGRAM([
-							#include <objc/objc.h>
-							#include <objc/objc-api.h>
-						], [
-							id class = objc_lookUpClass("Object");
-							id obj = @<:@class alloc@:>@;
-							puts(@<:@obj name@:>@);
-						])
-					], [
-						mp_cv_objc_runtime_apple="yes"
-					], [
-						mp_cv_objc_runtime_apple="no"
-					]
-			)
-		])
-		AC_MSG_RESULT(${mp_cv_objc_runtime_apple})
-	else
-		mp_cv_objc_runtime_apple="no"
-	fi
-
-	if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"GNU"; then
-		AC_MSG_CHECKING([for GNU Objective C runtime])
-		AC_CACHE_VAL(mp_cv_objc_runtime_gnu, [
-			# The following uses quadrigraphs
-			# '@<:@' = '['
-			# '@:>@' = ']'
-			AC_LINK_IFELSE([
-					AC_LANG_PROGRAM([
-							#include <objc/objc.h>
-							#include <objc/objc-api.h>
-						], [
-							id class = objc_lookup_class("Object");
-							id obj = @<:@class alloc@:>@;
-							puts(@<:@obj name@:>@);
-						])
-					], [
-						mp_cv_objc_runtime_gnu="yes"
-					], [
-						mp_cv_objc_runtime_gnu="no"
-					]
-			)
-		])
-		AC_MSG_RESULT(${mp_cv_objc_runtime_gnu})
-	else
-		mp_cv_objc_runtime_gnu="no"
-	fi
-
-	# Apple runtime is prefered
-	if test x"${mp_cv_objc_runtime_apple}" = x"yes"; then
-			OBJC_RUNTIME="APPLE_RUNTIME"
-			OBJC_RUNTIME_FLAGS="-fnext-runtime"
-			AC_MSG_NOTICE([Using Apple Objective-C runtime])
-			AC_DEFINE([APPLE_RUNTIME], 1, [Define if using the Apple Objective-C runtime and compiler.]) 
-	elif test x"${mp_cv_objc_runtime_gnu}" = x"yes"; then
-			OBJC_RUNTIME="GNU_RUNTIME"
-			OBJC_RUNTIME_FLAGS="-fgnu-runtime"
-			AC_MSG_NOTICE([Using GNU Objective-C runtime])
-			AC_DEFINE([GNU_RUNTIME], 1, [Define if using the GNU Objective-C runtime and compiler.]) 
-	else
-			AC_MSG_FAILURE([Could not locate a working Objective-C runtime.])
-	fi
-
-	# Restore LIBS & OBJCFLAGS
-	LIBS="${OLD_LIBS}"
-	OBJCFLAGS="${OLD_OBJCFLAGS}"
-
-	AC_SUBST([OBJC_RUNTIME])
-	AC_SUBST([OBJC_RUNTIME_FLAGS])
-	AC_SUBST([OBJC_LIBS])
-
-	AC_SUBST([OBJC_PTHREAD_LIBS])
-	AC_SUBST([OBJC_PTHREAD_CFLAGS])
-
-	AC_LANG_POP([Objective C])
-])
-
-#------------------------------------------------------------------------
-# MP_OBJC_FOUNDATION --
-#
-#	Find a functional Foundation implementation.
-#	The NeXT Foundation implementation is prefered,
-#	as it is most likely to be the system provided
-#	Foundation.
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	OBJC_RUNTIME
-#
-# Depends:
-#	AC_PROG_OBJC from objc.m4
-#
-# Results:
-#
-#	Adds a --with-objc-foundation switch to configure.
-#	Result is cached.
-#
-#	Defines one of the following preprocessor macros:
-#		APPLE_FOUNDATION GNUSTEP_FOUNDATION
-#
-#	Substitutes the following variables:
-#		OBJC_FOUNDATION OBJC_FOUNDATION_LDFLAGS
-#		OBJC_FOUNDATION_CPPFLAGS OBJC_FOUNDATION_LIBS
-#------------------------------------------------------------------------
-AC_DEFUN([MP_OBJC_FOUNDATION],[
-	AC_REQUIRE([AC_PROG_OBJC])
-	AC_ARG_WITH(objc-foundation, [  --with-objc-foundation  Specify either "GNUstep" or "apple"], [with_objc_foundation=${withval}])
-
-	if test x"${with_objc_foundation}" != x; then
-		case "${with_objc_foundation}" in
-			GNUstep)
-				;;
-			GNU)
-				with_objc_foundation="GNUstep"
-				;;
-			apple)
-				;;
-			*)
-				AC_MSG_ERROR([${with_objc_foundation} is not a valid argument to --with-objc-foundation. Please specify either "GNU" or "apple"])
-				;;
-		esac
-	fi
-
-	AC_LANG_PUSH([Objective C])
-
-	if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
-		# '@<:@' = '['
-		# '@:>@' = ']'
-		AC_MSG_CHECKING([for Apple Foundation library])
-
-		# Set NeXT LIBS and CFLAGS
-		APPLE_FOUNDATION_CFLAGS="-framework Foundation"
-		APPLE_FOUNDATION_LIBS="-framework Foundation"
-
-		AC_CACHE_VAL(ac_cv_objc_foundation_apple, [
-			# Save old LIBS and CFLAGS
-			LIBS_OLD="${LIBS}"
-			CFLAGS_OLD="${CFLAGS}"
-
-			CFLAGS="${APPLE_FOUNDATION_CFLAGS} ${CFLAGS}"
-			LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
-
-			AC_LINK_IFELSE([
-					AC_LANG_PROGRAM([
-								#include <Foundation/Foundation.h>
-							], [
-								NSString *string = @<:@@<:@NSString alloc@:>@ initWithCString: "Hello World"@:>@;
-								@<:@NSString length@:>@;
-							])
-					],[
-						ac_cv_objc_foundation_apple="yes"
-					],[
-						ac_cv_objc_foundation_apple="no"
-					]
-			)
-			# Restore LIBS and CFLAGS
-			LIBS="${LIBS_OLD}"
-			CFLAGS="${CFLAGS_OLD}"
-		])
-		AC_MSG_RESULT(${ac_cv_objc_foundation_apple})
-	else
-		ac_cv_objc_foundation_apple="no"
-	fi
-
-	if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
-		if test x"${GNUSTEP_SYSTEM_ROOT}" == x; then
-			if test x"${with_objc_foundation}" == x"GNUstep"; then
-				AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
-			else
-				AC_MSG_WARN([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
-			fi
-		else
-
-			AC_MSG_CHECKING([for GNUstep Foundation library])
-
-			# Set GNUstep LDFLAGS, CPPFLAGS, and LIBS
-			GNUSTEP_LDFLAGS="-L${GNUSTEP_SYSTEM_ROOT}/Library/Libraries/"
-			GNUSTEP_CPPFLAGS="-I${GNUSTEP_SYSTEM_ROOT}/Library/Headers/"
-			GNUSTEP_LIBS="-lgnustep-base"
-
-			AC_CACHE_VAL(ac_cv_objc_foundation_gnustep, [
-				# Save old LDFLAGS, CPPFLAGS, and LIBS
-				LDFLAGS_OLD="${LDFLAGS}"
-				CPPFLAGS_OLD="${CPPFLAGS}"
-				LIBS_OLD="${LIBS}"
-
-				LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
-				CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
-				LIBS="${GNUSTEP_LIBS} ${LIBS}"
-
-				AC_LINK_IFELSE([
-						AC_LANG_PROGRAM([
-									#include <Foundation/Foundation.h>
-								], [
-									NSString *string = @<:@@<:@NSString alloc@:>@ initWithCString: "Hello World"@:>@;
-									@<:@NSString length@:>@;
-								])
-						],[
-							ac_cv_objc_foundation_gnustep="yes"
-						],[
-							ac_cv_objc_foundation_gnustep="no"
-						]
-				)
-				# Restore LDFLAGS, CPPFLAGS, and LIBS
-				LDFLAGS="${LDFLAGS_OLD}"
-				CPPFLAGS="${CPPFLAGS_OLD}"
-				LIBS="${LIBS_OLD}"
-			])
-			AC_MSG_RESULT(${ac_cv_objc_foundation_gnustep})
-		fi
-	else
-		ac_cv_objc_foundation_gnustep="no"
-	fi
-
-	# NeXT Foundation is prefered
-	if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
-		OBJC_FOUNDATION="Apple"
-		OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
-		OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
-		OBJC_FOUNDATION_LDFLAGS=""
-		AC_DEFINE([APPLE_FOUNDATION], 1, [Define if using the Apple Foundation framework]) 
-		AC_MSG_NOTICE([Using Apple Foundation library])
-	elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
-		OBJC_FOUNDATION="GNUstep"
-		OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
-		OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
-		OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
-		AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library]) 
-		AC_MSG_NOTICE([Using GNUstep Foundation library])
-	else
-		AC_MSG_ERROR([Could not find a working Foundation implementation])
-	fi
-
-	AC_SUBST([OBJC_FOUNDATION])
-	AC_SUBST([OBJC_FOUNDATION_LDFLAGS])
-	AC_SUBST([OBJC_FOUNDATION_CPPFLAGS])
-	AC_SUBST([OBJC_FOUNDATION_LIBS])
-
-	AC_LANG_POP([Objective C])
-])

Copied: branches/release_1_6/base/m4 (from rev 32721, trunk/base/m4)

Modified: branches/release_1_6/base/m4/foundation.m4
===================================================================

Modified: branches/release_1_6/base/m4/objc.m4
===================================================================

Modified: branches/release_1_6/base/m4/pthread.m4
===================================================================

Modified: branches/release_1_6/base/m4/tcl.m4
===================================================================

Deleted: branches/release_1_6/base/objc.m4
===================================================================
--- branches/release_1_6/base/objc.m4	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/objc.m4	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,623 +0,0 @@
-# objc.m4
-# Based on c.m4 from GNU Autoconf
-# The Objective C support, added by Landon Fuller <landonf at opendarwin.org>
-# on March 10th, 2004, is heavily based on Autoconf's existing C++ support.
-#
-########### Copyright and Licensing terms ##########
-#
-# This file is part of Autoconf.                       -*- Autoconf -*-
-# Programming languages support.
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-#
-# 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, 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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-# As a special exception, the Free Software Foundation gives unlimited
-# permission to copy, distribute and modify the configure scripts that
-# are the output of Autoconf.  You need not follow the terms of the GNU
-# General Public License when using or distributing such scripts, even
-# though portions of the text of Autoconf appear in them.  The GNU
-# General Public License (GPL) does govern all other use of the material
-# that constitutes the Autoconf program.
-#
-# Certain portions of the Autoconf source text are designed to be copied
-# (in certain cases, depending on the input) into the output of
-# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
-# source text consists of comments plus executable code that decides which
-# of the data portions to output in any given case.  We call these
-# comments and executable code the "non-data" portions.  Autoconf never
-# copies any of the non-data portions into its output.
-#
-# This special exception to the GPL applies to versions of Autoconf
-# released by the Free Software Foundation.  When you make and
-# distribute a modified version of Autoconf, you may extend this special
-# exception to the GPL to apply to your modified version as well, *unless*
-# your modified version has the potential to copy into its output some
-# of the text that was the non-data portion of the version that you started
-# with.  (In other words, unless your change moves or copies text from
-# the non-data portions to the data portions.)  If your modification has
-# such potential, you must delete any notice of this special exception
-# to the GPL from your modified version.
-#
-# Written by David MacKenzie, with help from
-# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
-# Roland McGrath, Noah Friedman, david d zuhn, and many others.
-#
-########## GNU General Public License (GPL), version 2  ##########
-#
-#		    GNU GENERAL PUBLIC LICENSE
-#		       Version 2, June 1991
-#
-#  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-#      59 Temple Place, Suite 330, Boston, MA  02111-1307  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.
-#
-#    <one line to give the program's name and a brief idea of what it does.>
-#    Copyright (C) <year>  <name of author>
-#
-#    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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) year  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.
-#
-#  <signature of Ty Coon>, 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.
-#
-########## End of GNU General Public License (GPL), version 2 ##########
-
-## ----------------------- ##
-## 1. Language selection.  ##
-## ----------------------- ##
-
-
-# ------------------------------ #
-# 1d. The Objective C language.  #
-# ------------------------------ #
-
-# AC_LANG(Objective C)
-# --------------------
-# OBJCFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-m4_define([AC_LANG(Objective C)],
-[ac_ext=m
-ac_cpp='$OBJCPP $CPPFLAGS'
-ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
-ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
-ac_compiler_gnu=$ac_cv_objc_compiler_gnu
-])
-
-
-# AC_LANG_OBJC
-# -------------------------
-AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)])
-
-
-# _AC_LANG_ABBREV(Objective C)
-# ----------------------------
-m4_define([_AC_LANG_ABBREV(Objective C)], [objc])
-
-
-# _AC_LANG_PREFIX(Objective C)
-# ----------------------------
-m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC])
-
-
-
-## ---------------------- ##
-## 2.Producing programs.  ##
-## ---------------------- ##
-
-
-# ------------------------- #
-# 2d. Objective C sources.  #
-# ------------------------- #
-
-# AC_LANG_SOURCE(Objective C)(BODY)
-# ---------------------------------
-m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)])
-
-
-# AC_LANG_PROGRAM(Objective C)([PROLOGUE], [BODY])
-# ------------------------------------------------
-m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(Objective C)])
-
-
-# AC_LANG_CALL(Objective C)(PROLOGUE, FUNCTION)
-# ---------------------------------------------
-m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(Objective C)])
-
-
-# AC_LANG_FUNC_LINK_TRY(Objective C)(FUNCTION)
-# --------------------------------------------
-m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(Objective C)])
-
-
-# AC_LANG_BOOL_COMPILE_TRY(Objective C)(PROLOGUE, EXPRESSION)
-# -----------------------------------------------------------
-m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(Objective C)])
-
-
-# AC_LANG_INT_SAVE(Objective C)(PROLOGUE, EXPRESSION)
-# ---------------------------------------------------
-m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(Objective C)])
-
-
-
-## -------------------------------------------- ##
-## 3. Looking for Compilers and Preprocessors.  ##
-## -------------------------------------------- ##
-
-
-# ------------------------------ #
-# 3d. The Objective C compiler.  #
-# ------------------------------ #
-
-
-# AC_LANG_PREPROC(Objecitve C)
-# ----------------------------
-# Find the Objective C preprocessor.  Must be AC_DEFUN'd to be AC_REQUIRE'able.
-AC_DEFUN([AC_LANG_PREPROC(Objective C)],
-[AC_REQUIRE([AC_PROG_OBJCPP])])
-
-
-# AC_PROG_OBJCPP
-# --------------
-# Find a working Objective C preprocessor.
-# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
-# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_OBJC.
-AC_DEFUN([AC_PROG_OBJCPP],
-[AC_REQUIRE([AC_PROG_OBJC])dnl
-AC_ARG_VAR([OBJCPP],   [Objective C preprocessor])dnl
-_AC_ARG_VAR_CPPFLAGS()dnl
-AC_LANG_PUSH(Objective C)dnl
-AC_MSG_CHECKING([how to run the Objective C preprocessor])
-if test -z "$OBJCPP"; then
-  AC_CACHE_VAL(ac_cv_prog_OBJCPP,
-  [dnl
-    # Double quotes because OBJCPP needs to be expanded
-    for OBJCPP in "$OBJC -E" "/lib/cpp"
-    do
-      _AC_PROG_PREPROC_WORKS_IFELSE([break])
-    done
-    ac_cv_prog_OBJCPP=$OBJCPP
-  ])dnl
-  OBJCPP=$ac_cv_prog_OBJCPP
-else
-  ac_cv_prog_OBJCPP=$OBJCPP
-fi
-AC_MSG_RESULT([$OBJCPP])
-_AC_PROG_PREPROC_WORKS_IFELSE([],
-	  [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])])
-AC_SUBST(OBJCPP)dnl
-AC_LANG_POP(Objective C)dnl
-])# AC_PROG_OBJCPP
-
-
-# AC_LANG_COMPILER(Objective C)
-# -----------------------------
-# Find the Objective C compiler.  Must be AC_DEFUN'd to be AC_REQUIRE'able.
-AC_DEFUN([AC_LANG_COMPILER(Objective C)],
-[AC_REQUIRE([AC_PROG_OBJC])])
-
-
-# ac_cv_prog_objc
-# ---------------
-# We used to name the cache variable this way.
-AU_DEFUN([ac_cv_prog_objc],
-[ac_cv_objc_compiler_gnu])
-
-
-# AC_PROG_OBJC([LIST-OF-COMPILERS])
-# ---------------------------------
-# LIST-OF-COMPILERS is a space separated list of Objective C compilers
-# to search for (if not specified, a default list is used).  This just gives
-# the user an opportunity to specify an alternative search list for the
-# Objective C compiler.
-# cc    Native compiler
-# objc  David Stes' Portable Object Compiler
-AN_MAKEVAR([OBJC],  [AC_PROG_OBJC])
-AN_PROGRAM([gcc],   [AC_PROG_OBJC])
-AN_PROGRAM([cc],    [AC_PROG_OBJC])
-AC_DEFUN([AC_PROG_OBJC],
-[AC_LANG_PUSH(Objective C)dnl
-AC_ARG_VAR([OBJC],      [Objective C compiler command])dnl
-AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-_AC_ARG_VAR_CPPFLAGS()dnl
-AC_CHECK_TOOLS(OBJC,
-	       [$CCC m4_default([$1],
-			  [gcc cc objc])],
-	       gcc)
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
-ac_compiler=`set X $ac_compile; echo $[2]`
-_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
-_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
-_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
-
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
-m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
-_AC_LANG_COMPILER_GNU
-GOBJC=`test $ac_compiler_gnu = yes && echo yes`
-_AC_PROG_OBJC_G
-AC_LANG_POP(Objective C)dnl
-])# AC_PROG_OBJC
-
-
-# _AC_PROG_OBJC_G
-# ---------------
-# Check whether -g works, even if OBJCFLAGS is set, in case the package
-# plays around with OBJCFLAGS (such as to build both debugging and
-# normal versions of a library), tasteless as that idea is.
-m4_define([_AC_PROG_OBJC_G],
-[ac_test_OBJCFLAGS=${OBJCFLAGS+set}
-ac_save_OBJCFLAGS=$OBJCFLAGS
-OBJCFLAGS="-g"
-AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g,
-	       [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-				   [ac_cv_prog_objc_g=yes],
-				   [ac_cv_prog_objc_g=no])])
-if test "$ac_test_OBJCFLAGS" = set; then
-  OBJCFLAGS=$ac_save_OBJCFLAGS
-elif test $ac_cv_prog_objc_g = yes; then
-  if test "$GOBJC" = yes; then
-    OBJCFLAGS="-g -O2"
-  else
-    OBJCFLAGS="-g"
-  fi
-else
-  if test "$GOBJC" = yes; then
-    OBJCFLAGS="-O2"
-  else
-    OBJCFLAGS=
-  fi
-fi[]dnl
-])# _AC_PROG_OBJC_G
-
-
-## ------------------------------- ##
-## 4. Compilers' characteristics.  ##
-## ------------------------------- ##
-
-
-# -------------------------------- #
-# 4b. C compiler characteristics.  #
-# -------------------------------- #
-
-# libobjc and objc header tests shere?

Modified: branches/release_1_6/base/portmgr/ReleaseProcess
===================================================================
--- branches/release_1_6/base/portmgr/ReleaseProcess	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/ReleaseProcess	2008-01-17 06:11:54 UTC (rev 33045)
@@ -115,7 +115,7 @@
 And finally we tag the entire directory as release_1_6_0-archive:
 
  cd ../../
- svn cp -m "commit-message" release_1.6.0-archive http://svn.macports.org/repository/tags/release_1_6_0-archive
+ svn cp -m "commit-message" release_1.6.0-archive http://svn.macports.org/repository/macports/tags/release_1_6_0-archive
 
 
 === Create & Post Release Tarballs ===
@@ -126,12 +126,11 @@
  MacPorts-1.6.0.tar.{bz2,gz} (base directory only, corresponding to tag release_1_6_0)
  MacPorts-1.6.0-archive.tar.{bz2,gz} (complete archives corresponding to tag release_1_6_0-archive)
 
-The following commands issued to the top level Makefile will generate the archives and checksums:
+The following commands issued to the top level Makefile will generate all the tarballs and checksums:
 
- make DISTVER=1.6.0 distfromsvn
+ make ARC=yes DISTVER=1.6.0 distfromsvn
 
-Note that you need to pass the "ARC=yes" flag on the command line to the "distfromsvn" top-level make target
-if you also wish to produce the full archive tarballs.
+Note that if you omit the "ARC=yes" flag at the start of the make call then the full archive tarballs will not be produced.
 
 All these tarballs are uploaded via svn to the http://svn.macports.org/repository/macports/downloads/MacPorts-1.6.0/
 directory.
@@ -156,8 +155,9 @@
 To create a disk image, use the MacPorts port. The Portfile will need to be updated to incorporate the
 proper release version and checksums, and the release tarballs will need to be already uploaded to the
 downloads section of the site (wherefrom the sources are fetched by the MacPorts port to build the dmg
-for the release). Resource files in the files/ directory of the MacPorts port will also have to be fully
-up to date, in sync with their copies in the base/portmgr/dmg svn directory.
+for the release). Make sure the ports tree you're using to build the dmg's is fully up to date, as to
+insure the resource files in the files/ directory of the port are current (fetched through svn:externals
+off the base/portmgr/dmg directory of the current final release tag).
 
  sudo port -d dmg MacPorts
 
@@ -166,7 +166,7 @@
 
  cd work
  mv MacPorts-1.6.0.dmg MacPorts-1.6.0-10.5-Leopard.dmg
- for type in -md5 -sha1 -ripemd160; do openssl dgst $type MacPorts-1.6.0-10.5-Leopard.dmg; done
+ for dmg in MacPorts-1.6.0-*.dmg; do for type in -md5 -sha1 -ripemd160; do openssl dgst $type $dmg; done >> MacPorts-1.6.0.chk.txt; done
 
 These new products, along with the new checksums, also have to be posted to the appropriate downloads
 directory of the MacPorts svn repository. Developers are required to validate the generated installer as
@@ -177,9 +177,19 @@
  * Linking: libraries and binaries should not be linked against anything that's not present by default
    on a vanilla Mac OS X installation + developer tools, excluding even the MacPorts installation prefix;
    this can be accomplished through the use of otool's -L flag. Currently the libraries and binaries in need
-   of linking validation are: ${destroot}/Library/Tcl/macports1.0/MacPorts.dylib, ${destroot}/opt/local/bin/daemondo
-   ${destroot}/opt/local/share/macports/Tcl/darwintrace1.0/darwintrace.dylib, ${destroot}/opt/local/share/macports/\
-   Tcl/pextlib1.0/Pextlib.dylib and ${destroot}/opt/local/share/macports/Tcl/tclobjc1.0/tclobjc.dylib.
+   of linking validation are:
+             ${destroot}/Library/Tcl/macports1.0/MacPorts.dylib
+	     ${destroot}/opt/local/bin/daemondo (only built on 10.4 and later)
+	     ${destroot}/opt/local/share/macports/Tcl/darwintrace1.0/darwintrace.dylib
+	     ${destroot}/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib
+	     ${destroot}/opt/local/share/macports/Tcl/registry2.0/registry.dylib
+	     ${destroot}/opt/local/share/macports/Tcl/tclobjc1.0/tclobjc.dylib
+ * Universal building: When building for Tiger and above, all the files that need linking confirmation in the
+   step above also need to be confirmed of the universal type. A way to do this is through the file(1) command:
+             file ${destroot}/opt/local/bin/daemondo:
+                  ${destroot}/opt/local/bin/daemondo: Mach-O universal binary with 2 architectures
+                  ${destroot}/opt/local/bin/daemondo (for architecture ppc):  Mach-O executable ppc
+                  ${destroot}/opt/local/bin/daemondo (for architecture i386): Mach-O executable i386
  * tclsh shell invoked by our scripts: all scripts installed in ${destroot}/opt/local/bin (that is port,
    portindex and portmirror) should invoke the tclsh shell through a call like:
              #!/bin/sh
@@ -208,10 +218,11 @@
 
 Once the release has been posted, notification of the release should be sent/posted to the following places:
 
- * The macports-users at lists.macosforge.org and macports-dev at lists.macosforge.org mailing lists.
- * The MacPorts website, by adapting the $mp_version_major and $mp_version_latest variables as appropriate in the trunk/www/includes/common.inc file.
- * Apple's [http://www.apple.com/downloads/macosx/unix_open_source/macports.html Mac OS X software downloads page] (submitter: jmpp@)
+ * The macports-announce@, macports-users@ and macports-dev@ mailing lists.
+ * The MacPorts website, by adapting the $macports_version_major and $macports_version_latest variables as appropriate in the trunk/www/includes/common.inc file.
+ * [http://www.apple.com/downloads/macosx/unix_open_source/macports.html Apple's downloads page] (submitter: jmpp@)
  * [http://freshmeat.net/projects/macports/ Freshmeat] (submitter: mww@)
  * [http://www.versiontracker.com/dyn/moreinfo/macosx/26679 VersionTracker] (submitter: mij@)
+ * [http://sourceforge.net/projects/macports/ sourceforge] (submitted: rhwood@)
  * [http://www.macupdate.com/info.php/id/21309/macports MacUpdate] (submitter: ???)
  * (Where else?)

Modified: branches/release_1_6/base/portmgr/dmg/preflight
===================================================================
--- branches/release_1_6/base/portmgr/dmg/preflight	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/dmg/preflight	2008-01-17 06:11:54 UTC (rev 33045)
@@ -59,64 +59,68 @@
 
 [ ! -d /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports ] || {
     mkdir -vp /opt/local/var/macports/sources/rsync.macports.org/release && mv -v \
-        /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports /opt/local/var/macports/sources/rsync.macports.org/release/ports ;
+      /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports /opt/local/var/macports/sources/rsync.macports.org/release/ports
 }
 
-for receipt in /opt/local/var/macports/receipts/*/*/receipt.bz2 ; do
+for receipt in /opt/local/var/macports/receipts/*/*/receipt.bz2; do
     [ ! \( -f ${receipt} -a ! -f ${receipt}.mpsaved \) ] || { cp -v ${receipt} ${receipt}.mpsaved && {
-      bzip2 -q -dc ${receipt} | sed 's/db\/dports/macports/g' | bzip2 -q -zf > ${receipt}.new ;
-    } && mv -v ${receipt}.new ${receipt} ;
+        bzip2 -q -dc ${receipt} | sed 's/db\/dports/macports/g' | bzip2 -q -zf > ${receipt}.new
+    } && mv -v ${receipt}.new ${receipt}
 }; done
 
 [ ! \( -f /opt/local/etc/macports/ports.conf -a ! -f ${UPGRADECHECK} \) ] || {
-  mv -v /opt/local/etc/macports/ports.conf /opt/local/etc/macports/macports.conf.mpsaved
-  sed 's/etc\/ports/etc\/macports/g' /opt/local/etc/macports/macports.conf.mpsaved > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/db\/dports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc//macports/macports.conf.tmp && \
-    mv -v /opt/local/etc//macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/darwinports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/dpupdate1\/base/release\/base/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed '/^rsync_options/s/"\(.*\)"/\1/' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/ --delete / /' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/ ports.conf(5)/ macports.conf(5)/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    mv -v /opt/local/etc/macports/ports.conf /opt/local/etc/macports/macports.conf.mpsaved
+    sed 's/etc\/ports/etc\/macports/g' /opt/local/etc/macports/macports.conf.mpsaved > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/db\/dports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc//macports/macports.conf.tmp && \
+      mv -v /opt/local/etc//macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/darwinports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/dpupdate1\/base/release\/base/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed '/^rsync_options/s/"\(.*\)"/\1/' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/ --delete / /' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/ ports.conf(5)/ macports.conf(5)/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
 }
 
 [ ! \( -f /opt/local/etc/macports/sources.conf -a ! -f ${UPGRADECHECK} \) ] || {
-  cp -v /opt/local/etc/macports/sources.conf /opt/local/etc/macports/sources.conf.mpsaved
-  sed 's/darwinports/macports/g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
-    mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
-  sed 's/dpupdate\/dports/release\/ports\//g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
-    mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
+    cp -v /opt/local/etc/macports/sources.conf /opt/local/etc/macports/sources.conf.mpsaved
+    sed 's/darwinports/macports/g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
+      mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
+    sed 's/dpupdate\/dports/release\/ports\//g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
+      mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
 }
 
 [ ! \( -f "${HOME}/.macports/ports.conf" -a ! -f ${UPGRADECHECK} \) ] || {
-  mv -v "${HOME}/.macports/ports.conf" "${HOME}/.macports/macports.conf.mpsaved"
-  sed 's/etc\/ports/etc\/macports/g' "${HOME}/.macports/macports.conf.mpsaved" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/db\/dports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/darwinports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/dpupdate1\/base/release\/base/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed '/^rsync_options/s/"\(.*\)"/\1/' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/ --delete / /' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/ ports.conf(5)/ macports.conf(5)/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    mv -v "${HOME}/.macports/ports.conf" "${HOME}/.macports/macports.conf.mpsaved"
+    sed 's/etc\/ports/etc\/macports/g' "${HOME}/.macports/macports.conf.mpsaved" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/db\/dports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/darwinports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/dpupdate1\/base/release\/base/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed '/^rsync_options/s/"\(.*\)"/\1/' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/ --delete / /' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/ ports.conf(5)/ macports.conf(5)/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
 }
 
+
+[ ! -f /opt/local/etc/macports/mp_version ] || rm -vf /opt/local/etc/macports/mp_version
+
+
 [ -f ${UPGRADECHECK} ] || {
-    echo ""; echo "MacPorts installation successfully upgraded from the old DarwinPorts namespace!"; echo ""
-	echo "MacPorts rename update done!" > ${UPGRADECHECK} ;
+    echo -e "\nMacPorts installation successfully upgraded from the old DarwinPorts namespace!\n"
+    echo "MacPorts rename update done!" > ${UPGRADECHECK}
 }

Modified: branches/release_1_6/base/portmgr/fedora/macports.spec.in
===================================================================
--- branches/release_1_6/base/portmgr/fedora/macports.spec.in	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/fedora/macports.spec.in	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,6 +1,6 @@
 Summary: MacPorts allows installing software on Mac OS X (and other platforms)
 Name: macports
-Version: @VER@
+Version: @MACPORTS_VERSION@
 Release: 0%{?dist}
 License: BSD
 Group: System Environment/Base

Modified: branches/release_1_6/base/portmgr/freebsd/Makefile.in
===================================================================
--- branches/release_1_6/base/portmgr/freebsd/Makefile.in	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/freebsd/Makefile.in	2008-01-17 06:11:54 UTC (rev 33045)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	macports
-PORTVERSION=	@VER@
+PORTVERSION=	@MACPORTS_VERSION@
 CATEGORIES=	sysutils
 MASTER_SITES=	http://svn.macosforge.org/repository/macports/distfiles/MacPorts/
 DISTNAME=	MacPorts-${PORTVERSION}

Modified: branches/release_1_6/base/portmgr/freebsd/pkg-plist
===================================================================
--- branches/release_1_6/base/portmgr/freebsd/pkg-plist	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/freebsd/pkg-plist	2008-01-17 06:11:54 UTC (rev 33045)
@@ -2,7 +2,6 @@
 bin/portf
 bin/portindex
 bin/portmirror
-etc/macports/mp_version
 etc/macports/macports.conf
 etc/macports/sources.conf
 etc/macports/variants.conf

Modified: branches/release_1_6/base/portmgr/jobs/GuideRegen.sh
===================================================================
--- branches/release_1_6/base/portmgr/jobs/GuideRegen.sh	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/jobs/GuideRegen.sh	2008-01-17 06:11:54 UTC (rev 33045)
@@ -11,13 +11,9 @@
 # Configuration
 LOCKFILE=/tmp/.mp_svn_guide_regen.lock
 # ROOT directory, where everything is. This needs to exist!
-ROOT=/Users/mp-user/mp_svn_guide_regen
-# MP user.
-MP_USER=mp-user
-# MP group.
-MP_GROUP=mp-user
+ROOT=/tmp/mpdocs
 # e-mail address to spam in case of failure.
-SPAM_LOVERS=macports-dev at lists.macosforge.org,dluke at geeklair.net,markd at macports.org
+SPAM_LOVERS=macports-dev at lists.macosforge.org,markd at macports.org,wsiegrist at apple.com
 
 # Other settings (probably don't need to be changed).
 SVN_CONFIG_DIR=${ROOT}/svnconfig
@@ -25,33 +21,34 @@
 SVN="/opt/local/bin/svn -q --non-interactive --config-dir $SVN_CONFIG_DIR"
 # Where to checkout the source code. This needs to exist!
 SRCTREE=${ROOT}/source
-# Where MP will install its world. This gets created.
-PREFIX=/opt/local
-# Path.
-PATH=${PREFIX}/bin:/bin:/usr/bin:/usr/sbin:/opt/local/bin
 # Log for the e-mail in case of failure.
 FAILURE_LOG=${ROOT}/guide_failure.log
 # The date.
-DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
+DATE=$(/bin/date +'%A %Y-%m-%d at %H:%M:%S')
 
+# Where to find the binaries we need
+MAIL=/usr/bin/mail
+RM=/bin/rm
+TOUCH=/usr/bin/touch
+MAKE=/usr/bin/make
+MKDIR=/bin/mkdir
 
 # Function to spam people in charge if something goes wrong during guide regen.
 bail () {
-    mail -s "Guide Regen Failure on ${DATE}" $SPAM_LOVERS < $FAILURE_LOG
+    $MAIL -s "Guide Regen Failure on ${DATE}" $SPAM_LOVERS < $FAILURE_LOG
     cleanup; exit 1
 }
 
 # Cleanup fuction for runtime files.
 cleanup () {
-    rm -f $FAILURE_LOG $LOCKFILE
+    $RM -f $FAILURE_LOG $LOCKFILE
 }
 
 
 if [ ! -e $LOCKFILE ]; then
-    touch $LOCKFILE
+    $TOUCH $LOCKFILE
 else
-    echo "Guide Regen lockfile found, is another regen job running?"
-    exit 1
+    echo "Guide Regen lockfile found, is another regen job running?" > $FAILURE_LOG; bail
 fi
 
 # Checkout/update the doc tree
@@ -59,12 +56,13 @@
     $SVN update ${SRCTREE}/doc-new > $FAILURE_LOG 2>&1 \
         || { echo "Updating the doc tree from $REPO_BASE/trunk/doc-new failed." >> $FAILURE_LOG; bail ; }
 else
+    $MKDIR -p ${SRCTREE}/doc-new
     $SVN checkout ${REPO_BASE}/trunk/doc-new ${SRCTREE}/doc-new > $FAILURE_LOG 2>&1 \
         || { echo "Checking out the doc tree from $REPO_BASE/trunk/doc-new failed." >> $FAILURE_LOG; bail ; }
 fi
 
 # (re)build
-{ cd ${SRCTREE}/doc-new && make guide > $FAILURE_LOG 2>&1 ; } \
+{ cd ${SRCTREE}/doc-new && $MAKE guide > $FAILURE_LOG 2>&1 ; } \
     || { echo "make failed." >> $FAILURE_LOG ; bail ; }
 
 # At this point the guide was regen'd successfuly, so we cleanup before we exit.

Modified: branches/release_1_6/base/portmgr/jobs/PortIndexRegen.sh
===================================================================
--- branches/release_1_6/base/portmgr/jobs/PortIndexRegen.sh	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/portmgr/jobs/PortIndexRegen.sh	2008-01-17 06:11:54 UTC (rev 33045)
@@ -57,8 +57,7 @@
 if [ ! -e $LOCKFILE ]; then
     touch $LOCKFILE
 else
-    echo "PortIndex Regen lockfile found, is another regen job running?"
-    exit 1
+    echo "PortIndex Regen lockfile found, is another regen job running?" > $FAILURE_LOG; bail
 fi
 
 # Checkout/update the ports tree

Added: branches/release_1_6/base/portmgr/jobs/README
===================================================================
--- branches/release_1_6/base/portmgr/jobs/README	                        (rev 0)
+++ branches/release_1_6/base/portmgr/jobs/README	2008-01-17 06:11:54 UTC (rev 33045)
@@ -0,0 +1,24 @@
+
+This file explains the automated jobs that live in this directory and keep MacPorts running at the server level,
+appart from the basic mail, mailman, www, trac & svn services:
+
+ 1) mprsyncup:
+    Runs on Mac OS Forge servers every 30 minutes, on the hour and on the half hour, off launchd through the org.macports.mprsyncup.plist provided.
+    Repopulates the rsync modules that feed the "sync" and "selfupdate" operations for both the ports tree and MacPorts sources, freshly off the svn
+    sources.
+
+ 2) PortIndexRegen:
+    Still running on Daniel's box, twice a day every 12 hours off cron. Scheduled for a rewrite in Tcl to employ the macports1.0 API and thus simplify
+    some of its tasks. Once that's done it'll be moved to Mac OS Forge servers. This job regenerates the ports' index employed by operations like "port search".
+
+ 3) PortIndex2MySQL:
+    Running Mac OS Forge servers twice a day every 12 hours off launchd through the org.macports.PortIndex2MySQL.plist provided, 15 minutes after the
+    PortIndexRegen job. This jobs repopulates the database that feeds the www.macports.org/ports.php page off the regenerated PortIndex.
+
+ 4) GuideRegen:
+    Running on Mac OS Forge servers as an svn post-commit hook after commits to the /trunk/doc-new dir take place. Regenerates the project guide found at
+    http://guide.macports.org
+
+ 5) Website:
+    There's actually no script for this one, as the job itself is really simple: a post-commit svn hook attached to the /trunk/www dir
+    updates the copy of our website on the Mac OS Forge web server whenever a commit to that directory occurs.


Property changes on: branches/release_1_6/base/portmgr/jobs/README
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: branches/release_1_6/base/portmgr/jobs/org.macports.GuideRegen.plist
===================================================================

Deleted: branches/release_1_6/base/pthread.m4
===================================================================
--- branches/release_1_6/base/pthread.m4	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/pthread.m4	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,238 +0,0 @@
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl Modified from the original version:
-dnl * Removed pthread-specific CC support
-dnl * Added FreeBSD specific -pthread/-lpthread flags
-dnl Notes:
-dnl * -D_THREAD_SAFE may not be necessary on FreeBSD
-dnl   and elsewhere.
-dnl - landonf March 25th, 2005
-dnl
-dnl This macro figures out how to build C programs using POSIX threads.
-dnl It sets the PTHREAD_LIBS output variable to the threads library and
-dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
-dnl C compiler flags that are needed. (The user can also force certain
-dnl compiler flags/libs to be tested by setting these environment
-dnl variables.)
-dnl
-dnl NOTE: You are assumed to not only compile your program with these
-dnl flags, but also link it with them as well. e.g. you should link
-dnl with $CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-dnl $LIBS
-dnl
-dnl If you are only building threads programs, you may wish to use
-dnl these variables in your default LIBS, and CFLAGS:
-dnl
-dnl        LIBS="$PTHREAD_LIBS $LIBS"
-dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
-dnl default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform, or
-dnl if you have any other suggestions or comments. This macro was based
-dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
-dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
-dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
-dnl We are also grateful for the helpful feedback of numerous users.
-dnl
-dnl @category InstalledPackages
-dnl @author Steven G. Johnson <stevenj at alum.mit.edu>
-dnl @version 2005-01-14
-dnl @license GPLWithACException
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
-        *solaris*)
-
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
-
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-        ;;
-
-	*freebsd*)
-	# freebsd 4 uses -pthread, freebsd 5 uses -lpthread
-	acx_pthread_flags="pthread -pthread"
-	;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
-        case $flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $flag])
-                PTHREAD_CFLAGS="$flag"
-                ;;
-
-		pthread-config)
-		AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
-		if test x"$acx_pthread_config" = xno; then continue; fi
-		PTHREAD_CFLAGS="`pthread-config --cflags`"
-		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-		;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$flag])
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
-
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        AC_TRY_LINK([#include <pthread.h>],
-                    [pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
-                    [acx_pthread_ok=yes])
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-	AC_MSG_CHECKING([for joinable pthread attribute])
-	attr_name=unknown
-	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-	    AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
-                        [attr_name=$attr; break])
-	done
-        AC_MSG_RESULT($attr_name)
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
-                               [Define to necessary symbol if this constant
-                                uses a non-standard name on your system.])
-        fi
-
-        AC_MSG_CHECKING([if more special flags are required for pthreads])
-        flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        AC_MSG_RESULT(${flag})
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-        :
-else
-        acx_pthread_ok=no
-        $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD

Modified: branches/release_1_6/base/src/cregistry/Makefile
===================================================================
--- branches/release_1_6/base/src/cregistry/Makefile	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/cregistry/Makefile	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,9 +1,13 @@
 # $Id$
-OBJS=       registry.o entry.o sql.o
-STLIB_NAME=	cregistry.a
 
+OBJS = registry.o entry.o sql.o
+STLIB_NAME = cregistry.a
+RANLIB = ranlib
+
+
 include ../../Mk/macports.autoconf.mk
 
+
 all:: ${STLIB_NAME}
 
 .c.o:
@@ -11,6 +15,7 @@
 
 ${STLIB_NAME}:: ${OBJS}
 	${STLIB_LD} ${STLIB_NAME} ${OBJS}
+	${RANLIB} ${STLIB_NAME}
 
 clean::
 	rm -f ${STLIB_NAME} ${OBJS}

Modified: branches/release_1_6/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_1_6/base/src/macports1.0/macports.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/macports1.0/macports.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -100,9 +100,9 @@
 
 proc macports::ui_init {priority message} {
     # Get the list of channels.
-    if {[llength [info commands ui_channels]] > 0} {
+    try {
         set channels [ui_channels $priority]
-    } else {
+    } catch * {
         set channels [ui_channels_default $priority]
     }
 
@@ -111,9 +111,9 @@
     if {$nbchans == 0} {
         proc ::ui_$priority {str} {}
     } else {
-        if {[llength [info commands ui_prefix]] > 0} {
+        try {
             set prefix [ui_prefix $priority]
-        } else {
+        } catch * {
             set prefix [ui_prefix_default $priority]
         }
 
@@ -133,7 +133,7 @@
     }
 }
 
-# Defult implementation of ui_prefix
+# Default implementation of ui_prefix
 proc macports::ui_prefix_default {priority} {
     switch $priority {
         debug {
@@ -1542,7 +1542,7 @@
         archive     -
         pkg         -
         mpkg        -
-                rpm         -
+        rpm         -
         dpkg        -
         ""          { set deptypes "depends_lib depends_build depends_run" }
     }
@@ -1622,119 +1622,98 @@
 
 # selfupdate procedure
 proc macports::selfupdate {{optionslist {}}} {
-    global macports::prefix macports::portdbpath macports::rsync_server macports::rsync_dir macports::rsync_options
-    global macports::autoconf::macports_conf_path macports::autoconf::rsync_path
+    global macports::prefix macports::portdbpath macports::libpath macports::rsync_server macports::rsync_dir macports::rsync_options
+    global macports::autoconf::macports_version macports::autoconf::rsync_path
     array set options $optionslist
     
-    if { [info exists options(ports_force)] && $options(ports_force) == "yes" } {
-        set use_the_force_luke yes
-        ui_debug "Forcing a rebuild of the MacPorts base system."
-    } else {
-        set use_the_force_luke no
-        ui_debug "Rebuilding the MacPorts base system if needed."
-    }
-    # syncing ports tree. We expect the user have rsync:// in the sources.conf
+    # syncing ports tree.
     if {[catch {mportsync} result]} {
         return -code error "Couldn't sync the ports tree: $result"
     }
-
-    set mp_base_path [file join $portdbpath sources ${rsync_server} ${rsync_dir}/]
-    if {![file exists $mp_base_path]} {
-        file mkdir $mp_base_path
+    
+    # create the path to the to be downloaded sources if it doesn't exist
+    set mp_source_path [file join $portdbpath sources ${rsync_server} ${rsync_dir}/]
+    if {![file exists $mp_source_path]} {
+        file mkdir $mp_source_path
     }
-    ui_debug "MacPorts base dir: $mp_base_path"
+    ui_debug "MacPorts sources location: $mp_source_path"
+    
+    # sync the MacPorts sources
+    ui_debug "Updating MacPorts sources using rsync"
+    if { [catch { system "$rsync_path $rsync_options rsync://${rsync_server}/${rsync_dir} $mp_source_path" } result ] } {
+       return -code error "Error synchronizing MacPorts sources: $result"
+    }
 
-    # get user of the MacPorts system
-    set user [file attributes [file join $portdbpath sources/] -owner]
-    ui_debug "Setting user: $user"
+    # echo current MacPorts version
+    ui_msg "\nMacPorts base version $macports::autoconf::macports_version installed"
 
-    # get MacPorts version 
-    set mp_version_path [file join ${macports_conf_path} mp_version]
-    if { [file exists $mp_version_path]} {
-        set fd [open $mp_version_path r]
-        gets $fd mp_version_old
-        close $fd
+    if { [info exists options(ports_force)] && $options(ports_force) == "yes" } {
+        set use_the_force_luke yes
+        ui_debug "Forcing a rebuild and reinstallation of MacPorts"
     } else {
-        set mp_version_old 0
+        set use_the_force_luke no
+        ui_debug "Rebuilding and reinstalling MacPorts if needed"
+        # Choose what version file to use: old, floating point format or new, real version number format
+        set old_version_file [file join $mp_source_path config mp_version]
+        set new_version_file [file join $mp_source_path config macports_version]
+        if {[file exists $old_version_file]} {
+            set fd [open $old_version_file r]
+        } elseif {[file exists $new_version_file]} {
+            set fd [open $new_version_file r]
+        }
+        # get downloaded MacPorts version
+        gets $fd macports_version_new
+        close $fd
+        # echo downloaded MacPorts version
+        ui_msg "Downloaded MacPorts base version $macports_version_new"
     }
-    ui_msg "\nMacPorts base version $mp_version_old installed"
 
-    ui_debug "Updating using rsync"
-    if { [catch { system "$rsync_path $rsync_options rsync://${rsync_server}/${rsync_dir} $mp_base_path" } ] } {
-        return -code error "Error: rsync failed in selfupdate"
-    }
-
-    # get downloaded macports version and write the old version back
-    set fd [open [file join $mp_base_path config mp_version] r]
-    gets $fd mp_version_new
-    close $fd
-    ui_msg "\nDownloaded MacPorts base version $mp_version_new"
-
     # check if we we need to rebuild base
-    if {$mp_version_new > $mp_version_old || $use_the_force_luke == "yes"} {
-        ui_msg "Configuring, Building and Installing new MacPorts base"
-        # check if $prefix/bin/port is writable, if so we go !
-        # get installation user / group 
-        set owner root
-        set group admin
-        set portprog [file join $prefix bin port]
-        if {[file exists $portprog ]} {
-            # set owner
-            set owner [file attributes $portprog -owner]
-            # set group
-            set group [file attributes $portprog -group]
+    if {$use_the_force_luke == "yes" || [rpm-vercomp $macports_version_new $macports::autoconf::macports_version] > 0} {
+        # get installation user/group and permissions
+        set owner [file attributes ${prefix} -owner]
+        set group [file attributes ${prefix} -group]
+        set perms [string range [file attributes ${prefix} -permissions] end-3 end]
+        set installing_user [exec /usr/bin/id -un]
+        if {![string equal $installing_user $owner]} {
+            return -code error "User $installing_user does not own ${prefix} - try using sudo"
         }
-        set p_user [exec /usr/bin/whoami]
-        if {[file writable $portprog] || [string equal $p_user $owner] } {
-            ui_debug "permissions OK"
-        } else {
-            return -code error "Error: $p_user cannot write to ${prefix}/bin - try using sudo"
-        }
-        ui_debug "Setting owner: $owner group: $group"
+        ui_debug "Permissions OK"
 
+        # where to install our macports1.0 tcl package
         set mp_tclpackage_path [file join $portdbpath .tclpackage]
         if { [file exists $mp_tclpackage_path]} {
             set fd [open $mp_tclpackage_path r]
             gets $fd tclpackage
             close $fd
         } else {
-            set tclpackage [file join ${prefix} share macports Tcl]
+            set tclpackage $libpath
         }
-        # do the actual installation of new base
-        ui_debug "Install in: $prefix as $owner : $group - TCL-PACKAGE in $tclpackage"
-        if { [catch { system "cd $mp_base_path && ./configure --prefix=$prefix --with-install-user=$owner --with-install-group=$group --with-tclpackage=$tclpackage && make && make install" } result] } {
+        
+        # do the actual configure, build and installation of new base
+        ui_msg "\nInstalling new MacPorts release in $prefix as $owner:$group - TCL-PACKAGE in $tclpackage; Permissions: $perms\n"
+        if { [catch { system "cd $mp_source_path && ./configure --prefix=$prefix --with-tclpackage=$tclpackage --with-install-user=$owner --with-install-group=$group --with-directory-mode=$perms && make && make install" } result] } {
             return -code error "Error installing new MacPorts base: $result"
         }
     } else {
-        ui_msg "\nThe MacPorts installation is not outdated and so was not updated"
+        ui_msg "\nThe MacPorts installation is not outdated so it was not updated"
     }
 
-    # set the macports system to the right owner 
-    ui_debug "Setting ownership to $user"
-    if { [catch { exec chown -R $user [file join $portdbpath sources/] } result] } {
-        return -code error "Couldn't change permissions: $result"
+    # set the MacPorts sources to the right owner
+    set sources_owner [file attributes [file join $portdbpath sources/] -owner]
+    ui_debug "Setting MacPorts sources ownership to $sources_owner"
+    if { [catch { exec chown -R $sources_owner [file join $portdbpath sources/] } result] } {
+        return -code error "Couldn't change permissions of the MacPorts sources at $mp_source_path to $sources_owner: $result"
     }
 
-    # set the right version
     ui_msg "selfupdate done!"
 
     return 0
 }
 
 proc macports::version {} {
-    global macports::rsync_server macports::rsync_dir
-    global macports::autoconf::macports_conf_path
-    
-    set mp_version_path [file join ${macports_conf_path} mp_version]
-
-    if [file exists $mp_version_path] {
-        set fd [open $mp_version_path r]
-        gets $fd retval
-        close $fd
-        return $retval
-    } else {
-        return -1
-    }
+    global macports::autoconf::macports_version
+    return $macports::autoconf::macports_version
 }
 
 # upgrade procedure

Modified: branches/release_1_6/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- branches/release_1_6/base/src/macports1.0/macports_autoconf.tcl.in	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/macports1.0/macports_autoconf.tcl.in	2008-01-17 06:11:54 UTC (rev 33045)
@@ -33,6 +33,7 @@
 
 namespace eval macports::autoconf {
     variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
+    variable macports_version "@MP_VERSION@"
     variable macports_user_dir "~/.macports"
     variable svn_path "@SVN@"
     variable rsync_path "@RSYNC@"

Modified: branches/release_1_6/base/src/package1.0/portpkg.tcl
===================================================================
--- branches/release_1_6/base/src/package1.0/portpkg.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/package1.0/portpkg.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,4 +1,4 @@
-# et:ts=4
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
 # portpkg.tcl
 # $Id$
 #
@@ -37,9 +37,9 @@
 target_runtype ${org.macports.pkg} always
 target_provides ${org.macports.pkg} pkg
 if {[option portarchivemode] == "yes"} {
-	target_requires ${org.macports.pkg} unarchive destroot
+    target_requires ${org.macports.pkg} unarchive destroot
 } else {
-	target_requires ${org.macports.pkg} destroot
+    target_requires ${org.macports.pkg} destroot
 }
 
 # define options
@@ -66,13 +66,13 @@
     set pkgpath ${package.destpath}/${portname}-${portversion}.pkg
 
     if {[file readable $pkgpath] && ([file mtime ${pkgpath}] >= [file mtime ${portpath}/Portfile])} {
-       	ui_msg "$UI_PREFIX [format [msgcat::mc "Package for %s-%s is up-to-date"] ${portname} ${portversion}]"
+        ui_msg "$UI_PREFIX [format [msgcat::mc "Package for %s-%s is up-to-date"] ${portname} ${portversion}]"
         return 0
     }
 
     set packagemaker "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
     if ([file exists "$packagemaker"]) {
-         set resourcepath ${workpath}/pkg_resources
+        set resourcepath ${workpath}/pkg_resources
     } else {
         set resourcepath "${pkgpath}/Contents/Resources"
     }
@@ -82,82 +82,82 @@
 	
     # long_description, description, or homepage may not exist
     foreach variable {long_description description homepage} {
-	if {![info exists $variable]} {
-	    set pkg_$variable ""
-	} else {
-	    set pkg_$variable [set $variable]
-	}
+        if {![info exists $variable]} {
+            set pkg_$variable ""
+        } else {
+            set pkg_$variable [set $variable]
+        }
     }
     write_welcome_html ${resourcepath}/${language}.lproj/Welcome.html $portname $portversion $pkg_long_description $pkg_description $pkg_homepage
     file copy -force -- ${portresourcepath}/package/background.tiff ${resourcepath}/${language}.lproj/background.tiff
 
     foreach dir {etc var tmp} {
-	if ([file exists "${destpath}/$dir"]) {
-	    # certain toplevel directories really are symlinks. leaving them as directories make pax lose the symlinks. that's bad.
-	    system "mkdir -p ${destpath}/private/$dir; mv ${destpath}/$dir/* ${destpath}/private/$dir; rm -r \"${destpath}/$dir\""
-	}
+        if ([file exists "${destpath}/$dir"]) {
+            # certain toplevel directories really are symlinks. leaving them as directories make pax lose the symlinks. that's bad.
+            system "mkdir -p ${destpath}/private/$dir; mv ${destpath}/$dir/* ${destpath}/private/$dir; rm -r \"${destpath}/$dir\""
+        }
     }
 
     if ([file exists "$packagemaker"]) {
 
-    ui_debug "Calling $packagemaker for $portname pkg"
-    if {${os.major} >= 9} {
-        if {${package.flat}} {
-            set pkgtarget "10.5"
-            set pkgresources ""
-            set infofile "${workpath}/PackageInfo"
-            write_package_info ${workpath}/PackageInfo $portname $portversion $portrevision
+        ui_debug "Calling $packagemaker for $portname pkg"
+        if {${os.major} >= 9} {
+            if {${package.flat}} {
+                set pkgtarget "10.5"
+                set pkgresources ""
+                set infofile "${workpath}/PackageInfo"
+                write_package_info ${workpath}/PackageInfo $portname $portversion $portrevision
+            } else {
+                set pkgtarget "10.3"
+                set pkgresources " --resources ${resourcepath} --title \"$portname-$portversion\""
+                set infofile "${workpath}/Info.plist"
+                write_info_plist ${workpath}/Info.plist $portname $portversion $portrevision
+            }
+            system "PMResourceLocale=${language} $packagemaker -AppleLanguages \"(${language})\" --root ${destpath} --out ${pkgpath} ${pkgresources} --info $infofile --target $pkgtarget --domain system --id org.macports.$portname"
         } else {
-            set pkgtarget "10.3"
-            set pkgresources " --resources ${resourcepath} --title \"$portname-$portversion\""
-            set infofile "${workpath}/Info.plist"
             write_info_plist ${workpath}/Info.plist $portname $portversion $portrevision
+            write_description_plist ${workpath}/Description.plist $portname $portversion $description
+            system "$packagemaker -build -f ${destpath} -p ${pkgpath} -r ${resourcepath} -i ${workpath}/Info.plist -d ${workpath}/Description.plist"
         }
-        system "PMResourceLocale=${language} $packagemaker -AppleLanguages \"(${language})\" --root ${destpath} --out ${pkgpath} ${pkgresources} --info $infofile --target $pkgtarget --domain system --id org.macports.$portname"
-    } else {
-        write_info_plist ${workpath}/Info.plist $portname $portversion $portrevision
-        write_description_plist ${workpath}/Description.plist $portname $portversion $description
-        system "$packagemaker -build -f ${destpath} -p ${pkgpath} -r ${resourcepath} -i ${workpath}/Info.plist -d ${workpath}/Description.plist"
-    }
 
-    file delete ${workpath}/Info.plist
-    file delete ${workpath}/PackageInfo
-    file delete ${workpath}/Description.plist
-    file delete -force ${workpath}/pkg_resources
+        file delete ${workpath}/Info.plist
+        file delete ${workpath}/PackageInfo
+        file delete ${workpath}/Description.plist
+        file delete -force ${workpath}/pkg_resources
 
     } else {
 
-    write_PkgInfo ${pkgpath}/Contents/PkgInfo
-    write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $portrevision
+        write_PkgInfo ${pkgpath}/Contents/PkgInfo
+        write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $portrevision
 
-    system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom"
-    system "cd ${destpath} && pax -x cpio -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
+        system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom"
+        system "cd ${destpath} && pax -x cpio -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
 
-    write_description_plist ${resourcepath}/Description.plist $portname $portversion $description
-    write_sizes_file ${resourcepath}/Archive.sizes ${portname} ${portversion} ${pkgpath} ${destpath}
+        write_description_plist ${resourcepath}/Description.plist $portname $portversion $description
+        write_sizes_file ${resourcepath}/Archive.sizes ${portname} ${portversion} ${pkgpath} ${destpath}
 
     }
 
     foreach dir {etc var tmp} {
-	if ([file exists "${destpath}/private/$dir"]) {
-	    # restore any directories that were moved, to avoid confusing the rest of the ports system.
-	    system "mv ${destpath}/private/$dir ${destpath}/$dir; rmdir ${destpath}/private 2>/dev/null"
-	}
+        if ([file exists "${destpath}/private/$dir"]) {
+            # restore any directories that were moved, to avoid confusing the rest of the ports system.
+            system "mv ${destpath}/private/$dir ${destpath}/$dir; rmdir ${destpath}/private 2>/dev/null"
+        }
     }
 
     return 0
 }
 
 proc write_PkgInfo {infofile} {
-	set infofd [open ${infofile} w+]
-	puts $infofd "pmkrpkg1"
-	close $infofd
+    set infofd [open ${infofile} w+]
+    puts $infofd "pmkrpkg1"
+    close $infofd
 }
 
 # XXX: deprecated
 proc write_info_file {infofile portname portversion description} {
-	set infofd [open ${infofile} w+]
-	puts $infofd "Title ${portname}
+    set infofd [open ${infofile} w+]
+    puts $infofd "Title ${portname}
 Version ${portversion}
 Description ${description}
 DefaultLocation /
@@ -173,101 +173,101 @@
 OverwritePermissions NO
 InstallFat NO
 RootVolumeOnly NO"
-	close $infofd
+    close $infofd
 }
 
 proc xml_escape {s} {
-	regsub -all {&} $s {\&amp;} s
-	regsub -all {<} $s {\&lt;} s
-	regsub -all {>} $s {\&gt;} s
-	return $s
+    regsub -all {&} $s {\&amp;} s
+    regsub -all {<} $s {\&lt;} s
+    regsub -all {>} $s {\&gt;} s
+    return $s
 }
 
 proc write_info_plist {infofile portname portversion portrevision} {
-	set portname [xml_escape $portname]
-	set portversion [xml_escape $portversion]
-	set portrevision [xml_escape $portrevision]
+    set portname [xml_escape $portname]
+    set portversion [xml_escape $portversion]
+    set portrevision [xml_escape $portrevision]
 
-	set infofd [open ${infofile} w+]
-	puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
+    set infofd [open ${infofile} w+]
+    puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
-}
-	puts $infofd "<dict>
-	<key>CFBundleGetInfoString</key>
-	<string>${portname} ${portversion}</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.macports.${portname}</string>
-	<key>CFBundleName</key>
-	<string>${portname}</string>
-	<key>CFBundleShortVersionString</key>
-	<string>${portversion}</string>
-	<key>IFMajorVersion</key>
-	<integer>${portrevision}</integer>
-	<key>IFMinorVersion</key>
-	<integer>0</integer>
-	<key>IFPkgFlagAllowBackRev</key>
-	<true/>
-	<key>IFPkgFlagAuthorizationAction</key>
-	<string>RootAuthorization</string>
-	<key>IFPkgFlagDefaultLocation</key>
-	<string>/</string>
-	<key>IFPkgFlagInstallFat</key>
-	<false/>
-	<key>IFPkgFlagIsRequired</key>
-	<false/>
-	<key>IFPkgFlagRelocatable</key>
-	<false/>
-	<key>IFPkgFlagRestartAction</key>
-	<string>NoRestart</string>
-	<key>IFPkgFlagRootVolumeOnly</key>
-	<false/>
-	<key>IFPkgFlagUpdateInstalledLanguages</key>
-	<false/>
-	<key>IFPkgFormatVersion</key>
-	<real>0.10000000149011612</real>
+    }
+    puts $infofd "<dict>
+    <key>CFBundleGetInfoString</key>
+    <string>${portname} ${portversion}</string>
+    <key>CFBundleIdentifier</key>
+    <string>org.macports.${portname}</string>
+    <key>CFBundleName</key>
+    <string>${portname}</string>
+    <key>CFBundleShortVersionString</key>
+    <string>${portversion}</string>
+    <key>IFMajorVersion</key>
+    <integer>${portrevision}</integer>
+    <key>IFMinorVersion</key>
+    <integer>0</integer>
+    <key>IFPkgFlagAllowBackRev</key>
+    <true/>
+    <key>IFPkgFlagAuthorizationAction</key>
+    <string>RootAuthorization</string>
+    <key>IFPkgFlagDefaultLocation</key>
+    <string>/</string>
+    <key>IFPkgFlagInstallFat</key>
+    <false/>
+    <key>IFPkgFlagIsRequired</key>
+    <false/>
+    <key>IFPkgFlagRelocatable</key>
+    <false/>
+    <key>IFPkgFlagRestartAction</key>
+    <string>NoRestart</string>
+    <key>IFPkgFlagRootVolumeOnly</key>
+    <false/>
+    <key>IFPkgFlagUpdateInstalledLanguages</key>
+    <false/>
+    <key>IFPkgFormatVersion</key>
+    <real>0.10000000149011612</real>
 </dict>
 </plist>"
-	close $infofd
+    close $infofd
 }
 
 proc write_description_plist {infofile portname portversion description} {
-	set portname [xml_escape $portname]
-	set portversion [xml_escape $portversion]
-	set description [xml_escape $description]
-	
-	set infofd [open ${infofile} w+]
-	puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
+    set portname [xml_escape $portname]
+    set portversion [xml_escape $portversion]
+    set description [xml_escape $description]
+
+    set infofd [open ${infofile} w+]
+    puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
-}
-	puts $infofd "<dict>
-	<key>IFPkgDescriptionDeleteWarning</key>
-	<string></string>
-	<key>IFPkgDescriptionDescription</key>
-	<string>${description}</string>
-	<key>IFPkgDescriptionTitle</key>
-	<string>${portname}</string>
-	<key>IFPkgDescriptionVersion</key>
-	<string>${portversion}</string>
+    }
+    puts $infofd "<dict>
+    <key>IFPkgDescriptionDeleteWarning</key>
+    <string></string>
+    <key>IFPkgDescriptionDescription</key>
+    <string>${description}</string>
+    <key>IFPkgDescriptionTitle</key>
+    <string>${portname}</string>
+    <key>IFPkgDescriptionVersion</key>
+    <string>${portversion}</string>
 </dict>
 </plist>"
-	close $infofd
+    close $infofd
 }
 
 proc write_welcome_html {filename portname portversion long_description description homepage} {
     set fd [open ${filename} w+]
     if {$long_description == ""} {
-	set long_description $description
+        set long_description $description
     }
 
-	set portname [xml_escape $portname]
-	set portversion [xml_escape $portversion]
-	set long_description [xml_escape $long_description]
-	set description [xml_escape $description]
-	set homepage [xml_escape $homepage]
+    set portname [xml_escape $portname]
+    set portversion [xml_escape $portversion]
+    set long_description [xml_escape $long_description]
+    set description [xml_escape $description]
+    set homepage [xml_escape $homepage]
 	
-puts $fd "
+    puts $fd "
 <html lang=\"en\">
 <head>
 	<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">
@@ -280,7 +280,7 @@
 <p>"
 
     if {$homepage != ""} {
-	puts $fd "<font face=\"Helvetica\"><a href=\"${homepage}\">${homepage}</a></font><p>"
+        puts $fd "<font face=\"Helvetica\"><a href=\"${homepage}\">${homepage}</a></font><p>"
     }
 
     puts $fd "<font face=\"Helvetica\">This installer guides you through the steps necessary to install ${portname} ${portversion} for Mac OS X. To get started, click Continue.</font>
@@ -293,19 +293,19 @@
 proc write_sizes_file {sizesfile portname portversion pkgpath destpath} {
     
     if {[catch {set numFiles [exec lsbom -s ${pkgpath}/Contents/Archive.bom | wc -l]} result]} {
-	return -code error [format [msgcat::mc "Reading package bom failed: %s"] $result]
+        return -code error [format [msgcat::mc "Reading package bom failed: %s"] $result]
     }
     if {[catch {set compressedSize [expr [dirSize ${pkgpath}] / 1024]} result]} {
-	return -code error [format [msgcat::mc "Error determining compressed size: %s"] $result]
+        return -code error [format [msgcat::mc "Error determining compressed size: %s"] $result]
     }
     if {[catch {set installedSize [expr [dirSize ${destpath}] / 1024]} result]} {
-	return -code error [format [msgcat::mc "Error determining installed size: %s"] $result]
+        return -code error [format [msgcat::mc "Error determining installed size: %s"] $result]
     }
     if {[catch {set infoSize [file size ${pkgpath}/Contents/Info.plist]} result]} {
        return -code error [format [msgcat::mc "Error determining plist file size: %s"] $result]
     }
     if {[catch {set bomSize [file size ${pkgpath}/Contents/Archive.bom]} result]} {
-	return -code error [format [msgcat::mc "Error determining bom file size: %s"] $result]
+        return -code error [format [msgcat::mc "Error determining bom file size: %s"] $result]
     }
     incr installedSize $infoSize
     incr installedSize $bomSize
@@ -318,13 +318,13 @@
 }
 
 proc write_package_info {infofile portname portversion portrevision} {
-	set portname [xml_escape $portname]
-	set portversion [xml_escape $portversion]
-	set portrevision [xml_escape $portrevision]
+    set portname [xml_escape $portname]
+    set portversion [xml_escape $portversion]
+    set portrevision [xml_escape $portrevision]
 
-	set infofd [open ${infofile} w+]
-	puts $infofd "
+    set infofd [open ${infofile} w+]
+    puts $infofd "
 <pkg-info install-location=\"/\" relocatable=\"false\" auth=\"root\">
 </pkg-info>"
-	close $infofd
+    close $infofd
 }

Modified: branches/release_1_6/base/src/pextlib1.0/curl.c
===================================================================
--- branches/release_1_6/base/src/pextlib1.0/curl.c	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/pextlib1.0/curl.c	2008-01-17 06:11:54 UTC (rev 33045)
@@ -150,7 +150,7 @@
 		const char* theUserPassString = NULL;
 		const char* effectiveURLVarName = NULL;
 		char* effectiveURL = NULL;
-		char* userAgent = "MacPorts libcurl/" LIBCURL_VERSION;
+		char* userAgent = PACKAGE_STRING " libcurl/" LIBCURL_VERSION;
 		int optioncrsr;
 		int lastoption;
 		const char* theURL;

Modified: branches/release_1_6/base/src/port/Makefile
===================================================================
--- branches/release_1_6/base/src/port/Makefile	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port/Makefile	2008-01-17 06:11:54 UTC (rev 33045)
@@ -29,7 +29,7 @@
 
 distclean: clean
 
-install: mkdirs
+install: port portindex portmirror mkdirs
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/bin
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 555 port portindex portmirror ${INSTALLDIR}/bin/
 	cd ${INSTALLDIR}/bin && $(LN_S) -f port portf

Modified: branches/release_1_6/base/src/port/port.tcl
===================================================================
--- branches/release_1_6/base/src/port/port.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port/port.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -209,7 +209,7 @@
     set ilist [registry::installed $portname $portversion]
     if { [llength $ilist] > 1 } {
         puts "The following versions of $portname are currently installed:"
-        foreach i $ilist { 
+        foreach i [portlist_sortint $ilist] { 
             set iname [lindex $i 0]
             set iversion [lindex $i 1]
             set irevision [lindex $i 2]
@@ -340,15 +340,43 @@
 proc portlist_compare { a b } {
     array set a_ $a
     array set b_ $b
-    return [string compare $a_(name) $b_(name)]
+    set namecmp [string compare $a_(name) $b_(name)]
+    if {$namecmp != 0} {
+        return $namecmp
+    }
+    set avr_ [split $a_(version) "_"]
+    set bvr_ [split $b_(version) "_"]
+    set vercmp [rpm-vercomp [lindex $avr_ 0] [lindex $bvr_ 0]]
+    if {$vercmp != 0} {
+        return $vercmp
+    }
+    set ar_ [lindex $avr_ 1]
+    set br_ [lindex $bvr_ 1]
+    if {$ar_ < $br_} {
+        return -1
+    } elseif {$ar_ > $br_} {
+        return 1
+    } else {
+        return 0
+    }
 }
 
-
+# Sort two ports in NVR (name at version_revision) order
 proc portlist_sort { list } {
     return [lsort -command portlist_compare $list]
 }
 
+proc portlist_compareint { a b } {
+    array set a_ [list "name" [lindex $a 0] "version" [lindex $a 1] "revision" [lindex $a 2]]
+    array set b_ [list "name" [lindex $b 0] "version" [lindex $b 1] "revision" [lindex $b 2]]
+    return [portlist_compare [array get a_] [array get b_]]
+}
 
+# Same as portlist_sort, but with numeric indexes
+proc portlist_sortint { list } {
+    return [lsort -command portlist_compareint $list]
+}
+
 proc regex_pat_sanitize { s } {
     set sanitized [regsub -all {[\\(){}+$.^]} $s {\\&}]
     return $sanitized
@@ -1126,6 +1154,7 @@
             categories      1
             depends_build   1
             depends_lib     1
+            depends_run     1
             maintainers     1
             platforms       1
             variants        1
@@ -1370,6 +1399,21 @@
 }
 
 
+proc action_platform { action portlist opts } {
+#   global os.platform os.major os.arch 
+    global tcl_platform
+    set os_platform [string tolower $tcl_platform(os)]
+    set os_version $tcl_platform(osVersion)
+    set os_arch $tcl_platform(machine)
+    if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
+    if {$os_arch == "i586" || $os_arch == "i686"} { set os_arch "i386" }
+    set os_major [lindex [split $tcl_platform(osVersion) .] 0]
+#   puts "Platform: ${os.platform} ${os.major} ${os.arch}"
+    puts "Platform: ${os_platform} ${os_major} ${os_arch}"
+    return 0
+}
+
+
 proc action_compact { action portlist opts } {
     set status 0
     require_portlist portlist
@@ -1475,7 +1519,7 @@
     }
     if { [llength $ilist] > 0 } {
         puts "The following ports are currently installed:"
-        foreach i $ilist {
+        foreach i [portlist_sortint $ilist] {
             set iname [lindex $i 0]
             set iversion [lindex $i 1]
             set irevision [lindex $i 2]
@@ -2123,6 +2167,7 @@
     upgrade     action_upgrade
     
     version     action_version
+    platform    action_platform
     compact     action_compact
     uncompact   action_uncompact
     

Modified: branches/release_1_6/base/src/port1.0/portchecksum.tcl
===================================================================
--- branches/release_1_6/base/src/port1.0/portchecksum.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port1.0/portchecksum.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -184,7 +184,7 @@
 # Target main procedure. Verifies the checksums of all distfiles.
 #
 proc checksum_main {args} {
-	global UI_PREFIX all_dist_files checksums_array portverbose checksum.skip
+	global UI_PREFIX all_dist_files checksum_types checksums_array portverbose checksum.skip
 
 	# If no files have been downloaded, there is nothing to checksum.
 	if {![info exists all_dist_files]} {
@@ -218,9 +218,9 @@
 			# check that there is at least one checksum for the distfile.
 			if {![info exists checksums_array($distfile)]} {
 				ui_error "[format [msgcat::mc "No checksum set for %s"] $distfile]"
-				ui_info "[format [msgcat::mc "Distfile checksum: %s md5 %s"] $distfile [calc_md5 $fullpath]]"
-				ui_info "[format [msgcat::mc "Distfile checksum: %s sha1 %s"] $distfile [calc_sha1 $fullpath]]"
-				ui_info "[format [msgcat::mc "Distfile checksum: %s rmd160 %s"] $distfile [calc_rmd160 $fullpath]]"
+				foreach type $checksum_types {
+					ui_info "[format [msgcat::mc "Distfile checksum: %s $type %s"] $distfile [calc_$type $fullpath]]"
+				}
 				set fail yes
 			} else {
 				# retrieve the list of types/values from the array.
@@ -241,6 +241,7 @@
 					}
 				}
 			}
+			
 		}
 	} else {
 		# Something went wrong with the syntax.
@@ -248,6 +249,22 @@
 	}
 
 	if {[tbool fail]} {
+	
+		# Show the desired checksum line for easy cut-paste
+		set sums ""
+		foreach distfile $all_dist_files {
+			if {[llength $all_dist_files] > 1} {
+				lappend sums $distfile
+			}
+			
+			set fullpath [file join $distpath $distfile]
+			foreach type $checksum_types {
+				lappend sums [format "%-8s%s" $type [calc_$type $fullpath]]
+			}
+		}
+		ui_info "The correct checksum line may be:"
+		ui_info [format "%-20s%s" "checksums" [join $sums [format " \\\n%-20s" ""]]]
+		
 		return -code error "[msgcat::mc "Unable to verify file checksums"]"
 	}
 

Modified: branches/release_1_6/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/release_1_6/base/src/port1.0/portconfigure.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port1.0/portconfigure.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -56,7 +56,6 @@
 # We could have default debug/optimization flags at some point.
 # compiler flags section
 options configure.cflags configure.cppflags configure.cxxflags configure.objcflags configure.ldflags configure.libs configure.fflags configure.f90flags configure.fcflags configure.classpath
-default configure.pipe      {${configurepipe}}
 default configure.cflags    {-O2}
 default configure.cppflags  {"-I${prefix}/include"}
 default configure.cxxflags  {-O2}
@@ -93,9 +92,10 @@
 default configure.universal_ldflags     {"-arch i386 -arch ppc"}
 
 # Select a distinct compiler (C, C preprocessor, C++)
-options configure.ccache configure.distcc configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler
+options configure.ccache configure.distcc configure.pipe configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler
 default configure.ccache        {${configureccache}}
 default configure.distcc        {${configuredistcc}}
+default configure.pipe          {${configurepipe}}
 default configure.cc            {}
 default configure.cxx           {}
 default configure.cpp           {}

Modified: branches/release_1_6/base/src/port1.0/portlint.tcl
===================================================================
--- branches/release_1_6/base/src/port1.0/portlint.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port1.0/portlint.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -205,7 +205,7 @@
             incr warnings
         }
 
-        if {($lineno == $topline_number) && [string match "*-\*- Mode:*" $line]} {
+        if {($lineno == $topline_number) && [string match "*-\*- *" $line]} {
             ui_info "OK: Line $lineno has emacs/vim Mode"
             incr topline_number
         }

Modified: branches/release_1_6/base/src/port1.0/portutil.tcl
===================================================================
--- branches/release_1_6/base/src/port1.0/portutil.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port1.0/portutil.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -524,7 +524,7 @@
     # Set the variant if this platform matches the platform we're on
     set matches 1
     if {[info exists os.platform] && ${os.platform} == $os} { 
-    set sel_platform $os
+        set sel_platform $os
         if {[info exists os.major] && [info exists release]} {
             if {${os.major} == $release } { 
                 set sel_platform ${sel_platform}_${release} 

Modified: branches/release_1_6/base/src/port1.0/resources/fetch/mirror_sites.tcl
===================================================================
--- branches/release_1_6/base/src/port1.0/resources/fetch/mirror_sites.tcl	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/port1.0/resources/fetch/mirror_sites.tcl	2008-01-17 06:11:54 UTC (rev 33045)
@@ -20,6 +20,7 @@
 
 set portfetch::mirror_sites::sites(apache) {
     http://www.apache.org/dist/
+    http://archive.apache.org/dist/
     http://apache.planetmirror.com.au/dist/
     ftp://ftp.planetmirror.com/pub/apache/dist/
     ftp://ftp.is.co.za/Apache/dist/

Modified: branches/release_1_6/base/src/registry2.0/Makefile
===================================================================
--- branches/release_1_6/base/src/registry2.0/Makefile	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/src/registry2.0/Makefile	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,8 +1,10 @@
 # $Id$
-SRCS=		registry_util.tcl portimage.tcl portuninstall.tcl
-OBJS=       registry.o util.o \
-			entry.o entryobj.o
-			#graph.o graphobj.o
+
+SRCS = registry_util.tcl portimage.tcl portuninstall.tcl
+OBJS = registry.o util.o \
+	entry.o entryobj.o
+	#graph.o graphobj.o
+
 SHLIB_NAME= registry${SHLIB_SUFFIX}
 INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/registry2.0
 export MACOSX_DEPLOYMENT_TARGET=10.3

Deleted: branches/release_1_6/base/tcl.m4
===================================================================
--- branches/release_1_6/base/tcl.m4	2008-01-17 06:07:51 UTC (rev 33044)
+++ branches/release_1_6/base/tcl.m4	2008-01-17 06:11:54 UTC (rev 33045)
@@ -1,2573 +0,0 @@
-# This file is based on the tcl.m4 file distributed with Tcl 8.4
-# Portions Copyright (2003) Apple Computer, Inc.
-#
-# Copyright and License for this file, copied verbatim from the official
-# Tcl distribution, follows:
-#
-# This software is copyrighted by the Regents of the University of
-# California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
-# Corporation and other parties.  The following terms apply to all files
-# associated with the software unless explicitly disclaimed in
-# individual files.
-#
-# The authors hereby grant permission to use, copy, modify, distribute,
-# and license this software and its documentation for any purpose, provided
-# that existing copyright notices are retained in all copies and that this
-# notice is included verbatim in any distributions. No written agreement,
-# license, or royalty fee is required for any of the authorized uses.
-# Modifications to this software may be copyrighted by their authors
-# and need not follow the licensing terms described here, provided that
-# the new terms are clearly indicated on the first page of each file where
-# they apply.
-
-# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
-# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
-# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
-# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
-# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
-# MODIFICATIONS.
-#
-# GOVERNMENT USE: If you are acquiring this software on behalf of the
-# U.S. government, the Government shall have only "Restricted Rights"
-# in the software and related documentation as defined in the Federal
-# Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
-# are acquiring the software on behalf of the Department of Defense, the
-# software shall be classified as "Commercial Computer Software" and the
-# Government shall have only "Restricted Rights" as defined in Clause
-# 252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
-# authors grant the U.S. Government and others acting in its behalf
-# permission to use and distribute the software in accordance with the
-# terms specified in this license.
-# 
-#------------------------------------------------------------------------
-# SC_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_PATH_TCLCONFIG, [
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${libdir} 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			`ls -d /usr/pkg/lib 2>/dev/null` \
-			`ls -d /System/Library/Tcl/8.3 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.3 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.3 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_ERROR(Can't find Tcl configuration definitions)
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# SC_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${libdir} 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN(Can't find Tk configuration definitions)
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh)
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# SC_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# SC_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh])
-
-    if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
-    fi
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-    AC_SUBST(TK_LIB_FILE)
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE([STATIC_BUILD], [1], [Define to 1 if static build is requested])
-    fi
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_FRAMEWORK --
-#
-#	Allows the building of shared libraries into frameworks
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-framework=yes|no
-#
-#	Sets the following vars:
-#		FRAMEWORK_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_FRAMEWORK, [
-    AC_MSG_CHECKING([how to package libraries])
-    AC_ARG_ENABLE(framework,
-	[  --enable-framework      package shared libraries in frameworks [--disable-framework]],
-	[tcl_ok=$enableval], [tcl_ok=no])
-
-    if test "${enable_framework+set}" = set; then
-	enableval="$enable_framework"
-	tcl_ok=$enableval
-    else
-	tcl_ok=no
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([framework])
-	FRAMEWORK_BUILD=1
-	if test "${SHARED_BUILD}" = "0" ; then
-	    AC_MSG_WARN("Frameworks can only be built if --enable-shared is yes")
-	    FRAMEWORK_BUILD=0
-	fi
-    else
-	AC_MSG_RESULT([standard shared library])
-	FRAMEWORK_BUILD=0
-    fi
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#		_THREAD_SAFE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_THREADS, [
-    AC_MSG_CHECKING(for building with threads)
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=no])
-
-    if test "$tcl_ok" = "yes"; then
-	AC_MSG_RESULT(yes)
-	TCL_THREADS=1
-	AC_DEFINE(TCL_THREADS)
-	# USE_THREAD_ALLOC tells us to try the special thread-based
-	# allocator that significantly reduces lock contention
-	AC_DEFINE(USE_THREAD_ALLOC)
-	AC_DEFINE(_REENTRANT)
-	AC_DEFINE(_THREAD_SAFE)
-	AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	if test "$tcl_ok" = "no"; then
-	    # Check a little harder for __pthread_mutex_init in the same
-	    # library, as some systems hide it there until pthread.h is
-	    # defined.  We could alternatively do an AC_TRY_COMPILE with
-	    # pthread.h, but that will work with libpthread really doesn't
-	    # exist, like AIX 4.2.  [Bug: 4359]
-	    AC_CHECK_LIB(pthread,__pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	fi
-
-	if test "$tcl_ok" = "yes"; then
-	    # The space is needed
-	    THREADS_LIBS=" -lpthread"
-	else
-	    AC_CHECK_LIB(pthreads,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthreads"
-	    else
-		AC_CHECK_LIB(c,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    	if test "$tcl_ok" = "no"; then
-		    AC_CHECK_LIB(c_r,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-		    if test "$tcl_ok" = "yes"; then
-			# The space is needed
-			THREADS_LIBS=" -pthread"
-		    else
-			TCL_THREADS=0
-			AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
-		    fi
-	    	fi
-	    fi
-	fi
-
-	# Does the pthread-implementation provide
-	# 'pthread_attr_setstacksize' ?
-
-	ac_saved_libs=$LIBS
-	LIBS="$LIBS $THREADS_LIBS"
-	AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	LIBS=$ac_saved_libs
-	AC_CHECK_FUNCS(readdir_r)
-    else
-	TCL_THREADS=0
-	AC_MSG_RESULT([no (default)])
-    fi
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used.
-#	Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
-#	can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set in the Makefile:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to $(CFLAGS_DEBUG) if true
-#				Sets to $(CFLAGS_OPTIMIZE) if false
-#		LDFLAGS_DEFAULT	Sets to $(LDFLAGS_DEBUG) if true
-#				Sets to $(LDFLAGS_OPTIMIZE) if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_SYMBOLS, [
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=g
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_COMPILE_DEBUG)
-	AC_DEFINE(TCL_COMPILE_STATS)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem compile debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# SC_CONFIG_MANPAGES
-#	
-#	Decide whether to use symlinks for linking the manpages and
-#	whether to compress the manpages after installation.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-man-symlinks
-#		--enable-man-compression=PROG
-#
-#	Defines the following variable:
-#
-#	MKLINKS_FLAGS -		The apropriate flags for mkLinks
-#				according to the user's selection.
-#
-#--------------------------------------------------------------------
-AC_DEFUN(SC_CONFIG_MANPAGES, [
-
-	AC_MSG_CHECKING([whether to use symlinks for manpages])
-	AC_ARG_ENABLE(man-symlinks,
-		[  --enable-man-symlinks   use symlinks for the manpages],
-		test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --symlinks",
-		enableval="no")
-	AC_MSG_RESULT([$enableval])
-
-	AC_MSG_CHECKING([compression for manpages])
-	AC_ARG_ENABLE(man-compression,
-		[  --enable-man-compression=PROG
-                          compress the manpages with PROG],
-		test "$enableval" = "yes" && echo && AC_MSG_ERROR([missing argument to --enable-man-compression])
-		test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --compress $enableval",
-		enableval="no")
-	AC_MSG_RESULT([$enableval])
-
-	AC_SUBST(MKLINKS_FLAGS)
-])
-
-#--------------------------------------------------------------------
-# SC_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substitutes the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile. Could
-#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
-#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       MAKE_LIB -      Command to execute to build the a library;
-#                       differs when building shared or static.
-#       MAKE_STUB_LIB -
-#                       Command to execute to build a stub library.
-#       INSTALL_LIB -   Command to execute to install a library;
-#                       differs when building shared or static.
-#       INSTALL_STUB_LIB -
-#                       Command to execute to install a stub library.
-#       STLIB_LD -      Base command to use for combining object files
-#                       into a static library.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_FLAGS -Flags to pass when building a shared library. This
-#                       differes from the SHLIB_CFLAGS as it is not used
-#                       when building object files or executables.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-# TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
-#  TK_SHLIB_LD_EXTRAS   for the build of Tcl and Tk, but not recorded in the
-#                       tclConfig.sh, since they are only used for the build
-#                       of Tcl and Tk. 
-#                       Examples: MacOS X records the library version and
-#                       compatibility version in the shared library.  But
-#                       of course the Tcl version of this is only used for Tcl.
-#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
-#                       in a static or shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since a shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_CONFIG_CFLAGS, [
-
-    # Step 0.a: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is requested])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)],,enableval="no")
-
-    if test "$enableval" = "yes"; then
-	do64bit=yes
-    else
-	do64bit=no
-    fi
-    AC_MSG_RESULT($do64bit)
-
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support],,enableval="no")
-
-    if test "$enableval" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-	do64bitVIS=yes
-    else
-	do64bitVIS=no
-    fi
-    AC_MSG_RESULT($do64bitVIS)
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    AC_MSG_RESULT($system)
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Require ranlib early so we can override it in special cases below.
-
-    AC_REQUIRE([AC_PROG_RANLIB])
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar)
-    AC_CHECK_PROG(AR, ar, ar)
-    if test "${AR}" = "" ; then
-	AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
-    fi
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    PLAT_OBJS=""
-    case $system in
-	AIX-5.*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT(Using $CC for compiling with threads)
-	    fi
-	    LIBS="$LIBS -lc"
-	    # AIX-5 uses ELF style dynamic libraries
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    LD_LIBRARY_PATH_VAR="LIBPATH"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LD_FLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT(Using $CC for compiling with threads)
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    LD_LIBRARY_PATH_VAR="LIBPATH"
-	    TCL_NEEDS_EXP_FILE=1
-	    TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LD_FLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE)          # Use the XOPEN network library
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED) # Use the XOPEN network library
-	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`gcc -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="gcc -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    CC_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    CC_SEARCH_FLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    # XIM peeking works under XFree86.
-	    AC_DEFINE(PEEK_XCLOSEIM)
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		CC_SEARCH_FLAGS=""
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    CC_SEARCH_FLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING(for ELF)
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT(yes)
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT(no)
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version \${VERSION} -install_name \${DYLIB_INSTALL_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version \${VERSION} -install_name \${DYLIB_INSTALL_DIR}/\${TK_LIB_FILE} -prebind -seg1addr 0xb000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    PLAT_OBJS="tclMacOSXBundle.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-Os"
-	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-	    # for compatibility with autoconf vers 2.13 :
-	    HACK=""
-	    EXTRA_CFLAGS="-DMA${HACK}C_OSX_TCL -DHAVE_CFBUNDLE -DUSE_VFORK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\""
-	    LIBS="$LIBS -framework CoreFoundation"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING(for ld accepts -Bexport flag)
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT($found)
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    CC_SEARCH_FLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING(sys/exec.h)
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT($tcl_ok)
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING(a.out.h)
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT($tcl_ok)
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING(sys/exec_aout.h)
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT($tcl_ok)
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	CC_SEARCH_FLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
-        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-        MAKE_LIB='${SHLIB_LD} -o [$]@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
-        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
-    else
-        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
-
-        if test "$RANLIB" = "" ; then
-            MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
-        else
-            MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
-        fi
-
-dnl        Not at all clear what this was doing in Tcl's configure.in
-dnl        or why it was needed was needed. In any event, this sort of
-dnl        things needs to be done in the big loop above.
-dnl        REMOVE THIS BLOCK LATER! (mdejong)
-dnl        case $system in
-dnl            BSD/OS*)
-dnl                ;;
-dnl            AIX-[[1-4]].*)
-dnl                ;;
-dnl            *)
-dnl                SHLIB_LD_LIBS=""
-dnl                ;;
-dnl        esac
-    fi
-
-
-    # Stub lib does not depend on shared/static configuration
-    if test "$RANLIB" = "" ; then
-        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
-        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
-    else
-        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
-        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
-    fi
-
-
-    AC_SUBST(DL_LIBS)
-
-    AC_SUBST(DL_OBJS)
-    AC_SUBST(PLAT_OBJS)
-    AC_SUBST(CFLAGS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    AC_SUBST(LDFLAGS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-    AC_SUBST(CC_SEARCH_FLAGS)
-    AC_SUBST(LD_SEARCH_FLAGS)
-
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(TCL_SHLIB_LD_EXTRAS)
-    AC_SUBST(TK_SHLIB_LD_EXTRAS)
-    AC_SUBST(SHLIB_LD_FLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_SUFFIX)
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-    AC_SUBST(INSTALL_LIB)
-    AC_SUBST(INSTALL_STUB_LIB)
-    AC_SUBST(RANLIB)
-])
-
-#--------------------------------------------------------------------
-# SC_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT($tcl_cv_api_serial)
-])
-
-#--------------------------------------------------------------------
-# SC_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING(dirent.h)
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT($tcl_ok)
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# SC_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the the following vars:
-#		XINCLUDES
-#		XLIBSW
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_PATH_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING(for X11 header files)
-	found_xincludes="no"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
-	if test "$found_xincludes" = "no"; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT($i)
-		    XINCLUDES=" -I$i"
-		    found_xincludes="yes"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES="-I$x_includes"
-	    found_xincludes="yes"
-	fi
-    fi
-    if test found_xincludes = "no"; then
-	AC_MSG_RESULT(couldn't find any!)
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING(for X11 libraries)
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT($i)
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT(couldn't find any!  Using -lX11.)
-	XLIBSW=-lX11
-    fi
-])
-#--------------------------------------------------------------------
-# SC_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT(FIONBIO)
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT(FIONBIO)
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT(FIONBIO)
-	    ;;
-	*)
-	    AC_MSG_RESULT(O_NONBLOCK)
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# SC_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT($tcl_cv_member_tm_tzadj)
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT($tcl_cv_member_tm_gmtoff)
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT($tcl_cv_timezone_long)
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT($tcl_cv_timezone_time)
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# SC_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_CACHE_VAL(tcl_cv_strtod_buggy,[
-	    AC_TRY_RUN([
-		extern double strtod();
-		int main() {
-		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
-		    char *term;
-		    double value;
-		    value = strtod(infString, &term);
-		    if ((term != infString) && (term[-1] == 0)) {
-			exit(1);
-		    }
-		    value = strtod(nanString, &term);
-		    if ((term != nanString) && (term[-1] == 0)) {
-			exit(1);
-		    }
-		    value = strtod(spaceString, &term);
-		    if (term == (spaceString+1)) {
-			exit(1);
-		    }
-		    exit(0);
-		}], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)])
-	if test "$tcl_cv_strtod_buggy" = 1; then
-	    AC_MSG_RESULT(ok)
-	else
-	    AC_MSG_RESULT(buggy)
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# SC_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)])
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call SC_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# SC_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi])
-
-AC_DEFUN(SC_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT(none)
-    else
-	AC_MSG_RESULT(${tcl_flags})
-    fi])
-
-#--------------------------------------------------------------------
-# SC_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(SC_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	tcl_cv_type_64bit=none
-	# See if the compiler knows natively about __int64
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-	    tcl_type_64bit=__int64, tcl_type_64bit="long long")
-	# See if we should use long anyway  Note that we substitute in the
-	# type that is our current guess for a 64-bit type inside this check
-	# program, so it should be modified only carefully...
-	AC_TRY_RUN([#include <unistd.h>
-	    int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));}
-	    ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_DEFINE(TCL_WIDE_INT_IS_LONG)
-	AC_MSG_RESULT(using long)
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT(${tcl_cv_type_64bit})
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT(${tcl_cv_struct_dirent64})
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT(${tcl_cv_struct_stat64})
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT(${tcl_cv_type_off64_t})
-    fi])
-
-#------------------------------------------------------------------------
-# SC_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#	TCL_VERSION must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING(for Tcl public headers)
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files.], with_tclinclude=${withval})
-
-    if test x"${with_tclinclude}" != x ; then
-	if test -f "${with_tclinclude}/tcl.h" ; then
-	    ac_cv_c_tclh=${with_tclinclude}
-	else
-	    AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h])
-	fi
-    else
-	AC_CACHE_VAL(ac_cv_c_tclh, [
-	    # Use the value from --with-tclinclude, if it was given
-
-	    if test x"${with_tclinclude}" != x ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		# Do NOT check in $includedir, we need to prevent automatic
-		# location of Tcl headers in $prefix/include unless explicitly
-		# specified with the --with-tclinclude option. But go ahead and
-		# check some other possible local system locations.
-
-		for i in \
-			/usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
-		    if test -f "$i/tcl.h" ; then
-			ac_cv_c_tclh=$i
-			break
-		    fi
-		done
-	    fi
-	])
-    fi
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR(tcl.h not found.  Please specify its location with --with-tclinclude)
-    else
-	AC_MSG_RESULT(${ac_cv_c_tclh})
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080116/a53f75ab/attachment-0001.html


More information about the macports-changes mailing list