autoconf
[Top][All Lists]
Advanced

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

autoconf incorrectly(?) reports that g++ can't build shared library on O


From: Mike
Subject: autoconf incorrectly(?) reports that g++ can't build shared library on OpenBSD
Date: Tue, 17 Nov 2009 03:39:32 +0300

I have troubles with configuring some applications with their configure
script (for ex. verlihub-0.9.8d_RC2, autoconf-2.59) on OpenBSD-4.3,4.5,4.6
(gcc-3.3.5propolice, gmake-3.81):

bash-4.0# ./configure 
.. 
configure: creating libtool 
appending configuration tag "CXX" to libtool 
checking for ld used by g++... /usr/bin/ld 
checking if the linker (/usr/bin/ld) is GNU ld... yes 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no 
checking for g++ option to produce PIC... -fPIC 
checking if g++ PIC flag -fPIC works... yes 
checking if g++ supports -c -o file.o... yes 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no 
checking dynamic linker characteristics... openbsd4.6 ld.so 
.. 
 
Is it because OpenBSD restrictions or autoconf bug ? 
Applying autoconf-2.62, 2.64 has the same result. 
Reading autoconf script I can't find proper cheking for openbsd. 

I've solved this problem by following patch: 

--- configure Fri Sep 14 02:36:10 2007 
+++ configure Fri Oct 9 10:15:23 2009 
@@ -3913,7 +3913,7 @@ 
lt_cv_deplibs_check_method=pass_all 
;; 

-freebsd* | kfreebsd*-gnu) 
+freebsd* | kfreebsd*-gnu |openbsd*) 
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 
case $host_cpu in 
i*86 ) 
@@ -6632,7 +6632,7 @@ 
fi 
;; 
openbsd*) 
- with_gnu_ld=no 
+ with_gnu_ld=yes 
;; 
esac 

@@ -10105,7 +10105,7 @@ 
freebsd-elf*) 
archive_cmds_need_lc_CXX=no 
;; 
- freebsd* | kfreebsd*-gnu) 
+ freebsd* | kfreebsd*-gnu | openbsd*) 
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 
# conventions 
ld_shlibs_CXX=yes 

I know, this is not good way (need to check versions etc), but after
building this app with my patch it's working good. 
After trying to build midnight commander on MacOS-10.5 (darwin-xx),
I think that gnu autoconf is full of bugs.

Mike.
ps: Sources You can find on sourcefoge.net





reply via email to

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