]> granicus.if.org Git - libjpeg-turbo/commitdiff
Build libturbojpeg.so using mapfile on Solaris
authorDRC <dcommander@users.sourceforge.net>
Tue, 16 Feb 2010 22:40:26 +0000 (22:40 +0000)
committerDRC <dcommander@users.sourceforge.net>
Tue, 16 Feb 2010 22:40:26 +0000 (22:40 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@115 632fc199-4ca6-4c93-a231-07263d6284db

Makefile.am
configure.ac

index 2f5ef00075ed91b1eebd79a79c737706c42e16d7..372ed11789515fd8c937ed4ea3a051ef9380d6ec 100644 (file)
@@ -21,7 +21,7 @@ libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h \
 
 if VERSION_SCRIPT
 
-libturbojpeg_la_LDFLAGS += -Wl,--version-script,$(srcdir)/turbojpeg-mapfile
+libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/turbojpeg-mapfile
 
 endif
 
index 7bf1ee66fa0cfed9c3b4a4ebcde9b5477466d21e..b152a671d7a081a4c18b9e26fb84a28506f67cf1 100644 (file)
@@ -27,15 +27,25 @@ 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`
+VERSION_SCRIPT=no
+LDVER=`$LD --help </dev/null 2>&1 | grep "\-\-version-script"`
 if test "$LDVER"; then
   VERSION_SCRIPT=yes
+  VERSION_SCRIPT_FLAG=-Wl,--version-script,
   AC_MSG_RESULT(yes)
 else
-  VERSION_SCRIPT=no
-  AC_MSG_RESULT(no)
+  LDVER=`$LD --help </dev/null 2>&1 | grep "\-M"`
+  if test "$LDVER"; then
+    VERSION_SCRIPT=yes
+    VERSION_SCRIPT_FLAG=-Wl,-M,
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
 fi
+
 AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes")
+AC_SUBST(VERSION_SCRIPT_FLAG)
 
 if test "x${GCC}" = "xyes"; then
   if test "x${SAVED_CFLAGS}" = "x"; then