[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CONFIG_LINKS and MSVC
From: |
David Byron |
Subject: |
AC_CONFIG_LINKS and MSVC |
Date: |
Fri, 14 Apr 2006 10:11:39 -0700 |
I'm having trouble getting autoconf to do what I want when configuring
under cygwin for cccl/MSVC. I'm trying to change the behavior of:
AC_CONFIG_LINKS(dest.h:source.h)
MSVC doesn't seem to deal with reading through cygwin links, I think
because the actual filename of the link is dest.h.lnk. When a C file
does
#include <dest.h>
MSVC doesn't find it.
So, I want AC_CONFIG_LINKS to make a copy instead of a link. I tried:
AC_PROG_LN_S
as_ln_s='cp -p'
LN_S=$as_ln_s
AC_SUBST(LN_S)
but that doesn't help.
I also tried:
case "$host" in
*-*-cygwin)
copy_links=yes
;;
esac
if test "$copy_links" == "yes"; then
echo "copying source.h"
config_cmd="cp -p $srcdir/source.h dest.h"
else
echo "linking utlendian.h"
config_cmd="ln -s $srcdir/source.h dest.h"
fi
AC_CONFIG_COMMANDS([foo],$config_cmd)
which seems to get $config_cmd set correctly in configure, but not in
config.status. It feels like someone must have dealt with this before,
and probably in a cleaner way than having a separate config command for
each link.
Does it make sense to have the code that supports AC_CONFIG_LINKS use
$as_ln_s instead of straight ln -s in:
# Try a symlink, then a hard link, then a copy.
ln -s $ac_rel_source $ac_dest 2>/dev/null ||
ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
cp -p $srcdir/$ac_source $ac_dest ||
{ { echo "$as_me:$LINENO: error: cannot link or copy
$srcdir/$ac_source to $ac_dest" >&5
echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest"
>&2;}
{ (exit 1); exit 1; }; }
-bash-2.05b$ autoconf --version
autoconf (GNU Autoconf) 2.59
Thanks for your help.
-DB
- AC_CONFIG_LINKS and MSVC,
David Byron <=