~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to docs/INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-16 15:16:54 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20070516151654-x9nkigtr2j0i8d0v
Tags: upstream-7.16.2
ImportĀ upstreamĀ versionĀ 7.16.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
UNIX
18
18
====
19
 
 
20
19
   A normal unix installation is made in three or four steps (after you've
21
20
   unpacked the source archive):
22
21
 
52
51
   path for your compiler/linker, you don't need to do anything special. If
53
52
   you have OpenSSL installed in /usr/local/ssl, you can run configure like:
54
53
 
55
 
        ./configure --with-ssl
 
54
        ./configure --with-ssl
56
55
 
57
56
   If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
58
57
   you can run configure like this:
59
58
 
60
 
        ./configure --with-ssl=/opt/OpenSSL
 
59
        ./configure --with-ssl=/opt/OpenSSL
61
60
 
62
61
   If you insist on forcing a build without SSL support, even though you may
63
62
   have OpenSSL installed in your system, you can run configure like this:
141
140
     yassl with its OpenSSL emulation enabled and point to that directory root
142
141
     with configure --with-ssl.
143
142
 
 
143
     To build with NSS support instead of OpenSSL for SSL/TLS, note that
 
144
     you need to use both --without-ssl and --with-nss.
 
145
 
 
146
 
144
147
Win32
145
148
=====
146
149
 
 
150
   Building Windows DLLs and C run-time (CRT) linkage issues
 
151
   ---------------------------------------------------------
 
152
 
 
153
   As a general rule, building a DLL with static CRT linkage is highly
 
154
   discouraged, and intermixing CRTs in the same app is something to
 
155
   avoid at any cost.
 
156
 
 
157
   Reading and comprehension of Microsoft Knowledge Base articles
 
158
   KB94248 and KB140584 is a must for any Windows developer. Especially
 
159
   important is full understanding if you are not going to follow the
 
160
   advice given above.
 
161
 
 
162
   KB94248  - How To Use the C Run-Time
 
163
              http://support.microsoft.com/kb/94248/en-us
 
164
 
 
165
   KB140584 - How to link with the correct C Run-Time (CRT) library
 
166
              http://support.microsoft.com/kb/140584/en-us
 
167
 
 
168
   If your app is misbehaving in some strange way, or it is suffering
 
169
   from memory corruption, before asking for further help, please try
 
170
   first to rebuild every single library your app uses as well as your
 
171
   app using the debug multithreaded dynamic C runtime.
 
172
 
147
173
   MingW32
148
174
   -------
149
175
 
150
176
   Run the 'mingw32.bat' file to get the proper environment variables set,
151
 
   then run 'make mingw32' in the root dir. Use  'make mingw32-ssl' to build
 
177
   then run 'make mingw32' in the root dir. Use 'make mingw32-ssl' to build
152
178
   curl SSL enabled.
153
179
 
154
180
   If you have any problems linking libraries or finding header files, be sure
155
181
   to verify that the provided "Makefile.m32" files use the proper paths, and
156
 
   adjust as necessary.
 
182
   adjust as necessary. It is also possible to override these paths with 
 
183
   environment variables, for example:
 
184
 
 
185
     set ZLIB_PATH=c:\zlib-1.2.3
 
186
     set OPENSSL_PATH=c:\openssl-0.9.8d
 
187
     set LIBSSH2_PATH=c:\libssh2-0.15
 
188
 
 
189
   ATTENTION: if you want to build with libssh2 support you have to use latest
 
190
   sources fetched from CVS - the current 0.14 release will NOT work!
 
191
   Use 'make mingw32-ssh2-ssl' to build curl with SSH2 and SSL enabled.
157
192
 
158
193
   Cygwin
159
194
   ------
184
219
   documentation on how to compile zlib. Define the ZLIB_PATH environment
185
220
   variable to the location of zlib.h and zlib.lib, for example:
186
221
 
187
 
     set ZLIB_PATH=c:\zlib-1.2.1
 
222
     set ZLIB_PATH=c:\zlib-1.2.3
188
223
 
189
224
   Then run 'nmake vc-zlib' in curl's root directory.
190
225
 
198
233
   Before running nmake define the OPENSSL_PATH environment variable with
199
234
   the root/base directory of OpenSSL, for example:
200
235
 
201
 
     set OPENSSL_PATH=c:\openssl-0.9.7d
 
236
     set OPENSSL_PATH=c:\openssl-0.9.8d
202
237
 
203
238
   Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
204
239
   directory.  'nmake vc-ssl' will create a libcurl static and dynamic
292
327
 
293
328
IBM OS/2
294
329
========
295
 
 
296
330
   Building under OS/2 is not much different from building under unix.
297
331
   You need:
298
332
 
320
354
   If you're getting huge binaries, probably your makefiles have the -g in
321
355
   CFLAGS.
322
356
 
 
357
 
323
358
VMS
324
359
===
325
360
   (The VMS section is in whole contributed by the friendly Nico Baggus)
390
425
   13-jul-2001
391
426
   N. Baggus
392
427
 
 
428
 
393
429
QNX
394
430
===
395
431
   (This section was graciously brought to us by David Bentham)
441
477
 
442
478
NetWare
443
479
=======
444
 
 
445
480
   To compile curl.nlm / libcurl.nlm you need:
446
481
   - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
447
482
   - gnu make and awk running on the platform you compile on;
448
483
     native Win32 versions can be downloaded from:
449
 
     http://www.gknw.com/development/prgtools/
 
484
     http://www.gknw.net/development/prgtools/
450
485
   - recent Novell LibC SDK available from:
451
486
     http://developer.novell.com/ndk/libc.htm
452
487
   - optional zlib sources (at the moment only dynamic linking with zlib.imp);
453
488
     sources with NetWare Makefile can be obtained from:
454
 
     http://www.gknw.com/mirror/zlib/
 
489
     http://www.gknw.net/mirror/zlib/
455
490
   - optional OpenSSL sources (version 0.9.8 or later which builds with BSD);
456
491
 
457
492
   Set a search path to your compiler, linker and tools; on Linux make
465
500
   with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
466
501
   Any help in testing appreciated!
467
502
   Builds automatically created 8 times a day from current CVS are here:
468
 
   http://www.gknw.com/mirror/curl/autobuilds/
 
503
   http://www.gknw.net/mirror/curl/autobuilds/
469
504
   the status of these builds can be viewed at the autobuild table:
470
505
   http://curl.haxx.se/auto/
471
506
 
472
507
 
 
508
eCos
 
509
====
 
510
   curl does not use the eCos build system, so you must first build eCos
 
511
   separately, then link curl to the resulting eCos library.  Here's a sample
 
512
   configure line to do so on an x86 Linux box targeting x86:
 
513
 
 
514
   GCCLIB=`gcc -print-libgcc-file-name` && \
 
515
   CFLAGS="-D__ECOS=1 -nostdinc -I$ECOS_INSTALL/include \
 
516
    -I`dirname $GCCLIB`/include" \
 
517
   LDFLAGS="-nostdlib -Wl,--gc-sections -Wl,-static \
 
518
    -L$ECOS_INSTALL/lib -Ttarget.ld -ltarget" \
 
519
   ./configure --host=i386 --disable-shared \
 
520
    --without-ssl --without-zlib --disable-manual --disable-ldap
 
521
 
 
522
   In most cases, eCos users will be using libcurl from within a custom
 
523
   embedded application.  Using the standard 'curl' executable from
 
524
   within eCos means facing the limitation of the standard eCos C
 
525
   startup code which does not allow passing arguments in main().  To
 
526
   run 'curl' from eCos and have it do something useful, you will need
 
527
   to either modify the eCos startup code to pass in some arguments, or
 
528
   modify the curl application itself to retrieve its arguments from
 
529
   some location set by the bootloader or hard-code them.
 
530
 
 
531
   Something like the following patch could be used to hard-code some
 
532
   arguments.  The MTAB_ENTRY line mounts a RAM disk as the root filesystem
 
533
   (without mounting some kind of filesystem, eCos errors out all file
 
534
   operations which curl does not take to well).  The next section synthesizes
 
535
   some command-line arguments for curl to use, in this case to direct curl
 
536
   to read further arguments from a file.  It then creates that file on the
 
537
   RAM disk and places within it a URL to download: a file: URL that
 
538
   just happens to point to the configuration file itself.  The results
 
539
   of running curl in this way is the contents of the configuration file
 
540
   printed to the console.
 
541
 
 
542
--- src/main.c  19 Jul 2006 19:09:56 -0000      1.363
 
543
+++ src/main.c  24 Jul 2006 21:37:23 -0000
 
544
@@ -4286,11 +4286,31 @@
 
545
 }
 
546
 
 
547
 
 
548
+#ifdef __ECOS
 
549
+#include <cyg/fileio/fileio.h>
 
550
+MTAB_ENTRY( testfs_mte1,
 
551
+                   "/",
 
552
+                   "ramfs",
 
553
+                   "",
 
554
+                   0);
 
555
+#endif
 
556
 
 
557
 int main(int argc, char *argv[])
 
558
 {
 
559
   int res;
 
560
   struct Configurable config;
 
561
+#ifdef __ECOS
 
562
+  char *args[] = {"ecos-curl", "-K", "curlconf.txt"};
 
563
+  FILE *f;
 
564
+  argc = sizeof(args)/sizeof(args[0]);
 
565
+  argv = args;
 
566
+
 
567
+  f = fopen("curlconf.txt", "w");
 
568
+  if (f) {
 
569
+    fprintf(f, "--url file:curlconf.txt");
 
570
+    fclose(f);
 
571
+  }
 
572
+#endif
 
573
   memset(&config, 0, sizeof(struct Configurable));
 
574
 
 
575
   config.errors = stderr; /* default errors to stderr */
 
576
 
 
577
 
 
578
Minix
 
579
=====
 
580
   curl can be compiled on Minix 3 using gcc (ACK has a few problems due
 
581
   to mismatched headers and libraries as of ver. 3.1.2).  The gcc and bash
 
582
   packages must be installed first.  The default heap size allocated to
 
583
   bash is inadequate for running configure and will result in out of memory
 
584
   errors.  Increase it with the command:
 
585
 
 
586
     chmem =2048000 /usr/local/bin/bash
 
587
 
 
588
   Make sure gcc and bash are in the PATH then configure curl with a
 
589
   command like this:
 
590
 
 
591
     ./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap
 
592
 
 
593
   Then simply run 'make'.
 
594
 
 
595
 
473
596
CROSS COMPILE
474
597
=============
475
 
 
476
598
   (This section was graciously brought to us by Jim Duey, with additions by
477
599
   Dan Fandrich)
478
600
 
518
640
 
519
641
       ./configure --host=ARCH-OS
520
642
 
 
643
 
521
644
REDUCING SIZE
522
645
=============
523
 
 
524
646
   There are a number of configure options that can be used to reduce the
525
647
   size of libcurl for embedded applications where binary size is an
526
648
   important factor.  First, be sure to set the CFLAGS variable when
542
664
     --disable-crypto-auth (disables HTTP cryptographic authentication)
543
665
     --disable-ipv6 (disables support for IPv6)
544
666
     --disable-verbose (eliminates debugging strings and error code strings)
545
 
     --enable-hidden-symbols (eliminates unneeded symbols in library)
 
667
     --enable-hidden-symbols (eliminates unneeded symbols in the shared library)
546
668
     --without-libidn (disables support for the libidn DNS library)
547
669
     --without-ssl (disables support for SSL/TLS)
548
670
     --without-zlib (disables support for on-the-fly decompression)
553
675
   Be sure also to strip debugging symbols from your binaries after
554
676
   compiling using 'strip' (or the appropriate variant if cross-compiling).
555
677
   If space is really tight, you may be able to remove some unneeded
556
 
   sections of the library using the -R option to objcopy (e.g. the
 
678
   sections of the shared library using the -R option to objcopy (e.g. the
557
679
   .comment section).
558
680
 
559
681
   Using these techniques it is possible to create an HTTP-only shared
589
711
        - PowerPC Linux
590
712
        - PowerPC Mac OS 9
591
713
        - PowerPC Mac OS X
 
714
        - SuperH4 Linux 2.6.X
592
715
        - SINIX-Z v5
593
716
        - Sparc Linux
594
717
        - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
597
720
        - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
598
721
        - StrongARM NetBSD 1.4.1
599
722
        - Ultrix 4.3a
 
723
        - UNICOS 9.0
600
724
        - i386 BeOS
601
725
        - i386 DOS
 
726
        - i386 eCos 1.3.1
602
727
        - i386 Esix 4.1
603
728
        - i386 FreeBSD
604
729
        - i386 HURD
605
730
        - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
 
731
        - i386 MINIX 3.1.2
606
732
        - i386 NetBSD
607
733
        - i386 Novell NetWare
608
734
        - i386 OS/2
627
753
MingW     http://www.mingw.org
628
754
OpenLDAP  http://www.openldap.org
629
755
Zlib      http://www.gzip.org/zlib/
 
756
libssh2   http://www.libssh2.org
 
757
 
 
758