From 414e5eca2e1495916f4a52789a6bee63d2f1ab6d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Nov 2007 16:23:18 +0100 Subject: r25877: Add libreplace macro for soname flags. (This used to be commit 25aa875119622679881cd0e1b3b9dff8d2cf03ee) --- source4/lib/replace/libreplace_ld.m4 | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'source4/lib/replace') 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 +]) -- cgit