[m-dev.] compiler generated events

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 25 00:29:41 AEDT 1999


On 24-Feb-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> 
> something like that?
> 
> +# test if sockets are available to be able to use Opium-M
> +AC_MSG_CHECKING(whether we can use sockets (for Opium-M))
> +
> +case "$host" in
> +       i?86-*-linux|i?86-*-linux-gnu)

Well, that works, but it's not the ideal solution.
It would be better to use AC_TRY_RUN or something similar.

Still, even just checking for hard-coded configurations
like this would be better than what happens currently,
so I'd be willing to accept a change like this.

> +       *-cyginw*)
> +               AC_MSG_RESULT(no)

BTW, I believe that cygwin does support sockets.

> +               AC_MSG_RESULT(yes)
> +               CC="$CC -DMR_USE_EXTERNAL_DEBUGGER -g "

You should use AC_DEFINE(MR_USE_EXTERNAL_DEBUGGER) rather than
redefining CC like that.  You should also move the documentation for
MR_USE_EXTERNAL_DEBUGGER from runtime/mercury_conf_param.h to
runtime/mercury_conf.h.in, adding an appropriate #undef there for it,
so that AC_DEFINE will work.

> +       sparc-sun-solaris2.*)
> +               AC_MSG_RESULT(yes)        
> +               CC="$CC -DMR_USE_EXTERNAL_DEBUGGER -g -lsocket"

Setting `-lsocket' here won't work -- it may cause problems
when you try to create shared libraries, since they are built
with LINK_SHARED_OBJECT rather than CC, and in addition the
`-lsocket' needs to go at the end of the command line rather
than at the start.

Oh, and if you modify configure.in, don't forget to modify
bindist/build_vars.in and/or bindist/bindist.configure.in.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list