svn commit: samba r25977 - in branches/SAMBA_4_0/source/lib/replace: .

metze at samba.org metze at samba.org
Thu Nov 15 16:44:29 GMT 2007


Author: metze
Date: 2007-11-15 16:44:28 +0000 (Thu, 15 Nov 2007)
New Revision: 25977

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25977

Log:
libreplace: add AC_LIBREPLACE_MDLD and AC_LIBREPLACE_MDLD_FLAGS macros

They define the linker and link flags for building shared modules

metze

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4	2007-11-15 16:40:32 UTC (rev 25976)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4	2007-11-15 16:44:28 UTC (rev 25977)
@@ -180,3 +180,53 @@
 			;;
 		esac
 ])
+
+AC_DEFUN([AC_LIBREPLACE_MDLD],
+[
+	MDLD="${CC}"
+
+	case "$host_os" in
+		*irix*)
+			MDLD="${PROG_LD}"
+			;;
+	esac
+
+	AC_SUBST(MDLD)
+])
+
+AC_DEFUN([AC_LIBREPLACE_MDLD_FLAGS],
+[
+	MDLD_FLAGS="-shared"
+
+	case "$host_os" in
+		*linux*)
+			MDLD_FLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
+			;;
+		*solaris*)
+			MDLD_FLAGS="-G"
+			if test "${GCC}" = "no"; then
+				## ${CFLAGS} added for building 64-bit shared
+				## libs using Sun's Compiler
+				NDLD_FLAGS="-G \${CFLAGS}"
+			fi
+			;;
+		*sunos*)
+			MDLD_FLAGS="-G"
+			;;
+		*aix*)
+			MDLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc"
+			;;
+		*hpux*)
+			if test "${GCC}" = "yes"; then
+				MDLD_FLAGS="-shared"
+			else
+				MDLD_FLAGS="-b"
+			fi
+			;;
+		*darwin*)
+			MDLD_FLAGS="-bundle -flat_namespace -undefined suppress -Wl,-search_paths_first"
+			;;
+	esac
+
+	AC_SUBST(MDLD_FLAGS)
+])



More information about the samba-cvs mailing list