[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [ldap] Shared Objects / SunOS



> Hi,
>     Is there a way to compile a shared object library libldap.so on
> SunOS?
> 
>     Thanks.
> 
> Sreenivas Reddy.
> 
> 
> ---
> You are currently subscribed to ldap@umich.edu as: [kunkee@pluto.ops.NeoSoft.com]
> To unsubscribe send email to ldap-request@umich.edu with the word UNSUBSCRIBE as the SUBJECT of the message.
> 
> 

If, by SunOS, you mean Solaris (at least), I've wondered why it doesn't
detect and build shared libraries.  Below is a patch.  The problem
was in build/ltconfig, which tests to see if -KPIC works by compiling
an empty program.  Sun's PRO C compiler issues a warning in this event,
causing conftest.err to be non-empty, and it concludes the system cannot
do shared libraries when it totally can.  I changed the test program
from being an empty one to one that is "int a;".

The only thing about this patch is that ltconfig appears to itself be
an autoconf generated thing, so the patch really needs to be pushd back
to somewhere else to become permanent.  However, it should be good enough
for us OpenLDAP folks for now.

Index: build/ltconfig
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/build/ltconfig,v
retrieving revision 1.2
diff -c -r1.2 ltconfig
*** ltconfig	1998/12/04 01:27:58	1.2
--- ltconfig	1998/12/17 21:27:25
***************
*** 541,547 ****
    # Check to make sure the pic_flag actually works.
    echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
    $rm conftest*
!   echo > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
    echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
--- 541,547 ----
    # Check to make sure the pic_flag actually works.
    echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
    $rm conftest*
!   echo int a\; > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
    echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5