]>
Commit | Line | Data |
---|---|---|
1 | #! /usr/bin/sh | |
2 | ||
3 | cat > Config.tmp << '@END' | |
4 | # | |
5 | # Copyright (C) 1995 by Ke Jin <kejin@empress.com> | |
6 | # | |
7 | ||
8 | #============ Default for all system ============== | |
9 | SHELL = | |
10 | SHELL = /bin/sh | |
11 | DLDAPI = DLDAPI_SVR4_DLFCN | |
12 | DLSUFFIX= so | |
13 | OUTFILE = iodbc | |
14 | OBJX = | |
15 | @END | |
16 | ||
17 | \rm -f Makefile.tmp | |
18 | cat > Makefile.tmp <<'@END' | |
19 | include Version.mk | |
20 | include Config.mk | |
21 | @END | |
22 | ||
23 | case $1 in | |
24 | sun4) | |
25 | cat >> Config.tmp << '@END' | |
26 | ||
27 | #============ SunOS 4.1.x ========================= | |
28 | PIC = -pic | |
29 | CC = acc | |
30 | LIBS = -ldl | |
31 | @END | |
32 | ;; | |
33 | ||
34 | aix) | |
35 | cat >> Config.tmp << '@END' | |
36 | ||
37 | #=========== AIX 3.x 4.x ========================== | |
38 | DLDAPI = DLDAPI_AIX_LOAD | |
39 | ANSI = -langlvl=ansi | |
40 | LDFLAGS = -H512 -T512 -bE:shrsub.exp -bM:SRE | |
41 | LIBS = -lc | |
42 | OBJX = main.o | |
43 | DLSUFFIX= s.o | |
44 | CFLAGSX = -DCLI_NAME_PREFIX=\".SQL\" | |
45 | @END | |
46 | ;; | |
47 | ||
48 | hp300 | hp400) | |
49 | cat >> Config.tmp << '@END' | |
50 | ||
51 | #============ HP/UX (s300/s400) 9.x 10.x ========== | |
52 | DLDAPI = DLDAPI_HP_SHL | |
53 | ANSI = -Aa | |
54 | PIC = +z | |
55 | LDFLAGS = -b | |
56 | DLSUFFIX= sl | |
57 | CFLAGSX = -D_INCLUDE_POSIX_SOURCE -DCLI_NAME_PREFIX=\"_SQL\" | |
58 | @END | |
59 | ;; | |
60 | ||
61 | hp700 | hp800) | |
62 | cat >> Config.tmp << '@END' | |
63 | ||
64 | #============ HP/UX 9000(s700/s800) 9.x 10.x ====== | |
65 | DLDAPI = DLDAPI_HP_SHL | |
66 | ANSI = -Aa | |
67 | PIC = +z | |
68 | LDFLAGS = -b | |
69 | LIBS = -lc -ldld | |
70 | DLSUFFIX= sl | |
71 | CFLAGSX = -D_INCLUDE_POSIX_SOURCE | |
72 | @END | |
73 | ;; | |
74 | ||
75 | solaris) | |
76 | cat >> Config.tmp << '@END' | |
77 | ||
78 | #======= Solaris 2.x, SunOS 5.x (Sparc/x86) ======= | |
79 | LDFLAGS = -G -z defs | |
80 | LIBS = -lc -ldl -lnsl | |
81 | @END | |
82 | ;; | |
83 | ||
84 | ncr |gis) | |
85 | cat >> Config.tmp << '@END' | |
86 | ||
87 | #============= NCR SVR4 3.x ======================= | |
88 | PIC = -KPIC | |
89 | LDFLAGS = -G -z defs | |
90 | LIBS = -lc -ldl | |
91 | @END | |
92 | ;; | |
93 | ||
94 | unixware) | |
95 | cat >> Config.tmp << '@END' | |
96 | ||
97 | #========= UnixWare SVR4 1.x, 2.x ================= | |
98 | PIC = -KPIC | |
99 | LDFLAGS = -G -z defs | |
100 | LIBS = -lc -ldl | |
101 | @END | |
102 | ;; | |
103 | ||
104 | maxos) | |
105 | cat >> Config.tmp << '@END' | |
106 | ||
107 | #============ Concurrent Maxion MAX/OS 1.x ======== | |
108 | PIC = -KPIC | |
109 | LDFLAGS = -G -z defs | |
110 | LIBS = -lc -ldl | |
111 | @END | |
112 | ;; | |
113 | ||
114 | sco-opensrv | sco-osr5 ) | |
115 | cat >> Config.tmp << '@END' | |
116 | ||
117 | #============ SCO OpenServer 5.x ================== | |
118 | PIC = -K PIC -b elf | |
119 | LDFLAGS = -G -z defs | |
120 | LIBS = -lc -ldl | |
121 | @END | |
122 | ;; | |
123 | ||
124 | dgux) | |
125 | cat >> Config.tmp << '@END' | |
126 | ||
127 | #============ DG/UX 5.x =========================== | |
128 | PIC = -K PIC | |
129 | LDFLAGS = -G -z defs | |
130 | LIBS = -lc -ldl | |
131 | @END | |
132 | ;; | |
133 | ||
134 | freebsd) | |
135 | cat >> Config.tmp << '@END' | |
136 | ||
137 | #============= FreeBSD 2.x ======================== | |
138 | PIC = -fPIC | |
139 | CFLAGSX = -DCLI_NAME_PREFIX=\"_SQL\" | |
140 | LDFLAGS = -Bshareable | |
141 | LIBS = -lc | |
142 | @END | |
143 | ||
144 | \rm -f Makefile.tmp | |
145 | cat > Makefile.tmp <<'@END' | |
146 | .include "Version.mk" | |
147 | .include "Config.mk" | |
148 | @END | |
149 | ;; | |
150 | ||
151 | bsd-os) | |
152 | cat >> Config.tmp << '@END' | |
153 | ||
154 | #============ BSDI BSD/OS 2.x ===================== | |
155 | # | |
156 | # ported by: Stuart Hayton <stuey@clic.co.uk> | |
157 | # | |
158 | CC = gcc | |
159 | LDFLAGS = -r | |
160 | LDSUFFIX= o | |
161 | LIBS = -lc_s.2.0 -ldl | |
162 | @END | |
163 | ;; | |
164 | ||
165 | linux-elf) | |
166 | cat >> Config.tmp << '@END' | |
167 | ||
168 | #============= Linux ELF ========================= | |
169 | # Slackware 2.x,(kernel 1.3.x) on i386 | |
170 | # Red Hat 2.x (kernel 1.2.x) on i486 | |
171 | # | |
172 | ANSI = -ansi | |
173 | CC = gcc | |
174 | PIC = -fPIC | |
175 | LDFLAGS = -shared | |
176 | LIBS = -ldl | |
177 | @END | |
178 | ;; | |
179 | ||
180 | irix5| irix6) | |
181 | cat >> Config.tmp << '@END' | |
182 | ||
183 | #============= SGI IRIX 5.x, 6.x ================= | |
184 | LDFLAGS = -shared | |
185 | LIBS = -lc | |
186 | @END | |
187 | ;; | |
188 | ||
189 | dec-osf1 | dec-unix) | |
190 | cat >> Config.tmp << '@END' | |
191 | ||
192 | #============= DEC Unix(OSF/1) 3.x, 4.x ========== | |
193 | LDFLAGS = -shared | |
194 | LIBS = -lc | |
195 | @END | |
196 | ;; | |
197 | *) | |
198 | cat << '@END' | |
199 | ||
200 | Usage: autoconfig <platform_opt> or | |
201 | build <platform_opt> | |
202 | ||
203 | platform_opt: | |
204 | ||
205 | sun4 -- SunOS 4.1.x | |
206 | aix -- IBM AIX 3.x, 4.x | |
207 | hp300, hp400 -- HP/UX 9.x, 10.x on 9000 s300/s400 | |
208 | hp700, hp800 -- HP/UX 9.x, 10.x on 9000 s700/s800 | |
209 | solaris -- Sun Solaris 2.x, SunOS 5.x | |
210 | ncr, gis -- NCR(GIS) SVR4 3.x | |
211 | unixware -- Novell UnixWare 1.x, 2.x | |
212 | maxos -- Concurrent MAX/OS SVR4 1.x | |
213 | sco-osr5 -- SCO Open Server 5.x | |
214 | dgux -- DG/UX 5.x | |
215 | freebsd -- FreeBSD 2.x | |
216 | bsd-os -- BSDI BSD/OS 2.x | |
217 | linux-elf -- Linux ELF 1.2.x and up | |
218 | irix5, irix6 -- SGI Irix 5.x, 6.x | |
219 | dec-osf1 -- DEC Unix(OSF/1) 3.x, 4.x | |
220 | ||
221 | @END | |
222 | \rm -f Config.tmp | |
223 | \rm -f Makefile.tmp | |
224 | exit 1 | |
225 | ;; | |
226 | esac | |
227 | \mv -f Config.tmp Config.mk | |
228 | sed -e 's/.include.*//' -e 's/include.*//' Makefile >> Makefile.tmp | |
229 | \mv -f Makefile.tmp Makefile | |
230 | exit 0 |