From c0511ba7d3261855737a07b21f3d7851e9f07a1f Mon Sep 17 00:00:00 2001 From: jelmer Date: Tue, 6 Nov 2007 16:23:18 +0000 Subject: Add libreplace macro for soname flags. git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25877 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 81167d8f38e11423bcde5305f9e77ec268b0cf2e) --- source3/lib/replace/libreplace_ld.m4 | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/source3/lib/replace/libreplace_ld.m4 b/source3/lib/replace/libreplace_ld.m4 index 183c302aae..c276a7a864 100644 --- a/source3/lib/replace/libreplace_ld.m4 +++ b/source3/lib/replace/libreplace_ld.m4 @@ -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 +]) -- cgit