$NetBSD: patch-aa,v 1.20 2002/08/25 18:39:19 jlam Exp $ --- Makefile.config.in.orig Thu Mar 14 16:25:54 2002 +++ Makefile.config.in Tue May 14 19:52:32 2002 @@ -33,7 +33,7 @@ #Tru64 (= Digital Unix): #CC = cc #CC = gcc -CC = gcc +#CC = gcc # The linker. LD = $(CC) @@ -52,7 +52,7 @@ # MAKE is set automatically by Make to what was used to invoke Make. -INSTALL = $(SRCDIR)/buildtools/install.sh +#INSTALL = $(SRCDIR)/buildtools/install.sh #Solaris: #INSTALL = /usr/ucb/install #Tru64: @@ -64,7 +64,7 @@ # STRIPFLAG is the option you pass to the above install program to make it # strip unnecessary information out of binaries. -STRIPFLAG = -s +#STRIPFLAG = -s # If you don't want to strip the binaries, just leave it null: #STRIPFLAG = @@ -137,10 +137,10 @@ # the directory information in the executable at link time. # Solaris, SunOS, NetBSD: -NEED_RUNTIME_PATH = N -#NEED_RUNTIME_PATH = Y +#NEED_RUNTIME_PATH = N +NEED_RUNTIME_PATH = Y -LDFLAGS = +#LDFLAGS = # Eunice users may want to use -noshare so that the executables can # run standalone: #LDFLAGS = -noshare @@ -156,16 +156,16 @@ ifeq ($(NEED_RUNTIME_PATH),Y) #If the linker is gcc (e.g. NetBSD): -#LDFLAGS += -Wl,--rpath,$(INSTALLLIBS) +LDFLAGS += -Wl,-R$(INSTALLLIBS) #Any other linker: -LDFLAGS += -R$(INSTALLLIBS) +#LDFLAGS += -R$(INSTALLLIBS) endif # Linker options for created Netpbm shared libraries. # Here, $(SONAME) resolves to the soname for the shared library being created. # The following are gcc options. This works on GNU libc systems. -LDSHLIB = -shared -Wl,-soname,$(SONAME) +LDSHLIB = -nostdlib -shared -Wl,-Bshareable,-soname,$(SONAME) # You need -nostart instead of -shared on BeOS. Though the BeOS compiler is # ostensibly gcc, it has the -nostart option, which is not mentioned in gcc # documentation and doesn't exist in at least one non-BeOS installation. @@ -180,11 +180,15 @@ #Tru64: #LDSHLIB = -shared -expect_unresolved "*" +ifeq ($(OPSYS),SunOS) +LDSHLIB = -Wl,-B,dynamic,-G,-h,$(SONAME) +endif + ifeq ($(NEED_RUNTIME_PATH),Y) #If the linker is gcc (e.g. NetBSD): -#LDSHLIB += -Wl,--rpath,$(INSTALLLIBS) +LDSHLIB += -Wl,-R$(INSTALLLIBS) #Any other linker: -LDSHLIB += -R$(INSTALLLIBS) +#LDSHLIB += -R$(INSTALLLIBS) endif # On older systems, you have to make shared libraries out of position @@ -204,7 +208,7 @@ CFLAGS_SHLIB = # Solaris or SunOS with gcc, and NetBSD: #CFLAGS_SHLIB = -fpic -#CFLAGS_SHLIB = -fPIC +CFLAGS_SHLIB = -fPIC # Sun compiler: #CFLAGS_SHLIB = -Kpic #CFLAGS_SHLIB = -KPIC @@ -222,11 +226,11 @@ # The TIFF library. See above. If you want to build the tiff # converters, you must have the tiff library already installed. -TIFFLIB_DIR = /usr/lib -TIFFHDR_DIR = /usr/include/libtiff +#TIFFLIB_DIR = /usr/lib +#TIFFHDR_DIR = /usr/include/libtiff #NetBSD: -#TIFFLIB_DIR = $(LOCALBASE)/lib -#TIFFHDR_DIR = $(LOCALBASE)/include +TIFFLIB_DIR = $(BUILDLINK_DIR)/lib +TIFFHDR_DIR = $(BUILDLINK_DIR)/include # OSF, Tru64: #TIFFLIB_DIR = /usr/local1/DEC/lib #TIFFHDR_DIR = /usr/local1/DEC/include @@ -250,11 +254,11 @@ # JPEG stuff statically linked in, in which case you won't need # JPEGLIB_DIR in order to build the Tiff converters. -JPEGLIB_DIR = /usr/lib -JPEGHDR_DIR = /usr/include/jpeg +#JPEGLIB_DIR = /usr/lib +#JPEGHDR_DIR = /usr/include/jpeg # Netbsd: -#JPEGLIB_DIR = ${LOCALBASE}/lib -#JPEGHDR_DIR = ${LOCALBASE}/include +JPEGLIB_DIR = ${LOCALBASE}/lib +JPEGHDR_DIR = ${LOCALBASE}/include # OSF, Tru64: #JPEGLIB_DIR = /usr/local1/DEC/lib #JPEGHDR_DIR = /usr/local1/DEC/include @@ -269,11 +273,11 @@ # The PNG library. See above. If you want to build the PNG # converters you must have the PNG library already installed. -PNGLIB_DIR = /usr/lib -PNGHDR_DIR = /usr/include/png +#PNGLIB_DIR = /usr/lib +#PNGHDR_DIR = /usr/include/png # NetBSD: -#PNGLIB_DIR = $(LOCALBASE)/lib -#PNGHDR_DIR = $(LOCALBASE)/include +PNGLIB_DIR = $(LOCALBASE)/lib +PNGHDR_DIR = $(LOCALBASE)/include # OSF/Tru64: #PNGLIB_DIR = /usr/local1/DEC/lib #PNGHDR_DIR = /usr/local1/DEC/include @@ -317,7 +321,7 @@ # network functions is the option in ppmtompeg to run it on multiple # computers simultaneously. -NETWORKLD = +#NETWORKLD = # Solaris, SunOS: #NETWORKLD = -lsocket -lnsl # Don't build network functions: @@ -364,7 +368,7 @@ #INSTALL_PREFIX = /djgpp # Typical: #INSTALL_PREFIX = /usr/local/ -INSTALL_PREFIX = /usr/local/netpbm +INSTALL_PREFIX = ${PREFIX} # Specify the directory where you want the executables. # If you need scripts and binaries to be in different directories, you