1 $NetBSD: patch-aa,v 1.40 2010/02/19 18:25:44 drochner Exp $
3 --- Makefile.config.in.orig 2008-12-07 01:58:20.000000000 +0000
5 @@ -24,7 +24,7 @@ DEFAULT_TARGET = nonmerge
6 # and skip it on those systems unless you want to debug it and fix it.
12 # The following are commands for the build process to use. These values
13 # do not get built into anything.
14 @@ -33,7 +33,7 @@ BUILD_FIASCO = Y
16 # Note that 'cc' is usually an alias for whatever is the main compiler
17 # on a system, e.g. the GNU Compiler on Linux.
23 @@ -100,7 +100,7 @@ CFLAGS_FOR_BUILD = $(CFLAGS)
25 # MAKE is set automatically by Make to what was used to invoke Make.
27 -INSTALL = $(SRCDIR)/buildtools/install.sh
28 +#INSTALL = $(SRCDIR)/buildtools/install.sh
30 #INSTALL = /usr/ucb/install
32 @@ -112,7 +112,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s
34 # STRIPFLAG is the option you pass to the above install program to make it
35 # strip unnecessary information out of binaries.
38 # If you don't want to strip the binaries, just leave it null:
41 @@ -131,13 +131,15 @@ MANPAGE_FORMAT = nroff
44 # IRIX, SCO don't have Ranlib:
50 # LEX is the beginning of a shell command that runs a Lex-like
51 # pattern matcher generator. Null string means there isn't any such
52 # command. That means the build will skip parts that need one.
59 @@ -228,7 +230,7 @@ EXE =
61 # Here, $(SONAME) resolves to the soname for the shared library being created.
62 # The following are gcc options. This works on GNU libc systems.
63 -LDSHLIB = -shared -Wl,-soname,$(SONAME)
64 +LDSHLIB = -shared -Wl,-h,$(SONAME)
65 # You need -nostart instead of -shared on BeOS. Though the BeOS compiler is
66 # ostensibly gcc, it has the -nostart option, which is not mentioned in gcc
67 # documentation and doesn't exist in at least one non-BeOS installation.
68 @@ -261,6 +263,19 @@ LDRELOC = NONE
72 +ifeq ($(OPSYS),SunOS)
73 +LDSHLIB = -Wl,-B,dynamic,-G,-h,$(SONAME)
76 +ifeq ($(OPSYS),Darwin)
77 +LDSHLIB = -dynamiclib -install_name $(PREFIX)/lib/libnetpbm.$(MAJ).dylib \
78 + -compatibility_version $(MAJ) -current_version $(MAJ).$(MIN)
81 +ifeq ($(OPSYS),Interix)
82 +# random base address between 0x6B000000 and 0x6D000000
83 +LDSHLIB+= -Wl,--image-base,$$(($$RANDOM %64/2*1048576+1795162112))
86 # On older systems, you have to make shared libraries out of position
87 # independent code, so you need -fpic or fPIC here. (The rule is: if
88 @@ -283,11 +298,23 @@ LDRELOC = NONE
92 -#CFLAGS_SHLIB = -fPIC
98 +ifeq ($(OPSYS),Darwin)
99 +CFLAGS_SHLIB = -fno-common
102 +ifeq ($(OPSYS),IRIX)
103 +CFLAGS_SHLIB = -KPIC
106 +ifeq ($(OPSYS),Interix)
107 +CFLAGS_SHLIB = # none!
110 # SHLIB_CLIB is the link option to include the C library in a shared library,
111 # normally "-lc". On typical systems, this serves no purpose. On some,
112 # though, it causes information about which C library to use to be recorded
113 @@ -356,8 +383,8 @@ TIFFHDR_DIR =
114 #TIFFLIB = libtiff.so
115 #TIFFHDR_DIR = /usr/include/libtiff
117 -#TIFFLIB = $(LOCALBASE)/lib/libtiff.so
118 -#TIFFHDR_DIR = $(LOCALBASE)/include
119 +TIFFLIB = $(BUILDLINK_DIR)/lib/libtiff.so
120 +TIFFHDR_DIR = $(BUILDLINK_DIR)/include
122 #TIFFLIB = /usr/local1/DEC/lib/libtiff.so
123 #TIFFHDR_DIR = /usr/local1/DEC/include
124 @@ -387,8 +414,8 @@ JPEGHDR_DIR =
125 #JPEGLIB = libjpeg.so
126 #JPEGHDR_DIR = /usr/include/jpeg
128 -#JPEGLIB = ${LOCALBASE}/lib/libjpeg.so
129 -#JPEGHDR_DIR = ${LOCALBASE}/include
130 +JPEGLIB = ${BUILDLINK_DIR}/lib/libjpeg.so
131 +JPEGHDR_DIR = ${BUILDLINK_DIR}/include
133 #JPEGLIB = /usr/local1/DEC/libjpeg.so
134 #JPEGHDR_DIR = /usr/local1/DEC/include
135 @@ -415,12 +442,12 @@ JPEGHDR_DIR =
141 #PNGLIB = libpng$(PNGVER).so
142 #PNGHDR_DIR = /usr/include/libpng$(PNGVER)
144 -#PNGLIB = $(LOCALBASE)/lib/libpng$(PNGVER).so
145 -#PNGHDR_DIR = $(LOCALBASE)/include
146 +PNGLIB = $(BUILDLINK_DIR)/lib/libpng$(PNGVER).so
147 +#PNGHDR_DIR = $(BUILDLINK_DIR)/include
149 #PNGLIB = /usr/local1/DEC/lib/libpng$(PNGVER).so
150 #PNGHDR_DIR = /usr/local1/DEC/include
151 @@ -432,8 +459,8 @@ PNGVER =
153 # If you have 'libpng-config' (see above), these are irrelevant.
157 +ZLIB = $(BUILDLINK_DIR)/lib/libz.so
158 +ZHDR_DIR = $(BUILDLINK_DIR)/include
161 # The JBIG lossless image compression library (aka JBIG-KIT):
162 @@ -442,8 +469,8 @@ JBIGLIB = $(BUILDDIR)/converter/other/jb
163 JBIGHDR_DIR = $(SRCDIR)/converter/other/jbig
165 # The Jasper JPEG-2000 image compression library (aka JasPer):
166 -JASPERLIB = $(INTERNAL_JASPERLIB)
167 -JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR)
168 +JASPERLIB = -ljasper
169 +JASPERHDR_DIR = /doesnt-matter
170 # JASPERDEPLIBS is the libraries (-l options or file names) on which
171 # The Jasper library depends -- i.e. what you have to link into any
172 # executable that links in the Jasper library.
173 @@ -488,7 +515,7 @@ OMIT_NETWORK =
174 # built into the standard C library, so this can be null. This is irrelevant
175 # if OMIT_NETWORK is "y".
180 #NETWORKLD = -lsocket -lnsl
182 @@ -542,7 +569,7 @@ SUFFIXMANUALS5 = 5
183 #Netpbm library functions. The value is used only in make file tests.
184 # "unixshared" means a unix-style shared library, typically named like
186 -NETPBMLIBTYPE = unixshared
187 +NETPBMLIBTYPE? = unixshared
188 # "unixstatic" means a unix-style static library, (like libxyz.a)
189 #NETPBMLIBTYPE = unixstatic
190 # "dll" means a Windows DLL shared library
191 @@ -553,7 +580,7 @@ NETPBMLIBTYPE = unixshared
192 #NETPBMLIBSUFFIX is the suffix used on whatever kind of library is
193 #selected above. All this is used for is to construct library names.
194 #The make files never examine the actual value.
195 -NETPBMLIBSUFFIX = so
196 +NETPBMLIBSUFFIX?= so
198 # "a" is the suffix for unix-style static libraries. It is also
199 # traditionally used for shared libraries on AIX. The Visual Age C