[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf + automake support for MSVC
From: |
Peter Rosin |
Subject: |
Re: autoconf + automake support for MSVC |
Date: |
Sat, 03 Sep 2011 19:39:45 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 |
Den 2011-09-03 03:47 skrev Bruno Haible:
> Peter Rosin wrote:
>> I didn't want to create yet another fork of cccl, and instead fixed
>> the 'compile' script in Automake to handle the bits that must be
>> handled by the build tools (and taught libtool to deal with cl
>> natively). What I didn't do was add all sorts of options to
>> 'compile' to make cl look like gcc, because that way lies madness.
>> ...
>> 'compile' makes cl understand the
>> -l and -L options (and a few others).
>
> So, if I understand it right, you *don't* want to assume that $CC
> understands -l and -L options, like the C compiler in POSIX does for
> ages (cf.
> <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html>).
I think you misunderstand, AM_PROG_CC_C_O clobbers $CC and prepends
/path/to/package/build-aux/compile if $CC does not support
-c and -o at the same time, something cl does not (the function
as such is there, but you say -Fo<file> instead of -o <file>). If
AM_PROG_CC_C_O is not used in configure.ac (and hence, no 'compile'
script inside the package) you can say CC="/path/to/other/compile cl"
explicitly instead.
> And since Autoconf scripts invoke $CC directly and not 'build-aux/compile',
> all Autoconf macros that use -l or -L need to be adapted, so that they
> handle 'cl' directly.
Since $CC is updated by AM_PROG_CC_C_O your assumption does not hold.
> Can you please send patches to support 'cl' for these uses in gnulib?
No need for that, as I think all of the below is handled for cl by a
current 'compile' script.
> getaddrinfo.m4:46: LIBS="$LIBS -lws2_32"
> getaddrinfo.m4:56: GETADDRINFO_LIB="-lws2_32"
> gethostname.m4:24: LIBS="$LIBS -lws2_32"
> gethostname.m4:34: GETHOSTNAME_LIB="-lws2_32"
> gettext.m4:268: LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^
> //' -e 's/ $//'`
> hostent.m4:30: LIBS="$LIBS -lws2_32"
> hostent.m4:44: HOSTENT_LIB="-lws2_32"
> lib-link.m4:85: *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
> lib-link.m4:322: -L*)
> lib-link.m4:373: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+
> }-L$found_dir -l$name"
> lib-link.m4:460: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+
> }-L$found_dir -l$name"
> lib-link.m4:529: -L*)
> lib-link.m4:610: -l*)
> lib-link.m4:730: -L) next=yes ;;
> lib-link.m4:731: -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
> servent.m4:32: LIBS="$LIBS -lws2_32"
> socketlib.m4:20: LIBS="$LIBS -lws2_32"
> socketlib.m4:34: LIBSOCKET='-lws2_32'
'compile' handles -o, -l, -L, -Xlinker and -Wl, plus posix->win32 path
conversion. Maybe I have forgotten something but I think that's it.
Cheers,
Peter
- autoconf + automake support for MSVC, Bruno Haible, 2011/09/02
- Re: autoconf + automake support for MSVC, Michael Goffioul, 2011/09/02
- Re: autoconf + automake support for MSVC, Peter Rosin, 2011/09/03
- Re: autoconf + automake support for MSVC, Bruno Haible, 2011/09/09
- Re: autoconf + automake support for MSVC, Peter Rosin, 2011/09/09
- Re: autoconf + automake support for MSVC, Bruno Haible, 2011/09/09
- Re: autoconf + automake support for MSVC, Peter Rosin, 2011/09/10
- Re: autoconf + automake support for MSVC, Bruno Haible, 2011/09/10
- Re: autoconf + automake support for MSVC, Harlan Stenn, 2011/09/10