Build TurboJPEG/OSS with a version script to prevent any non-global symbols from being accessible (this is to protect against potential namespace conflicts when preloading it into an application via VirtualGL.)


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@109 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/configure.ac b/configure.ac
index 0899613..a315e07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,17 @@
 AC_PROG_LIBTOOL
 AC_PROG_LN_S
 
+AC_MSG_CHECKING([whether the linker supports version scripts])
+LDVER=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+if test "$LDVER"; then
+  VERSION_SCRIPT=yes
+  AC_MSG_RESULT(yes)
+else
+  VERSION_SCRIPT=no
+  AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes")
+
 if test "x${GCC}" = "xyes"; then
   if test "x${SAVED_CFLAGS}" = "x"; then
     CFLAGS=-O3