summaryrefslogtreecommitdiff
path: root/graphics/netpbm/patches/patch-aa
blob: 143094657320b2907619e3fb6817697ddb7ba36f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
$NetBSD: patch-aa,v 1.35 2006/02/27 22:01:16 adam Exp $

--- Makefile.config.in.orig	2006-01-03 01:15:17.000000000 +0100
+++ Makefile.config.in
@@ -24,7 +24,7 @@ DEFAULT_TARGET = nonmerge
 # and skip it on those systems unless you want to debug it and fix it.
 # OpenBSD:
 #BUILD_FIASCO = N
-BUILD_FIASCO = Y
+BUILD_FIASCO?= Y
 
 # The following are commands for the build process to use.  These values
 # do not get built into anything.
@@ -33,7 +33,7 @@ BUILD_FIASCO = Y
 #CC = gcc
 # Note that 'cc' is usually an alias for whatever is the main compiler
 # on a system, e.g. the GNU Compiler on Linux.
-CC = cc
+#CC = cc
 
 # The linker.
 LD = $(CC)
@@ -99,7 +99,7 @@ CFLAGS_FOR_BUILD = $(CFLAGS)
 
 # 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:
@@ -111,7 +111,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s
 
 # 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 = 
 
@@ -130,8 +130,10 @@ MANPAGE_FORMAT = nroff
 AR = ar
 RANLIB = ranlib
 # IRIX, SCO don't have Ranlib:
-#RANLIB = true
-LEX = flex
+ifeq ($(OPSYS),IRIX)
+RANLIB = ar rs
+endif
+#LEX = flex
 # Solaris:
 # LEX = flex -e
 # Or just skip parts that need Lex:
@@ -219,7 +221,7 @@ EXE =
 
 # 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 = -shared -Wl,-h,$(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.
@@ -252,6 +254,18 @@ LDRELOC = NONE
 #LDRELOC = ld --reloc
 #LDRELOC = ld -r
 
+ifeq ($(OPSYS),SunOS)
+LDSHLIB = -Wl,-B,dynamic,-G,-h,$(SONAME) 
+endif
+
+ifeq ($(OPSYS),Darwin)
+LDSHLIB = -dynamiclib -install_name $(NETPBM_RUNTIME_PATH)/libnetpbm.$(MAJ).dylib
+endif
+
+ifeq ($(OPSYS),Interix)
+# random base address between 0x6B000000 and 0x6D000000
+LDSHLIB+= -Wl,--image-base,$$(($$RANDOM %64/2*1048576+1795162112))
+endif
 
 # On older systems, you have to make shared libraries out of position
 # independent code, so you need -fpic or fPIC here.  (The rule is: if
@@ -274,11 +288,23 @@ LDRELOC = NONE
 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
 
+ifeq ($(OPSYS),Darwin)
+CFLAGS_SHLIB = -fno-common
+endif
+
+ifeq ($(OPSYS),IRIX)
+CFLAGS_SHLIB = -KPIC
+endif
+
+ifeq ($(OPSYS),Interix)
+CFLAGS_SHLIB = # none!
+endif
+
 # SHLIB_CLIB is the link option to include the C library in a shared library,
 # normally "-lc".  On typical systems, this serves no purpose.  On some,
 # though, it causes information about which C library to use to be recorded
@@ -347,8 +373,8 @@ TIFFHDR_DIR =
 #TIFFLIB = libtiff.so
 #TIFFHDR_DIR = /usr/include/libtiff
 #NetBSD:
-#TIFFLIB = $(LOCALBASE)/lib/libtiff.so
-#TIFFHDR_DIR = $(LOCALBASE)/include
+TIFFLIB = $(BUILDLINK_DIR)/lib/libtiff.so
+TIFFHDR_DIR = $(BUILDLINK_DIR)/include
 # OSF, Tru64:
 #TIFFLIB = /usr/local1/DEC/lib/libtiff.so
 #TIFFHDR_DIR = /usr/local1/DEC/include
@@ -378,8 +404,8 @@ JPEGHDR_DIR =
 #JPEGLIB = libjpeg.so
 #JPEGHDR_DIR = /usr/include/jpeg
 # Netbsd:
-#JPEGLIB = ${LOCALBASE}/lib/libjpeg.so
-#JPEGHDR_DIR = ${LOCALBASE}/include
+JPEGLIB = ${BUILDLINK_DIR}/lib/libjpeg.so
+JPEGHDR_DIR = ${BUILDLINK_DIR}/include
 # OSF, Tru64:
 #JPEGLIB = /usr/local1/DEC/libjpeg.so
 #JPEGHDR_DIR = /usr/local1/DEC/include
@@ -403,8 +429,8 @@ PNGVER = 
 #PNGLIB = libpng$(PNGVER).so
 #PNGHDR_DIR = /usr/include/libpng$(PNGVER)
 # NetBSD:
-#PNGLIB = $(LOCALBASE)/lib/libpng$(PNGVER).so
-#PNGHDR_DIR = $(LOCALBASE)/include
+PNGLIB = $(BUILDLINK_DIR)/lib/libpng$(PNGVER).so
+PNGHDR_DIR = $(BUILDLINK_DIR)/include
 # OSF/Tru64:
 #PNGLIB = /usr/local1/DEC/lib/libpng$(PNGVER).so
 #PNGHDR_DIR = /usr/local1/DEC/include
@@ -414,8 +440,8 @@ PNGVER = 
 # NONE for the PNG library, it doesn't matter what you specify here --
 # it won't get used.
 
-ZLIB = NONE
-ZHDR_DIR = 
+ZLIB = $(BUILDLINK_DIR)/lib/libz.so
+ZHDR_DIR = $(BUILDLINK_DIR)/include
 #ZLIB = libz.so
 
 # The JBIG lossless image compression library (aka JBIG-KIT):
@@ -424,8 +450,8 @@ JBIGLIB = $(BUILDDIR)/converter/other/jb
 JBIGHDR_DIR = $(SRCDIR)/converter/other/jbig
 
 # The Jasper JPEG-2000 image compression library (aka JasPer):
-JASPERLIB = $(INTERNAL_JASPERLIB)
-JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR)
+#JASPERLIB = $(INTERNAL_JASPERLIB)
+#JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR)
 # JASPERDEPLIBS is the libraries (-l options or file names) on which
 # The Jasper library depends -- i.e. what you have to link into any
 # executable that links in the Jasper library.
@@ -461,7 +487,7 @@ OMIT_NETWORK =
 # built into the standard C library, so this can be null.  This is irrelevant
 # if OMIT_NETWORK is "y".
 
-NETWORKLD = 
+#NETWORKLD = 
 # Solaris, SunOS:
 #NETWORKLD = -lsocket -lnsl
 # SCO: