Subject: BSD/OS and libtool and ./configure's host_os
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/04/2003 22:04:35
When using GNU_CONFIGURE, --host is set. This defines host_os (basically
same as ${OPSYS}) which is used with libtool.

libtool knows BSD/OS as "bsdi4". But that is not a good name for
LOWER_OPSYS. My work-around before was to use bsdi4 as LOWER_OPSYS, but
then that makes strange setups with packages that build or install using
"bsdi4" (and I'd prefer "bsdos").

For example, it is standard for perl to be at perl5/site_perl/i386-bsdos/
... I don't want it to be perl5/site_perl/i386-bsdi4 -- especially under
BSD/OS 5.

I'd rather not patch
share/aclocal/libtool.m4
share/libtool/libltdl/acinclude.m4
share/libtool/libltdl/aclocal.m4
share/libtool/libltdl/configure
share/libtool/ltconfig

with:
- bsdi4*)
+ bsdi4*|bsdos|bsdi5*)

That wouldn't help much, since many other configure scripts still check
for "bsdi".

Would it cause problems to have a custom MACHINE_GNU_PLATFORM with the
LOWER_OPSYS replaced with "bsdi4" (for BSDOS)?

Do any other platforms supported by pkgsrc have this issue?


Also ...

On the bsdi-users list today I was told that libtool on BSD/OS really
needs to have the deplibs_check_method set to pass_all and NOT the
'file_magic ...'.

And I was given this patch (for libtool 1.4.2) which will work for BSD/OS
5.x too.

2002c2002,2007
< bsdi4*)
---
> # Versions of BSD/OS prior to 4.0 did not have real dynamic linking
> bsdi1*|bsdi2*|bsdi3*)
>   dynamic_linker=no
>   ;;
>
> bsdi*)
2004a2010
>   need_lib_prefix=no
2414a2421,2424
>       case $host_os in
> 	   bsdi*) lt_cv_archive_cmds_need_lc=no
> 	   ;;
>       esac
3301,3302c3311,3312
< bsdi4*)
<   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
---
> bsdi*)
>   lt_cv_deplibs_check_method='pass_all'

So I think that would need to be done for
acinclude.m4
aclocal.m4
configure
libtool.m4
libltdl/acinclude.m4
libltdl/aclocal.m4
libltdl/configure

Can you share any feedback or suggestions?

Thanks in advance,

Jeremy C. Reed
http://www.bsdnewsletter.com/