Add libreplace macro for soname flags.
authorjelmer <jelmer@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Tue, 6 Nov 2007 16:23:18 +0000 (16:23 +0000)
committerStefan Metzmacher <metze@samba.org>
Fri, 9 Nov 2007 08:29:16 +0000 (09:29 +0100)
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25877 0c0555d6-39d7-0310-84fc-f1cc0bd64818

source/lib/replace/libreplace_ld.m4

index 183c302aaea8ddbf8d1cf7db4781570f1f8f0227..c276a7a86455b521ce5c8c6bb05f9c43e002bb58 100644 (file)
@@ -125,3 +125,44 @@ AC_DEFUN([AC_LD_SHLIBEXT],
        esac
        AC_SUBST(SHLIBEXT)
 ])
+
+AC_DEFUN([AC_LD_SONAMEFLAG],
+[
+       AC_SUBST(SONAMEFLAG)
+       SONAMEFLAG=""
+       case "$host_os" in 
+               *linux*)
+                       SONAMEFLAG="-Wl,-soname="
+                       ;;
+               *solaris*)
+                       SONAMEFLAG="-h "
+                       if test "${GCC}" = "yes"; then
+                               SONAMEFLAG="-Wl,-soname="
+                       fi
+                       ;;
+               *sunos*)
+                       SONAMEFLAG="-Wl,-h,"
+                       ;;
+               *netbsd* | *freebsd* | *dragonfly* )
+                       SONAMEFLAG="-Wl,-soname,"
+                       ;;
+               *openbsd*)
+                       SONAMEFLAG="-Wl,-soname,"
+                       ;;
+               *irix*)
+                       SONAMEFLAG="-soname "
+                       ;;
+               *hpux*)
+                       SONAMEFLAG="-Wl,+h "
+                       ;;
+               *osf*)
+                       SONAMEFLAG="-Wl,-soname,"
+                       ;;
+               *unixware*)
+                       SONAMEFLAG="-Wl,-soname,"
+                       ;;
+               *darwin*)
+                       SONAMEFLAG="-Wl,-soname,"
+                       ;;
+               esac
+])