Add new replace check for --version-script
authorSimo Sorce <idra@samba.org>
Mon, 15 Jun 2009 20:20:06 +0000 (16:20 -0400)
committerSimo Sorce <idra@samba.org>
Mon, 15 Jun 2009 20:31:12 +0000 (16:31 -0400)
Allows us to pass an export files on Linux and Solaris so that we can expose
only symbols that are actually supposed to be global, and keep as local anything
else.

lib/replace/libreplace_ld.m4

index 8ab5e78765ec73d3805755db6d29913fc4299bef..90c5be6b4e61ea90c45cfa8da6153de7fd45861c 100644 (file)
@@ -248,6 +248,22 @@ AC_DEFUN([AC_LD_SONAMEFLAG],
                esac
 ])
 
+AC_DEFUN([AC_LD_VERSIONSCRIPT],
+[
+       AC_SUBST(VERSIONSCRIPT)
+       VERSIONSCRIPT=""
+       case "$host_os" in 
+               *linux*|*gnu*)
+                       VERSIONSCRIPT="-Wl,--version-script"
+                       ;;
+               *solaris*)
+                       if test "${GCC}" = "yes"; then
+                               VERSIONSCRIPT="-Wl,--version-script"
+                       fi
+                       ;;
+               esac
+])
+
 AC_DEFUN([AC_LIBREPLACE_MDLD],
 [
        AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER])