info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-cvs] CVS for MVS: Configure question


From: Derek R. Price
Subject: Re: [Info-cvs] CVS for MVS: Configure question
Date: Wed, 20 Sep 2000 14:02:49 -0400

Not sure I have a straight answer for this, but I'll give it a try -

In general principal, look for things in this order:
    1) A general standard already defined and being used, such as POSIX, SYSV, 
or
_STDC_.
    2) A autoconf macro that already does what you want
    3) Some test code you could run to find out how your compiler works.

If I didn't know some general cross-platform standard define I could have 
configure
or the C code look for, as might be the case here, I might try looking for a 
header
that implied the existance of libmvs.a, but I'm not sure that's really 
appropriate
in this case.  If the macro found a header with the same name on Solaris, we
probably don't want the compiler to try to link to it.  Of course the assumption
that a namespace collision is unlikely might be valid and useful until proven
otherwise here.  You can check out the libkrb and gssapi stuff in CVS's
configure.in for an example of looking for a library anyway if you like.  It 
messes
some with cross-compiling awareness but I didn't look too closely.  The
AC_CHECK_LIB autoconf macro might be useful for discovering if libmvs.a exists.
Not sure that's official, but you could look for some function you know the lib 
is
supposed to define and assume if you found it that you have the lib.  This has
potential to cause some of the same namespace collision problems I already
mentioned though.

If this is something that is really MVS specific and should stay that way, then 
the
solution I found in the ssh 2 code from Communications Security might be more
appropriate.  It just uses uname, $host and $target (there's some 
cross-compiling
code at the beginning of the document to set those too) to set some lib and
compiler variables.  I'm not going to include the snippet for fear of license
violations, but you should be able to download the whole thing and take a look 
if
you need to.  There's a precedent (also read, "example") near the end of CVS's
configure.in involving Cygwin:

    AC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32,
    [AC_TRY_COMPILE([], [return __CYGWIN32__;],
    ccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)])
    if test $ccvs_cv_sys_cygwin32 = yes; then
      LIBOBJS="$LIBOBJS fncase.o"
      LIBS="$LIBS -ladvapi32"

and so on...

I'm guessing that, failing some more general (e.g. POSIX/ SYSV/_STDC_/function 
name
search/compiler test) type out, checking $host/$target (well, something like the
Cygwin example above is probably less work now) is probably best.  In other 
words,
it's probably better to assume use of the proper headers & libs in this case 
based
on the fact that you are compiling under MVS rather than assume MVS based on the
existance of libs.

Derek
--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden     OpenAvenue ( http://OpenAvenue.com )
--
I never told my religion nor scrutinize that of another.  I never attempted to
make a convert nor wished to change another's creed.  I have judged of others'
religion by their lives, for it is from our lives and not from our words that
our religion must be read. By the same test must the world judge me.

                        - Thomas Jefferson

address@hidden wrote:

> I am working on the port of CVS to MVS.  We've got the client side working, 
> and
> now I'm trying to set up the Makefiles to properly include a platform lib.
>
> As I see it, we need to modify Configure.in (which generates configure) so 
> that
> configure tests to see if this is a MVS system, and to append ../mvs/libmvs.a 
> to
> @address@hidden
>
> Any suggestions on where and how to do this?  Am I even looking in the right
> place?
>
> Thanks.
>
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/info-cvs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]