libtool: LT_CYGPATH

1 
1 15.3.7.5 LT_CYGPATH
1 ...................
1 
1 For some cross-compile configurations (where the host platform is
1 Cygwin), the 'cygpath' program is used to convert file names from the
1 build platform notation to the Cygwin form (technically, this conversion
1 is from Windows notation to Cygwin notation; the conversion from the
1 build platform format to Windows notation is performed via other means).
1 However, because the 'cygpath' program is not (and should not be) in the
1 'PATH' on the build platform, 'LT_CYGPATH' must specify the full build
1 platform file name (that is, the full Unix or MSYS file name) of the
1 'cygpath' program.
1 
1    The reason 'cygpath' should not be in the build platform 'PATH' is
1 twofold: first, 'cygpath' is usually installed in the same directory as
1 many other Cygwin executables, such as 'sed', 'cp', etc.  If the build
1 platform environment had this directory in its 'PATH', then these Cygwin
1 versions of common Unix utilities might be used in preference to the
1 ones provided by the build platform itself, with deleterious effects.
1 Second, especially when Cygwin-1.7 or later is used, multiple Cygwin
1 installations can coexist within the same Windows instance.  Each
1 installation will have separate "mount tables" specified in
1 'CYGROOT-N/etc/fstab'.  These "mount tables" control how that instance
1 of Cygwin will map Windows file names and paths to Cygwin form.  Each
1 installation's 'cygpath' utility automatically deduces the appropriate
1 '/etc/fstab' file.  Since each 'CYGROOT-N/etc/fstab' mount table may
1 specify different mappings, it matters what 'cygpath' is used.
1 
1    Note that 'cygpath' is a Cygwin application; to execute this tool
1 from Unix requires a working and properly configured Wine installation,
1 as well as enabling the GNU/Linux 'binfmt' extension.  Furthermore, the
1 Cygwin 'setup.exe' tool should have been used, via Wine, to properly
1 install Cygwin into the Wine file system (and registry).
1 
1    Unfortunately, Wine support for Cygwin is intermittent.  Recent
1 releases of Cygwin (1.7 and above) appear to require more Windows API
1 support than Wine provides (as of Wine version 1.2); most Cygwin
1 applications fail to execute.  This includes 'cygpath' itself.  Hence,
1 it is best _not_ to use the LT_CYGPATH machinery in libtool when
1 performing Unix to Cygwin cross-compiles.  Similarly, it is best _not_
1 to enable the GNU/Linux binfmt support in this configuration, because
1 while Wine will fail to execute the compiled Cygwin applications, it
1 will still exit with status zero.  This tends to confuse build systems
1 and test suites (including libtool's own testsuite, resulting in
1 spurious reported failures).  Wine support for the older Cygwin-1.5
1 series appears satisfactory, but the Cygwin team no longer supports
1 Cygwin-1.5.  It is hoped that Wine will eventually be improved such that
1 Cygwin-1.7 will again operate correctly under Wine.  Until then, libtool
11 will report warnings as described in ⇒File Name Conversion
 Failure in these scenarios.
1 
1    However, 'LT_CYGPATH' is also used for the MSYS to Cygwin cross
1 compile scenario, and operates as expected.
1