initial load of upstream version 1.06.32
[xmlrpc-c] / Makefile.config.in
1 # Makefile.config is generated by 'configure' using Makefile.config.in
2 # as a template and information that 'configure' gathers from the build
3 # system and from user options.
4
5 # Makefile.config should someday replace most of the other files that
6 # 'configure' generates, thus simplifying development and customization.
7 # Makefile.config is intended to contain information specific to the
8 # particular build environment or user build choices.
9
10 # Furthermore, most of the logic in 'configure', and thus 'configure.in',
11 # should go into the make files to simplify the build.  Makefile.config
12 # should just pass raw configure variables through to the make file.
13
14 # Tokens of the form @TOKEN@ in the template file get replaced by
15 # 'configure' with the values of variables of the same name within
16 # 'configure', because of a AC_SUBST(TOKEN) statement in the
17 # 'configure.in' from which 'configure' was built.
18
19 # Here are the options the user chose on 'configure':
20
21 ENABLE_ABYSS_SERVER    = @ENABLE_ABYSS_SERVER@
22 ENABLE_ABYSS_THREADS   = @ENABLE_ABYSS_THREADS@
23 ENABLE_CPLUSPLUS       = @ENABLE_CPLUSPLUS@
24 ENABLE_CGI_SERVER      = @ENABLE_CGI_SERVER@
25 ENABLE_LIBXML2_BACKEND = @ENABLE_LIBXML2_BACKEND@
26
27 MUST_BUILD_WININET_CLIENT = @MUST_BUILD_WININET_CLIENT@
28 MUST_BUILD_CURL_CLIENT    = @MUST_BUILD_CURL_CLIENT@
29 MUST_BUILD_LIBWWW_CLIENT  = @MUST_BUILD_LIBWWW_CLIENT@
30
31 HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFINE@
32
33 # Stuff 'configure' figured out about our build platform:
34
35 SHELL = @SHELL@
36 CC = @CC@
37 CXX = @CXX@
38 CCLD = $(CC)
39 CXXLD = $(CXX)
40 AR = ar
41 RANLIB = @RANLIB@
42 LN_S = @LN_S@
43 INSTALL = $(SRCDIR)/install-sh
44
45 C_COMPILER_GNU = @C_COMPILER_GNU@
46 CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
47
48 # Stuff 'configure' figured out via AC_CANONICAL_HOST macro in configure.in
49 # and config.guess program and 'configure' command options:
50
51 # HOST_OS names the operating system on which Xmlrpc-c is to run.
52 # E.g. "linux-gnu".
53 HOST_OS = @host_os@
54
55 # Hardcoded in configure.in:
56 XMLRPC_C_VERSION = @VERSION@
57
58 ###############################################################################
59
60 MUST_BUILD_CLIENT = no
61 ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
62   MUST_BUILD_CLIENT = yes
63 endif
64 ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
65   MUST_BUILD_CLIENT = yes
66 endif
67 ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
68   MUST_BUILD_CLIENT = yes
69 endif
70
71
72 ##############################################################################
73 # SHARED LIBRARY STUFF
74 ##############################################################################
75
76 # Shared libraries are very difficult, because how you build and use
77 # them varies greatly from one platform to the next.  # There are two
78 # ways shared libraries get built in the Xmlrpc-c build: Libtool and
79 # direct.  In the beginning, there was just Libtool.  Libtool is
80 # supposed to solve the problem of the diversity of shared libraries,
81 # but it does it by adding a layer of complexity and yet another build
82 # tool a developer has to know.  The encapsulation of shared library
83 # building reduced flexibility and makes diagnosing problems much
84 # harder.  So we are phasing out Libtool.  New libraries (in
85 # particular, the C++ ones) don't involve Libtool.  Some day, the
86 # older ones won't either, but we aren't as good yet with the direct
87 # method as with Libtool, and we don't want to break something that's
88 # working.
89
90 # First, we break down shared library schemes into a few major types,
91 # and indicate the type by SHARED_LIB_TYPE.
92
93 # We also have a bunch of other make variables that reflect the different
94 # ways we have to build on and for different platforms:
95
96 # CFLAGS_SHLIB is a set of flags needed to compile a module which will
97 # become part of a shared library.
98
99 # On older systems, you have to make shared libraries out of position
100 # independent code, so you need -fpic or -fPIC here.  (The rule is: if
101 # -fpic works, use it.  If it bombs, go to -fPIC).  On newer systems,
102 # it isn't necessary, but can save real memory at the expense of
103 # execution speed.  Without position independent code, the library
104 # loader may have to patch addresses into the executable text.  On an
105 # older system, this would cause a program crash because the loader
106 # would be writing into read-only shared memory.  But on newer
107 # systems, the system silently creates a private mapping of the page
108 # or segment being modified (the "copy on write" phenomenon).  So it
109 # needs its own private real page frame.
110
111 # We have seen -fPIC required on IA64 and AMD64 machines (GNU
112 # compiler/linker).  Build-time linking fails without it.  I don't
113 # know why -- history seems to be repeating itself.  2005.02.23.
114
115 # SHLIB_CLIB is the link option to include the C library in a shared library,
116 # normally "-lc".  On typical systems, this serves no purpose.  On some,
117 # though, it causes information about which C library to use to be recorded
118 # in the shared library and thus choose the correct library among several or
119 # avoid using an incompatible one.  But on some systems, the link fails.
120 # On 2002.09.30, "John H. DuBois III" <spcecdt@armory.com> reports that on 
121 # SCO OpenServer, he gets the following error message with -lc:
122 #
123 #  -lc; relocations referenced  ;  from file(s) /usr/ccs/lib/libc.so(random.o);
124 #   fatal error: relocations remain against allocatable but non-writable 
125 #   section: ; .text
126 #
127 # On Bryan's system, with gcc 2.95.3 and glibc 2.2.2, -lc causes
128 # throws (from anywhere in a program that links the shared library)
129 # not to work.  I have no idea how.
130
131 # LDFLAGS_SHLIB is the linker (Ld) flags needed to generate a shared
132 # library from object files.  It may use $(SONAME) as the soname for
133 # the shared library being created (assuming sonames exist).
134
135 # We build shared libraries only for platforms for which we've figured
136 # out how.  For the rest, we have this default:
137 SHARED_LIB_TYPE = NONE
138
139 ifeq ($(HOST_OS),linux-gnu)
140   # Assume linker is GNU Compiler (gcc)
141   SHARED_LIB_TYPE = unix
142   SHLIB_SUFFIX = so
143 #  SHLIB_CLIB = -lc
144   LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
145 endif
146
147 ifeq ($(findstring solaris,$(HOST_OS)),solaris)
148   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
149   # If you can finish it and make it work on AIX, please do.
150   # SHARED_LIB_TYPE = unix
151   SHLIB_SUFFIX = so
152   # Solaris compiler can't take multiple ld options as -Wl,-a,-b .  Ld sees
153   # -a,-b in that case.
154   LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME)
155   CFLAGS_SHLIB = -Kpic
156 endif
157
158 ifeq ($(HOST_OS),aix)
159   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
160   # If you can finish it and make it work on AIX, please do.
161   # SHARED_LIB_TYPE = unix
162   SHLIB_SUFFIX = a
163   LDFLAGS_SHLIB = -qmkshrobj
164 endif
165
166 ifeq ($(HOST_OS),irix)
167   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
168   # If you can finish it and make it work on AIX, please do.
169   # SHARED_LIB_TYPE = irix
170   SHLIB_SUFFIX = so
171   LDFLAGS_SHLIB = -shared -n32
172 endif
173
174 ifeq ($(HOST_OS),hpux)
175   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
176   # If you can finish it and make it work on AIX, please do.
177   # SHARED_LIB_TYPE = unix
178   SHLIB_SUFFIX = sl
179   LDFLAGS_SHLIB: -shared -fPIC
180 endif
181
182 ifeq ($(HOST_OS),osf)
183   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
184   # If you can finish it and make it work on AIX, please do.
185   # SHARED_LIB_TYPE = unix
186   SHLIB_SUFFIX = so
187   LDFLAGS_SHLIB = -shared -expect_unresolved
188 endif
189
190 ifeq ($(findstring netbsd,$(HOST_OS)),netbsd)
191   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
192   # If you can finish it and make it work on AIX, please do.
193   # SHARED_LIB_TYPE = unix
194   SHLIB_SUFFIX = so
195   CFLAGS_SHLIB = -fpic
196 endif
197
198 ifeq ($(HOST_OS),darwin)
199   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
200   # If you can finish it and make it work on AIX, please do.
201   # SHARED_LIB_TYPE = dylib
202   SHLIB_SUFFIX = dylib
203 endif
204
205 ifeq ($(HOST_OS),beos)
206   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
207   # If you can finish it and make it work on AIX, please do.
208   # SHARED_LIB_TYPE = unix
209   SHLIB_SUFFIX = so
210   LDFLAGS_SHLIB = -nostart
211 endif
212
213 ifeq ($(HOST_OS),cygwin)
214   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
215   # If you can finish it and make it work on AIX, please do.
216   # SHARED_LIB_TYPE = dll
217   SHLIB_SUFFIX = dll
218 endif
219
220 ##############################################################################
221 #                     MISCELLANEOUS
222 ##############################################################################
223
224 # BUILDTOOL_CC is the compiler to use to generate build tools, which we
225 # will then run to build product.  The typical reason this would be
226 # different from CC is that you're cross-compiling: the product will run
227 # in Environment A, but you're building in Environment B, so you must
228 # build the build toos for Environment B.
229
230 # The cross compiling user can update Makefile.config or override
231 # BUILDTOOL_CC on a make command.
232
233 BUILDTOOL_CC = $(CC)
234 BUILDTOOL_CCLD = $(CCLD)
235
236 # Here are the commands 'make install' uses to install various kinds of files:
237
238 INSTALL_PROGRAM = $(INSTALL) -c -m 755
239 INSTALL_SHLIB = $(INSTALL) -c -m 755
240 INSTALL_DATA = $(INSTALL) -c -m 644
241 INSTALL_SCRIPT = $(INSTALL) -c -m 755
242
243 # Here are the locations at which 'make install' puts files:
244
245 # DESTDIR is designed to be overriden at make time in order to relocate
246 # the entire install into a subdirectory.
247 DESTDIR =
248
249 exec_prefix = @exec_prefix@
250 prefix = @prefix@
251 LIBINST_DIR = @libdir@
252 HEADERINST_DIR = @includedir@
253 PROGRAMINST_DIR = @bindir@