Lines Matching +full:cmake +full:- +full:options
1 ** This file is adapted from libcurl and not yet fully rewritten for c-ares! **
15 Lots of people download binary distributions of c-ares. This document
16 does not describe how to install c-ares using such a binary package.
17 This document describes how to compile, build and install c-ares from
24 release tarball, see the [GIT-INFO](GIT-INFO) file in the root directory
27 In particular, if not using CMake you will need to run `./buildconf` (Unix) or
29 you will need a local installation of Autotools. If using CMake the steps are
47 [GIT-INFO](GIT_INFO) on how to proceed.
49 Get a full listing of all available configure options by invoking it like:
51 ./configure --help
53 If you want to install c-ares in a different file hierarchy than /usr/local,
56 ./configure --prefix=/path/to/c-ares/tree
62 ./configure --prefix=$HOME
66 ### More Options
78 ./configure --disable-shared
80 If you're a c-ares developer and use gcc, you might want to enable more
81 debug options with the `--enable-debug` option.
85 Some versions of uClibc require configuring with `CPPFLAGS=-D_GNU_SOURCE=1`
90 ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
91 RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
99 Download and unpack the c-ares package.
101 `cd` to the new directory. (e.g. `cd c-ares-1.7.6`)
103 Set environment variables to point to the cross-compile toolchain and call
104 configure with any options you need. Be sure and specify the `--host` and
105 `--build` parameters at configuration time. The following script is an
106 example of cross-compiling for the IBM 405GP PowerPC processor using the
113 export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
114 export AR=ppc_405-ar
115 export AS=ppc_405-as
116 export LD=ppc_405-ld
117 export RANLIB=ppc_405-ranlib
118 export CC=ppc_405-gcc
119 export NM=ppc_405-nm
121 ./configure --target=powerpc-hardhat-linux \
122 --host=powerpc-hardhat-linux \
123 --build=i586-pc-linux-gnu \
124 --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \
125 --exec-prefix=/usr/local
128 You may also need to provide a parameter like `--with-random=/dev/urandom`
130 generating device for a target system. The `--prefix` parameter
131 specifies where c-ares will be installed. If `configure` completes
137 ./configure --host=ARCH-OS
143 c-ares root with `sh configure`. Make sure you have the sh executable in
155 to 32. Socket descriptors returned within the c-ares library may exceed this,
159 A good all-round solution to this is to override the default when building
160 c-ares, by overriding `CFLAGS` during configure, example:
162 # configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
167 The library can be cross-compiled using gccsdk as follows:
169 CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
170 --host=arm-riscos-aof --without-random --disable-shared
173 where `riscos-gcc` and `riscos-ar` are links to the gccsdk tools.
174 You can then link your program with `c-ares/lib/.libs/libcares.a`.
179 Method using a configure cross-compile (tested with Android NDK r7b):
181 - prepare the toolchain of the Android NDK for standalone use; this can
184 ./tools/make-standalone-toolchain.sh
186 which creates a usual cross-compile toolchain. Lets assume that you put
191 export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
192 ./configure --host=arm-linux-androideabi [more configure options]
195 - if you want to compile directly from our GIT repo you might run into
200 Invalid configuration `arm-linux-androideabi':
202 configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
207 you need to replace your system-own versions which usually can be
209 `find /usr -name config.sub`
212 CMake builds
215 Current releases of c-ares introduce a CMake v3+ build system that has been
219 In the most basic form, building with CMake might look like:
222 cd /path/to/cmake/source
225 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/cares ..
230 Options section in CMake builds
231 -------
233 Options to CMake are passed on the command line using "-D${OPTION}=${VALUE}".
236 * CARES_STATIC - Build the static library (off by default)
237 * CARES_SHARED - Build the shared library (on by default)
238 * CARES_INSTALL - Hook in installation, useful to disable if chain building
239 * CARES_STATIC_PIC - Build the static library as position-independent (off by
244 -----
246 Ninja is the next-generation build system meant for generators like CMake that
250 cd /path/to/cmake/source
253 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/cares -G "Ninja" ..
259 -------------------------
262 cd \path\to\cmake\source
265 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\cares -G "NMake Makefiles" ..
270 Windows MinGW-w64 Command Line via MSYS
271 ---------------------------------------
273 cd \path\to\cmake\source
276 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\cares -G "MSYS Makefiles" ..
282 Platform-specific build systems
286 -----
288 ### Building Windows DLLs and C run-time (CRT) linkage issues
299 - [KB94248](http://support.microsoft.com/kb/94248/en-us) - How To Use the C Run-Time
301 …- [KB140584](http://support.microsoft.com/kb/140584/en-us) - How to link with the correct C Run-Ti…
303 …- [KB190799](http://msdn.microsoft.com/en-us/library/ms235460) - Potential Errors Passing CRT Obje…
317 then run 'make -f Makefile.m32' in the root dir.
323 http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
336 ### Important static c-ares usage note
338 When building an application that uses the static c-ares library, you must
339 add `-DCARES_STATICLIB` to your `CFLAGS`. Otherwise the linker will look for
344 --------
349 - emx 0.9d
350 - GNU make
351 - GNU patch
352 - ksh
353 - GNU bison
354 - GNU file utilities
355 - GNU sed
356 - autoconf 2.13
359 symbol referenced from the text segment, you need to add `-D__ST_MT_ERRNO__`
362 If you're getting huge binaries, probably your makefiles have the `-g` in
367 -------
371 - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
372 - gnu make and awk running on the platform you compile on;
375 - recent Novell LibC SDK available from:
377 - or recent Novell CLib SDK available from:
383 `make -f Makefile.netware` from the top source directory;
390 that c-ares has been compiled for. If you know a system c-ares compiles and
393 - Alpha Tru64 v5.0 5.1
394 - ARM Android 1.5, 2.1, 2.3
395 - MIPS IRIX 6.2, 6.5
396 - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
397 - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
398 - i386 Novell NetWare
399 - i386 Windows 95, 98, ME, NT, 2000, XP, 2003
400 - x86_64 Linux
406 - c-ares: https://c-ares.org/
407 - MingW: http://www.mingw.org/
408 - MinGW-w64: http://mingw-w64.sourceforge.net/
409 - OpenWatcom: http://www.openwatcom.org/