Status: Read
Received: from phillip.thumbsplus.com by phillip.thumbsplus.com (NTMail 3.02.11) with ESMTP id pcrews for <pcrews@cerious.com>; Mon, 12 May 1997 01:46:59 -0400
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.sgi.com (950413.SGI.8.6.12/970507) via ESMTP id WAA16295; Sun, 11 May 1997 22:32:42 -0700
	env-from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo@localhost) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) id TAA26858 for tiff-list; Sun, 11 May 1997 19:41:30 -0700
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37]) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) via ESMTP id TAA26854 for <tiff-relay@relay.engr.sgi.com>; Sun, 11 May 1997 19:41:27 -0700
Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by sgi.sgi.com (950413.SGI.8.6.12/970507) via SMTP id TAA27373
	for <tiff@sgi.com>; Sun, 11 May 1997 19:41:25 -0700
	env-from (mly@adoc.xerox.com)
Received: from godzilla.ADOC.xerox.com ([13.242.128.10]) by alpha.xerox.com with SMTP id <19241(13)>; Sun, 11 May 1997 19:41:18 PDT
Received: from hippomenes.ADOC (hippomenes.ADOC.xerox.com) by godzilla.ADOC.xerox.com (4.1/ADOC-1.16)
	id AA14962; Sun, 11 May 97 19:41:17 PDT
Received: by hippomenes.ADOC (SMI-8.6/SMI-SVR4)
	id TAA05761; Sun, 11 May 1997 19:41:15 -0700
Date: Sun, 11 May 1997 19:41:15 PDT
Message-Id: <199705120241.TAA05761@hippomenes.ADOC>
From: Richard Mlynarik <mly@adoc.xerox.com>
To: tiff@sgi.com
Subject: FreeBSD shared-library
Sender: owner-tiff@fddi-sgi.engr.sgi.com
Precedence: bulk

I've fixed what seems to be an obvious bug in Linux shared-library
building, but I'm in no position to test it.  It looks like it would
never have worked.

I'd guess that code nearly-identical to the freebsd stuff would work
for BSDI and NetBSD; I'm not able to verify this, either.

It would be nice if the mailing list archives in
ftp://ftp.sgi.com/graphics/tiff/archives/ were maintained;
I don't have time to be on a mailing list, but it would be nice to be
able to search for things when I cared.

--- configure.~1~	Mon Apr 29 15:16:17 1996
+++ configure	Sun May 11 19:32:41 1997
@@ -1126,7 +1126,7 @@
 	LIBCOPTS="-K PIC"
 	DSO=SOLARIS
 	;;
-    *-linux)
+    *-linux*)
 	if [ -x /lib/libc.so.5 ]; then
 	    DSOSUF=so.${DIST_MAJOR}
 	    DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_ALPHA}
@@ -1134,6 +1134,13 @@
 	    DSOOPTS='-shared'
 	    DSO=LINUX
 	fi
+	;;
+    *-freebsd*)
+	DSOSUF=so
+	DSOLD='${LD}'
+	DSOOPTS='-Bshareable'
+	LIBCOPTS='-fpic'
+	DSO=FREEBSD
 	;;
     *-osf3*)
 	DSOSUF=so
--- libtiff/Makefile.in.~1~	Mon Apr 29 15:16:21 1996
+++ libtiff/Makefile.in	Sun May 11 19:33:55 1997
@@ -169,7 +169,7 @@
 	${LD} -elf -o libtiff.@DSOSUF@ -shared -no_unresolved -all ${OBJS} \
 	    @LIBJPEG@ @LIBGZ@ -lc -lm
 	touch $@
-# Solaris 2.4
+# Solaris 2.x
 SOLARISdso: ${OBJS}
 	${LD} -L@DIR_LIB@ -G -o libtiff.@DSOSUF@ ${OBJS}
 	touch $@
@@ -199,6 +199,10 @@
 # OSF/1 3.2 shared lib rule
 OSFdso: ${OBJS}
 	${LD} -o libtiff.@DSOSUF@ -shared -error_unresolved ${OBJS} @LIBJPEG@ @LIBGZ@ -lc -lm
+# FreeBSD 2.x
+FREEBSDdso: ${OBJS}
+	${LD} -L@DIR_LIB@ -Bshareable -o libtiff.@DSOSUF@ ${OBJS}
+	touch $@
 
 
 ${OBJS}: ${SRCDIR}/tiffio.h ${SRCDIR}/tiff.h ${SRCDIR}/tif_dir.h
