This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RC1: In Solaris 10 do not use versioned solibs
[perl5.git] / hints / solaris_2.sh
index 4eb2c72..644c96d 100644 (file)
@@ -42,6 +42,14 @@ esac
 set `echo $glibpth | sed -e 's@/usr/ucblib@@' -e 's@ /lib @ @'`
 glibpth="$*"
 
+# In Solaris 10, we don't want versioned shared libraries because those
+# often indicate a private use only library.  Especially badly that would
+# break things with SUNWbdb (Berkeley DB) being installed, which brings in
+# /usr/lib/libdb.so.1, but that is not really meant for public consumption.
+case "`uname -r`" in
+5.10) ignore_versioned_solibs=y ;;
+esac
+
 # Remove unwanted libraries.  -lucb contains incompatible routines.
 # -lld and -lsec don't do anything useful. -lcrypt does not
 # really provide anything we need over -lc, so we drop it, too.
@@ -404,13 +412,6 @@ EOM
        if test "`arch`" = i86pc -a `uname -r` = 5.6 && \
           ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then
            d_sigsetjmp=$undef
-           cat << 'EOM' >&2
-
-You will see a *** WHOA THERE!!! ***  message from Configure for
-d_sigsetjmp.  Keep the recommended value.  See hints/solaris_2.sh
-for more information.
-
-EOM
        fi
 
        # These prototypes should be visible since we using
@@ -637,3 +638,17 @@ fi
 EOOVER
 
 rm -f try.c try.o try a.out
+
+# If using C++, the Configure scan for dlopen() will fail in Solaris
+# because one of the two (1) an extern "C" linkage definition is needed
+# (2) #include <dlfcn.h> is needed, *and* a cast to (void*(*)())
+# is needed for the &dlopen.  Adding any of these would require changing
+# a delicate spot in Configure, so easier just to force our guess here
+# for Solaris.  Much the same goes for dlerror().
+case "$cc" in
+*g++*|*CC*)
+  d_dlopen='define'
+  d_dlerror='define'
+  ;;
+esac
+