On Saturday 15 April, Keith Marshall wrote: > > On Friday 14 April 2006 11:43 pm, David Byron wrote: > > > > > AC_CONFIG_LINKS is not so widely used, and neither is > > > `cccl', so it is possible that you are the first person to > > > face this problem. > > > > This isn't just a cccl problem, but a problem for anyone > > using MSVC. I guess using autoconf with MSVC pretty much > > implies cccl, but just in case. > > ... but it *doesn't* imply using Cygwin to run the configure > script! You're right. My macros for dealing with this are below. They work for me but I'm curious what folks with (way) more autoconf/m4 experience have to say. > Isn't this more a problem with the way Cygwin abuses *.lnk > files, which Win32 designates as `shortcuts', to simulate > symbolic links? A Win32 shortcut is *not* a symbolic link, > in the *nix sense. Win32 doesn't support symbolic links, > but autoconf under Cygwin thinks that it does, because > Cygwin makes it appear so. Only Cygwin programs can > comprehend the way in which Cygwin simulates symbolic links > by abusing shortcut files; cccl and MSVC aren't Cygwin > programs... I agree with this, but I'm not sure what I can do about it. > This problem is very closely related to the discussion we > had, only last week, concerning the resolution of LN_S for > MSYS; cccl probably plays better with MSYS, than it does > with Cygwin. If you're using Cygwin, you are probably > better sticking with Cygwin's own GCC implementation as your > compiler suite; if you want Autoconf with MSVC, there are > Win32 *native* tools available, which will support that. I'd love some pointers to other ways (besides cccl and cygwin) to get autoconf working with MSVC. So far this combo seems to be working pretty well for me. Thanks. -DB # See if the compiler can access files via symlinks. MSVC # can't. Set the global variable tcs_cv_config_include to # the appropriate command (link or copy) so the # TCS_CONFIG_INCLUDE macro does the right thing. AC_DEFUN([TCS_CHECK_COMPILER_SYMLINK_ACCESS], [ AC_MSG_CHECKING([command to link include files for compiler access]) AC_CACHE_VAL([tcs_cv_config_include],[ # Clean up in case these files happen to exist rm -f contest.linkdest conftest.h # Make a header file echo "/* a dummy comment */" >conftest.linkdest # Link to it ln -fs conftest.linkdest conftest.h # Try it out AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include "conftest.h"],[]), tcs_cv_config_include="ln -fs", tcs_cv_config_include="cp -p") ]) AC_MSG_RESULT([$tcs_cv_config_include]) ]) # TCS_CONFIG_INCLUDE(tag,source,dest) AC_DEFUN([TCS_CONFIG_INCLUDE], [ # Prefix everything with the tag name so we use separate # shell variables for each command $1_config_cmd="$tcs_cv_config_include $srcdir/$2 $3" AC_CONFIG_COMMANDS([$1],$$1_config_cmd,$1_config_cmd='$$1_config_cmd') ]) _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf