[Geotiff] geotiff shared on solaris box

David Burken dburken at comcast.net
Fri Mar 11 15:54:28 EST 2005


Hi Frank,

Hey I had to hack the aclocal.m4 in libgeotiff to get it to build shared 
on solaris.  Basically add -fPIC and hard coded the LD_SHARED="gcc -shared".

I have no idea why the test was failing, I gave up.

Here's a diff though:
diff -r1.3 aclocal.m4
10,11c10,11
<               C_WFLAGS="-Wall"
<               CFLAGS="$CFLAGS -Wall"
---
 >               C_WFLAGS="-Wall -fPIC"
 >               CFLAGS="$CFLAGS -Wall -fPIC"
15c15
<               CXX_WFLAGS="-Wall"
---
 >               CXX_WFLAGS="-Wall -fPIC"
52c52,54
<   ${CC} ${C_PIC} -c conftest2.c
---
 >   gcc ${C_PIC} -c conftest2.c
 >
 >   echo "${C_PIC}"
57c59
<   LD_SHARED="/bin/true"
---
 >   LD_SHARED="gcc -shared"
59,60c61,62
<           -a -z "`ld -shared conftest2.o -o libconftest.so 2>&1`" ; then
<     if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; 
then
---
 >           -a -z "`gcc -shared conftest2.o -o libconftest.so 2>&1`" ; then
 >     if test -z "`gcc conftest1.c libconftest.so -o conftest1 2>&1`"; then
66c68
<         LD_SHARED="ld -shared"
---
 >         LD_SHARED="gcc -shared"

Dave




More information about the Geotiff mailing list