summaryrefslogtreecommitdiff
path: root/source4/lib/replace/libreplace_ld.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-06 16:23:18 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:36 +0100
commit414e5eca2e1495916f4a52789a6bee63d2f1ab6d (patch)
treebc04e8823933a0b799ef2e8d8fac4e345582acd2 /source4/lib/replace/libreplace_ld.m4
parenta73cfa950afe7ccf5625e044070815846f5612ae (diff)
downloadsamba-414e5eca2e1495916f4a52789a6bee63d2f1ab6d.tar.gz
samba-414e5eca2e1495916f4a52789a6bee63d2f1ab6d.tar.bz2
samba-414e5eca2e1495916f4a52789a6bee63d2f1ab6d.zip
r25877: Add libreplace macro for soname flags.
(This used to be commit 25aa875119622679881cd0e1b3b9dff8d2cf03ee)
Diffstat (limited to 'source4/lib/replace/libreplace_ld.m4')
-rw-r--r--source4/lib/replace/libreplace_ld.m441
1 files changed, 41 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4
index 183c302aae..c276a7a864 100644
--- a/source4/lib/replace/libreplace_ld.m4
+++ b/source4/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
+])