Hello,

On Wed, Jun 01, 2005 at 02:41:58PM +0200, Mark Brand wrote:
>     touch stamp-h

why do you need this?  It looks wrong.

>     ./configure --with-msw --target=i586-mingw32msvc
> --host=i586-mingw32msvc --build=i386-linux

Are you cross compiling?
--build=i386-linux says you are building on GNU/Linux, and the resulting
executable files will be copied to --host=i586-mingw32msvc .

Is that really what you intend?  Why you cannot build the package on
the OS where it will run?  If you built the package on your mingw32msvc
system, then the following should be enough:
        ./configure --with-msw

(Only in case the system cannot be autodetected, use:
        ./configure --with-msw --build=i586-mingw32msvc
and report the problem to [EMAIL PROTECTED])

--target is only used for tools which generated machine code, eg. compilers
or linkers.  If your program is not a compiler, you don't need --target.
Please don't use it.

>  if test x$target_os == xmingw32; then

But then, of course, you have to use $host_os here.

>     myprogram_LDADD = -lws2_32

The best solution is to use
        AM_CONDITIONAL([MINGW32], [test "x$host_os" = xmingw32])
in configure.ac

See http://sourceware.org/automake/automake.html#Conditionals

and in Makefile.am:
        if MINGW32
                myprogram_LDADD = -lws2_32
        endif

>  myprogram_LDADD := @LTLIBINTL@ @WINSOCK@

You should use $(LTLIBINTL) $(WINSOCK) here.  You can use this syntax,
because the make variable WINSOCK is defined in the Makefile.in:

>     WINSOCK = @WINSOCK@

> My generated Makefile contains:
>     WINSOCK = @WINSOCK@

It's wrong.  This line is in Makefile.in, but when you run ./configure
then it replaces @WINSOCK@ with a value.
AC_SUBST([WINSOCK]) required this.

Have you regenerated ./configure by autoconf?
Have you re-run ./configure?

Then you shouldn't see any @WINSOCK@ in the generated Makefiles.

Normally, make does all the necessary refresh.  Perhaps you used ``touch''
again.  Beware, ``touch'' is a very dangerous program.  ;-)

HTH,
        Stepan


Reply via email to