Mention OS/400 and TPF
[platform/upstream/curl.git] / docs / INSTALL
1                                   _   _ ____  _
2                               ___| | | |  _ \| |
3                              / __| | | | |_) | |
4                             | (__| |_| |  _ <| |___
5                              \___|\___/|_| \_\_____|
6
7                                 How To Compile
8
9 Installing Binary Packages
10 ==========================
11
12    Lots of people download binary distributions of curl and libcurl. This
13    document does not describe how to install curl or libcurl using such a
14    binary package. This document describes how to compile, build and install
15    curl and libcurl from source code.
16
17 UNIX
18 ====
19    A normal unix installation is made in three or four steps (after you've
20    unpacked the source archive):
21
22         ./configure
23         make
24         make test (optional)
25         make install
26
27    You probably need to be root when doing the last command.
28
29    If you have checked out the sources from the CVS repository, read the
30    CVS-INFO on how to proceed.
31
32    Get a full listing of all available configure options by invoking it like:
33
34         ./configure --help
35
36    If you want to install curl in a different file hierarchy than /usr/local,
37    you need to specify that already when running configure:
38
39         ./configure --prefix=/path/to/curl/tree
40
41    If you happen to have write permission in that directory, you can do 'make
42    install' without being root. An example of this would be to make a local
43    install in your own home directory:
44
45         ./configure --prefix=$HOME
46         make
47         make install
48
49    The configure script always tries to find a working SSL library unless
50    explicitly told not to. If you have OpenSSL installed in the default search
51    path for your compiler/linker, you don't need to do anything special. If
52    you have OpenSSL installed in /usr/local/ssl, you can run configure like:
53
54         ./configure --with-ssl
55
56    If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
57    you can run configure like this:
58
59         ./configure --with-ssl=/opt/OpenSSL
60
61    If you insist on forcing a build without SSL support, even though you may
62    have OpenSSL installed in your system, you can run configure like this:
63
64         ./configure --without-ssl
65
66    If you have OpenSSL installed, but with the libraries in one place and the
67    header files somewhere else, you have to set the LDFLAGS and CPPFLAGS
68    environment variables prior to running configure.  Something like this
69    should work:
70
71      (with the Bourne shell and its clones):
72
73        CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
74            ./configure
75
76      (with csh, tcsh and their clones):
77
78        env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
79        ./configure
80
81    If you have shared SSL libs installed in a directory where your run-time
82    linker doesn't find them (which usually causes configure failures), you can
83    provide the -R option to ld on some operating systems to set a hard-coded
84    path to the run-time linker:
85
86         LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
87
88    MORE OPTIONS
89
90      To force configure to use the standard cc compiler if both cc and gcc are
91      present, run configure like
92
93        CC=cc ./configure
94          or
95        env CC=cc ./configure
96
97      To force a static library compile, disable the shared library creation
98      by running configure like:
99
100        ./configure --disable-shared
101
102      To tell the configure script to skip searching for thread-safe functions,
103      add an option like:
104
105        ./configure --disable-thread
106
107      To build curl with kerberos4 support enabled, curl requires the krb4 libs
108      and headers installed. You can then use a set of options to tell
109      configure where those are:
110
111           --with-krb4-includes[=DIR]   Specify location of kerberos4 headers
112           --with-krb4-libs[=DIR]       Specify location of kerberos4 libs
113           --with-krb4[=DIR]            where to look for Kerberos4
114
115      In most cases, /usr/athena is the install prefix and then it works with
116
117        ./configure --with-krb4=/usr/athena
118
119      If you're a curl developer and use gcc, you might want to enable more
120      debug options with the --enable-debug option.
121
122      curl can be built to use a whole range of libraries to provide various
123      useful services, and configure will try to auto-detect a decent
124      default. But if you want to alter it, you can select how to deal with
125      each individual library.
126
127      To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
128      you need to use both --without-ssl and --with-gnutls.
129
130      To build with yassl support instead of OpenSSL or GunTLS, you must build
131      yassl with its OpenSSL emulation enabled and point to that directory root
132      with configure --with-ssl.
133
134      To build with NSS support instead of OpenSSL for SSL/TLS, note that
135      you need to use both --without-ssl and --with-nss.
136
137      To get GSSAPI support, build with --with-gssapi and have the MIT or
138      Heimdal Kerberos 5 packages installed.
139
140      To get support for SCP and SFTP, build with --with-libssh2 and have
141      libssh2 0.16 or later installed.
142      
143
144 Win32
145 =====
146
147    Building Windows DLLs and C run-time (CRT) linkage issues
148    ---------------------------------------------------------
149
150    As a general rule, building a DLL with static CRT linkage is highly
151    discouraged, and intermixing CRTs in the same app is something to
152    avoid at any cost.
153
154    Reading and comprehension of Microsoft Knowledge Base articles
155    KB94248 and KB140584 is a must for any Windows developer. Especially
156    important is full understanding if you are not going to follow the
157    advice given above.
158
159    KB94248  - How To Use the C Run-Time
160               http://support.microsoft.com/kb/94248/en-us
161
162    KB140584 - How to link with the correct C Run-Time (CRT) library
163               http://support.microsoft.com/kb/140584/en-us
164
165    If your app is misbehaving in some strange way, or it is suffering
166    from memory corruption, before asking for further help, please try
167    first to rebuild every single library your app uses as well as your
168    app using the debug multithreaded dynamic C runtime.
169
170    MingW32
171    -------
172
173    MinGW32 does not provide a batch script to set environment variables
174    automatically. Make sure that MinGW32's bin dir is in PATH and then
175    run 'mingw32-make mingw32' in the root dir. There are other make
176    targets available to build libcurl with more features, use:
177    'mingw32-make mingw32-zlib' to build with Zlib support;
178    'mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled;
179    'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib;
180    'mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib
181    and SSPI.
182
183    If you have any problems linking libraries or finding header files, be sure
184    to verify that the provided "Makefile.m32" files use the proper paths, and
185    adjust as necessary. It is also possible to override these paths with 
186    environment variables, for example:
187
188      set ZLIB_PATH=c:\zlib-1.2.3
189      set OPENSSL_PATH=c:\openssl-0.9.8e
190      set LIBSSH2_PATH=c:\libssh2-0.16
191
192    ATTENTION: if you want to build with libssh2 support you have to use latest
193    sources fetched from CVS - the current 0.15 release will NOT work!
194    Use 'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2 and SSL enabled.
195
196    Cygwin
197    ------
198
199    Almost identical to the unix installation. Run the configure script in the
200    curl root with 'sh configure'. Make sure you have the sh executable in
201    /bin/ or you'll see the configure fail toward the end.
202
203    Run 'make'
204
205    Dev-Cpp
206    -------
207
208    See the separate INSTALL.devcpp file for details.
209
210    MSVC from command line
211    ----------------------
212
213    Run the 'vcvars32.bat' file to get a proper environment. The
214    vcvars32.bat file is part of the Microsoft development environment and
215    you may find it in 'C:\Program Files\Microsoft Visual Studio\vc98\bin'
216    provided that you installed Visual C/C++ 6 in the default directory.
217
218    Then run 'nmake vc' in curl's root directory.
219
220    If you want to compile with zlib support, you will need to build
221    zlib (http://www.gzip.org/zlib/) as well. Please read the zlib
222    documentation on how to compile zlib. Define the ZLIB_PATH environment
223    variable to the location of zlib.h and zlib.lib, for example:
224
225      set ZLIB_PATH=c:\zlib-1.2.3
226
227    Then run 'nmake vc-zlib' in curl's root directory.
228
229    If you want to compile with SSL support you need the OpenSSL package.
230    Please read the OpenSSL documentation on how to compile and install
231    the OpenSSL libraries.  The build process of OpenSSL generates the
232    libeay32.dll and ssleay32.dll files in the out32dll subdirectory in
233    the OpenSSL home directory.  OpenSSL static libraries (libeay32.lib,
234    ssleay32.lib, RSAglue.lib) are created in the out32 subdirectory.
235
236    Before running nmake define the OPENSSL_PATH environment variable with
237    the root/base directory of OpenSSL, for example:
238
239      set OPENSSL_PATH=c:\openssl-0.9.8d
240
241    Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
242    directory.  'nmake vc-ssl' will create a libcurl static and dynamic
243    libraries in the lib subdirectory, as well as a statically linked
244    version of curl.exe in the src subdirectory.  This statically linked
245    version is a standalone executable not requiring any DLL at
246    runtime. This make method requires that you have the static OpenSSL
247    libraries available in OpenSSL's out32 subdirectory.
248    'nmake vc-ssl-dll' creates the libcurl dynamic library and
249    links curl.exe against libcurl and OpenSSL dynamically.
250    This executable requires libcurl.dll and the OpenSSL DLLs
251    at runtime.
252    Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
253
254    Borland C++ compiler
255    ---------------------
256
257    compile openssl
258
259    Make sure you include the paths to curl/include and openssl/inc32 in
260    your bcc32.cnf file
261
262    eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
263
264    Check to make sure that all of the sources listed in lib/Makefile.b32
265    are present in the /path_to_curl/lib directory. (Check the src
266    directory for missing ones.)
267
268    Make sure the environment variable "BCCDIR" is set to the install
269    location for the compiler eg : c:\Borland\BCC55
270
271    command line:
272    make -f /path_to_curl/lib/Makefile-ssl.b32
273
274    compile simplessl.c with appropriate links
275
276    c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
277                                  -L c:\borland\bcc55\lib\psdk\ws2_32.lib
278                                  -L c:\openssl\out32\libeay32.lib
279                                  -L c:\openssl\out32\ssleay32.lib
280                                  simplessl.c
281
282
283    MSVC IDE
284    --------
285
286    If you use VC++, Borland or similar compilers. Include all lib source
287    files in a static lib "project" (all .c and .h files that is).
288    (you should name it libcurl or similar)
289
290    Make the sources in the src/ drawer be a "win32 console application"
291    project. Name it curl.
292
293    For VC++ 6, there's an included Makefile.vc6 that should be possible
294    to use out-of-the-box.
295
296
297    Disabling Specific Protocols in Win32 builds
298    --------------------------------------------
299
300    The configure utility, unfortunately, is not available for the Windows
301    environment, therefore, you cannot use the various disable-protocol
302    options of the configure utility on this platform.
303
304    However, you can use the following defines to disable specific
305    protocols:
306
307    HTTP_ONLY             disables all protocols except HTTP
308    CURL_DISABLE_FTP      disables FTP
309    CURL_DISABLE_LDAP     disables LDAP
310    CURL_DISABLE_TELNET   disables TELNET
311    CURL_DISABLE_DICT     disables DICT
312    CURL_DISABLE_FILE     disables FILE
313    CURL_DISABLE_TFTP     disables TFTP
314
315    If you want to set any of these defines you have the following
316    possibilities:
317
318    - Modify lib/setup.h
319    - Modify lib/Makefile.vc6
320    - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
321      in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project.
322
323
324    Important static libcurl usage note
325    -----------------------------------
326
327    When building an application that uses the static libcurl library, you must
328    add '-DCURL_STATICLIB' to your CFLAGS.  Otherwise the linker will look for
329    dynamic import symbols.
330
331
332 IBM OS/2
333 ========
334    Building under OS/2 is not much different from building under unix.
335    You need:
336
337       - emx 0.9d
338       - GNU make
339       - GNU patch
340       - ksh
341       - GNU bison
342       - GNU file utilities
343       - GNU sed
344       - autoconf 2.13
345
346    If you want to build with OpenSSL or OpenLDAP support, you'll need to
347    download those libraries, too. Dirk Ohme has done some work to port SSL
348    libraries under OS/2, but it looks like he doesn't care about emx.  You'll
349    find his patches on: http://come.to/Dirk_Ohme
350
351    If during the linking you get an error about _errno being an undefined
352    symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__
353    in your definitions.
354
355    If everything seems to work fine but there's no curl.exe, you need to add
356    -Zexe to your linker flags.
357
358    If you're getting huge binaries, probably your makefiles have the -g in
359    CFLAGS.
360
361
362 VMS
363 ===
364    (The VMS section is in whole contributed by the friendly Nico Baggus)
365
366    Curl seems to work with FTP & HTTP other protocols are not tested.  (the
367    perl http/ftp testing server supplied as testing too cannot work on VMS
368    because vms has no concept of fork(). [ I tried to give it a whack, but
369    thats of no use.
370
371    SSL stuff has not been ported.
372
373    Telnet has about the same issues as for Win32. When the changes for Win32
374    are clear maybe they'll work for VMS too. The basic problem is that select
375    ONLY works for sockets.
376
377    Marked instances of fopen/[f]stat that might become a problem, especially
378    for non stream files. In this regard, the files opened for writing will be
379    created stream/lf and will thus be safe. Just keep in mind that non-binary
380    read/wring from/to files will have a records size limit of 32767 bytes
381    imposed.
382
383    Stat to get the size of the files is again only safe for stream files &
384    fixed record files without implied CC.
385
386    -- My guess is that only allowing access to stream files is the quickest
387    way to get around the most issues. Therefore all files need to to be
388    checked to be sure they will be stream/lf before processing them.  This is
389    the easiest way out, I know. The reason for this is that code that needs to
390    report the filesize will become a pain in the ass otherwise.
391
392    Exit status.... Well we needed something done here,
393
394    VMS has a structured exist status:
395    | 3  |       2    |     1       |  0|
396    |1098|765432109876|5432109876543|210|
397    +----+------------+-------------+---+
398    |Ctrl|  Facility  | Error code  |sev|
399    +----+------------+-------------+---+
400
401    With the Ctrl-bits an application can tell if part or the whole message has
402    already been printed from the program, DCL doesn't need to print it again.
403
404    Facility - basically the program ID. A code assigned to the program
405    the name can be fetched from external or internal message libraries
406    Error code - the err codes assigned by the application
407    Sev. - severity: Even = error, off = non error
408       0 = Warning
409       1 = Success
410       2 = Error
411       3 = Information
412       4 = Fatal
413       <5-7> reserved.
414
415    This all presents itself with:
416    %<FACILITY>-<Sev>-<Errorname>, <Error message>
417
418    See also the src/curlmsg.msg file, it has the source for the messages In
419    src/main.c a section is devoted to message status values, the globalvalues
420    create symbols with certain values, referenced from a compiled message
421    file. Have all exit function use a exit status derived from a translation
422    table with the compiled message codes.
423
424    This was all compiled with:
425
426       Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2
427
428    So far for porting notes as of:
429    13-jul-2001
430    N. Baggus
431
432
433 QNX
434 ===
435    (This section was graciously brought to us by David Bentham)
436
437    As QNX is targeted for resource constrained environments, the QNX headers
438    set conservative limits. This includes the FD_SETSIZE macro, set by default
439    to 32. Socket descriptors returned within the CURL library may exceed this,
440    resulting in memory faults/SIGSEGV crashes when passed into select(..)
441    calls using fd_set macros.
442
443    A good all-round solution to this is to override the default when building
444    libcurl, by overriding CFLAGS during configure, example
445    #  configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
446
447
448 RISC OS
449 =======
450    The library can be cross-compiled using gccsdk as follows:
451
452         CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
453              --host=arm-riscos-aof --without-random --disable-shared
454         make
455
456    where riscos-gcc and riscos-ar are links to the gccsdk tools.
457    You can then link your program with curl/lib/.libs/libcurl.a
458
459
460 AmigaOS
461 =======
462    (This section was graciously brought to us by Diego Casorran)
463
464    To build cURL/libcurl on AmigaOS just type 'make amiga' ...
465
466    What you need is:    (not tested with others versions)
467
468         GeekGadgets / gcc 2.95.3 (http://www.geekgadgets.org/)
469
470         AmiTCP SDK v4.3 (http://www.aminet.net/comm/tcp/AmiTCP-SDK-4.3.lha)
471
472         Native Developer Kit (http://www.amiga.com/3.9/download/NDK3.9.lha)
473
474    As no ixemul.library is required you will be able to build it for
475    WarpOS/PowerPC (not tested by me), as well a MorphOS version should be
476    possible with no problems.
477
478    To enable SSL support, you need a OpenSSL native version (without ixemul),
479    you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/
480
481
482 NetWare
483 =======
484    To compile curl.nlm / libcurl.nlm you need:
485    - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
486    - gnu make and awk running on the platform you compile on;
487      native Win32 versions can be downloaded from:
488      http://www.gknw.net/development/prgtools/
489    - recent Novell LibC SDK available from:
490      http://developer.novell.com/ndk/libc.htm
491    - or recent Novell CLib SDK available from:
492      http://developer.novell.com/ndk/clib.htm
493    - optional recent Novell CLDAP SDK available from:
494      http://developer.novell.com/ndk/cldap.htm
495    - optional zlib sources (static or dynamic linking with zlib.imp);
496      sources with NetWare Makefile can be obtained from:
497      http://www.gknw.net/mirror/zlib/
498    - optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
499      you can find precompiled packages at:
500      http://www.gknw.net/development/ossl/netware/
501      for CLIB-based builds OpenSSL needs to be patched to build with BSD
502      sockets (currently only a winsock-based CLIB build is supported):
503      http://www.gknw.net/development/ossl/netware/patches/v_0.9.8e/openssl-0.9.8e.diff
504    - optional SSH2 sources (version 0.17 or later);
505
506    Set a search path to your compiler, linker and tools; on Linux make
507    sure that the var OSTYPE contains the string 'linux'; set the var
508    NDKBASE to point to the base of your Novell NDK; and then type
509    'make netware' from the top source directory; other targets available
510    are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares';
511    if you need other combinations you can control the build with the
512    environment variables WITH_SSL, WITH_ZLIB, WITH_ARES, WITH_SSH2, and
513    ENABLE_IPV6; you can set LINK_STATIC=1 to link curl.nlm statically.
514    By default LDAP support is enabled, however currently you will need a patch
515    in order to use the CLDAP NDK with BSD sockets (Novell Bug 300237):
516    http://www.gknw.net/test/curl/cldap_ndk/ldap_ndk.diff
517    I found on some Linux systems (RH9) that OS detection didn't work although
518    a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it
519    with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
520    Any help in testing appreciated!
521    Builds automatically created 8 times a day from current CVS are here:
522    http://www.gknw.net/mirror/curl/autobuilds/
523    the status of these builds can be viewed at the autobuild table:
524    http://curl.haxx.se/auto/
525
526
527 eCos
528 ====
529    curl does not use the eCos build system, so you must first build eCos
530    separately, then link curl to the resulting eCos library.  Here's a sample
531    configure line to do so on an x86 Linux box targeting x86:
532
533    GCCLIB=`gcc -print-libgcc-file-name` && \
534    CFLAGS="-D__ECOS=1 -nostdinc -I$ECOS_INSTALL/include \
535     -I`dirname $GCCLIB`/include" \
536    LDFLAGS="-nostdlib -Wl,--gc-sections -Wl,-static \
537     -L$ECOS_INSTALL/lib -Ttarget.ld -ltarget" \
538    ./configure --host=i386 --disable-shared \
539     --without-ssl --without-zlib --disable-manual --disable-ldap
540
541    In most cases, eCos users will be using libcurl from within a custom
542    embedded application.  Using the standard 'curl' executable from
543    within eCos means facing the limitation of the standard eCos C
544    startup code which does not allow passing arguments in main().  To
545    run 'curl' from eCos and have it do something useful, you will need
546    to either modify the eCos startup code to pass in some arguments, or
547    modify the curl application itself to retrieve its arguments from
548    some location set by the bootloader or hard-code them.
549
550    Something like the following patch could be used to hard-code some
551    arguments.  The MTAB_ENTRY line mounts a RAM disk as the root filesystem
552    (without mounting some kind of filesystem, eCos errors out all file
553    operations which curl does not take to well).  The next section synthesizes
554    some command-line arguments for curl to use, in this case to direct curl
555    to read further arguments from a file.  It then creates that file on the
556    RAM disk and places within it a URL to download: a file: URL that
557    just happens to point to the configuration file itself.  The results
558    of running curl in this way is the contents of the configuration file
559    printed to the console.
560
561 --- src/main.c  19 Jul 2006 19:09:56 -0000      1.363
562 +++ src/main.c  24 Jul 2006 21:37:23 -0000
563 @@ -4286,11 +4286,31 @@
564  }
565  
566  
567 +#ifdef __ECOS
568 +#include <cyg/fileio/fileio.h>
569 +MTAB_ENTRY( testfs_mte1,
570 +                   "/",
571 +                   "ramfs",
572 +                   "",
573 +                   0);
574 +#endif
575  
576  int main(int argc, char *argv[])
577  {
578    int res;
579    struct Configurable config;
580 +#ifdef __ECOS
581 +  char *args[] = {"ecos-curl", "-K", "curlconf.txt"};
582 +  FILE *f;
583 +  argc = sizeof(args)/sizeof(args[0]);
584 +  argv = args;
585 +
586 +  f = fopen("curlconf.txt", "w");
587 +  if (f) {
588 +    fprintf(f, "--url file:curlconf.txt");
589 +    fclose(f);
590 +  }
591 +#endif
592    memset(&config, 0, sizeof(struct Configurable));
593  
594    config.errors = stderr; /* default errors to stderr */
595
596
597 Minix
598 =====
599    curl can be compiled on Minix 3 using gcc or ACK (starting with
600    ver. 3.1.3).  The gcc and bash packages must be installed first.
601    The default heap size allocated to bash is inadequate for running
602    configure and will result in out of memory errors.  Increase it with
603    the command:
604
605      chmem =2048000 /usr/local/bin/bash
606
607    Make sure gcc and bash are in the PATH with the command:
608    
609      export PATH=/usr/gnu/bin:$PATH
610    
611    then configure curl with a command like this:
612
613      ./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
614
615    Then simply run 'make'.
616
617    To compile with the ACK C compiler:
618
619      chmem =1024000 /usr/lib/em_cemcom.ansi
620      chmem =512000 /usr/lib/i386/as
621      ./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
622      make
623
624
625 CROSS COMPILE
626 =============
627    (This section was graciously brought to us by Jim Duey, with additions by
628    Dan Fandrich)
629
630    Download and unpack the cURL package.  Version should be 7.9.1 or later.
631
632    'cd' to the new directory. (e.g. cd curl-7.12.3)
633
634    Set environment variables to point to the cross-compile toolchain and call
635    configure with any options you need.  Be sure and specify the '--host' and
636    '--build' parameters at configuration time.  The following script is an
637    example of cross-compiling for the IBM 405GP PowerPC processor using the
638    toolchain from MonteVista for Hardhat Linux.
639
640    (begin script)
641
642    #! /bin/sh
643
644    export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
645    export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
646    export AR=ppc_405-ar
647    export AS=ppc_405-as
648    export LD=ppc_405-ld
649    export RANLIB=ppc_405-ranlib
650    export CC=ppc_405-gcc
651    export NM=ppc_405-nm
652
653    ./configure --target=powerpc-hardhat-linux \
654         --host=powerpc-hardhat-linux \
655         --build=i586-pc-linux-gnu \
656         --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \
657         --exec-prefix=/usr/local
658
659    (end script)
660
661    You may also need to provide a parameter like '--with-random=/dev/urandom'
662    to configure as it cannot detect the presence of a random number
663    generating device for a target system.  The '--prefix' parameter
664    specifies where cURL will be installed.  If 'configure' completes
665    successfully, do 'make' and 'make install' as usual.
666
667    In some cases, you may be able to simplify the above commands to as
668    little as:
669
670        ./configure --host=ARCH-OS
671
672
673 REDUCING SIZE
674 =============
675    There are a number of configure options that can be used to reduce the
676    size of libcurl for embedded applications where binary size is an
677    important factor.  First, be sure to set the CFLAGS variable when
678    configuring with any relevant compiler optimization flags to reduce the
679    size of the binary.  For gcc, this would mean at minimum the -Os option
680    and probably the -march=X option as well, e.g.:
681
682       ./configure CFLAGS='-Os' ...
683
684    Be sure to specify as many --disable- and --without- flags on the configure
685    command-line as you can to disable all the libcurl features that you
686    know your application is not going to need.  Besides specifying the
687    --disable-PROTOCOL flags for all the types of URLs your application
688    will not use, here are some other flags that can reduce the size of the
689    library:
690
691      --disable-ares (disables support for the ARES DNS library)
692      --disable-cookies (disables support for HTTP cookies)
693      --disable-crypto-auth (disables HTTP cryptographic authentication)
694      --disable-ipv6 (disables support for IPv6)
695      --disable-verbose (eliminates debugging strings and error code strings)
696      --enable-hidden-symbols (eliminates unneeded symbols in the shared library)
697      --without-libidn (disables support for the libidn DNS library)
698      --without-ssl (disables support for SSL/TLS)
699      --without-zlib (disables support for on-the-fly decompression)
700
701    The GNU linker has a number of options to reduce the size of the libcurl
702    dynamic libraries on some platforms even further. Specify them by giving
703    the options -Wl,-Bsymbolic and -Wl,-s on the gcc command-line.  
704    Be sure also to strip debugging symbols from your binaries after
705    compiling using 'strip' (or the appropriate variant if cross-compiling).
706    If space is really tight, you may be able to remove some unneeded
707    sections of the shared library using the -R option to objcopy (e.g. the
708    .comment section).
709
710    Using these techniques it is possible to create an HTTP-only shared
711    libcurl library for i386 Linux platforms that is less than 90 KB in
712    size (as of version 7.15.4).
713
714    You may find that statically linking libcurl to your application will
715    result in a lower total size.
716
717
718 PORTS
719 =====
720    This is a probably incomplete list of known hardware and operating systems
721    that curl has been compiled for. If you know a system curl compiles and
722    runs on, that isn't listed, please let us know!
723
724         - Alpha DEC OSF 4
725         - Alpha Digital UNIX v3.2
726         - Alpha FreeBSD 4.1, 4.5
727         - Alpha Linux 2.2, 2.4
728         - Alpha NetBSD 1.5.2
729         - Alpha OpenBSD 3.0
730         - Alpha OpenVMS V7.1-1H2
731         - Alpha Tru64 v5.0 5.1
732         - HP-PA HP-UX 9.X 10.X 11.X
733         - HP-PA Linux
734         - HP3000 MPE/iX
735         - MIPS IRIX 6.2, 6.5
736         - MIPS Linux
737         - OS/400
738         - Pocket PC/Win CE 3.0
739         - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
740         - PowerPC Darwin 1.0
741         - PowerPC Linux
742         - PowerPC Mac OS 9
743         - PowerPC Mac OS X
744         - SuperH4 Linux 2.6.X
745         - SINIX-Z v5
746         - Sparc Linux
747         - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
748         - Sparc SunOS 4.1.X
749         - StrongARM (and other ARM) RISC OS 3.1, 4.02
750         - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
751         - StrongARM NetBSD 1.4.1
752         - TPF
753         - Ultrix 4.3a
754         - UNICOS 9.0
755         - i386 BeOS
756         - i386 DOS
757         - i386 eCos 1.3.1
758         - i386 Esix 4.1
759         - i386 FreeBSD
760         - i386 HURD
761         - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
762         - i386 MINIX 3.1
763         - i386 NetBSD
764         - i386 Novell NetWare
765         - i386 OS/2
766         - i386 OpenBSD
767         - i386 SCO unix
768         - i386 Solaris 2.7
769         - i386 Windows 95, 98, ME, NT, 2000, XP, 2003
770         - i386 QNX 6
771         - i486 ncr-sysv4.3.03 (NCR MP-RAS)
772         - ia64 Linux 2.3.99
773         - m68k AmigaOS 3
774         - m68k Linux
775         - m68k OpenBSD
776         - m88k dg-dgux5.4R3.00
777         - s390 Linux
778         - XScale/PXA250 Linux 2.4
779
780 Useful URLs
781 ===========
782
783 OpenSSL   http://www.openssl.org
784 MingW     http://www.mingw.org
785 OpenLDAP  http://www.openldap.org
786 Zlib      http://www.gzip.org/zlib/
787 libssh2   http://www.libssh2.org
788
789