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.
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.
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.
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.
19 # Here are the options the user chose on 'configure':
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@
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@
31 HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFINE@
33 # Stuff 'configure' figured out about our build platform:
43 INSTALL = $(SRCDIR)/install-sh
45 C_COMPILER_GNU = @C_COMPILER_GNU@
46 CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
48 # Stuff 'configure' figured out via AC_CANONICAL_HOST macro in configure.in
49 # and config.guess program and 'configure' command options:
51 # HOST_OS names the operating system on which Xmlrpc-c is to run.
55 # Hardcoded in configure.in:
56 XMLRPC_C_VERSION = @VERSION@
58 ###############################################################################
60 MUST_BUILD_CLIENT = no
61 ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
62 MUST_BUILD_CLIENT = yes
64 ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
65 MUST_BUILD_CLIENT = yes
67 ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
68 MUST_BUILD_CLIENT = yes
72 ##############################################################################
73 # SHARED LIBRARY STUFF
74 ##############################################################################
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
90 # First, we break down shared library schemes into a few major types,
91 # and indicate the type by SHARED_LIB_TYPE.
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:
96 # CFLAGS_SHLIB is a set of flags needed to compile a module which will
97 # become part of a shared library.
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.
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.
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:
123 # -lc; relocations referenced ; from file(s) /usr/ccs/lib/libc.so(random.o);
124 # fatal error: relocations remain against allocatable but non-writable
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.
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).
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
139 ifeq ($(HOST_OS),linux-gnu)
140 # Assume linker is GNU Compiler (gcc)
141 SHARED_LIB_TYPE = unix
144 LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
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
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)
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
163 LDFLAGS_SHLIB = -qmkshrobj
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
171 LDFLAGS_SHLIB = -shared -n32
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
179 LDFLAGS_SHLIB: -shared -fPIC
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
187 LDFLAGS_SHLIB = -shared -expect_unresolved
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
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
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
210 LDFLAGS_SHLIB = -nostart
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
220 ##############################################################################
222 ##############################################################################
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.
230 # The cross compiling user can update Makefile.config or override
231 # BUILDTOOL_CC on a make command.
234 BUILDTOOL_CCLD = $(CCLD)
236 # Here are the commands 'make install' uses to install various kinds of files:
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
243 # Here are the locations at which 'make install' puts files:
245 # DESTDIR is designed to be overriden at make time in order to relocate
246 # the entire install into a subdirectory.
249 exec_prefix = @exec_prefix@
251 LIBINST_DIR = @libdir@
252 HEADERINST_DIR = @includedir@
253 PROGRAMINST_DIR = @bindir@