~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to docs/INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
        ./configure --with-ssl
55
55
 
56
 
   If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
57
 
   you can run configure like this:
 
56
   If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL)
 
57
   and you have pkg-config installed, set the pkg-config path first, like this:
 
58
 
 
59
        env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
 
60
 
 
61
   Without pkg-config installed, use this:
58
62
 
59
63
        ./configure --with-ssl=/opt/OpenSSL
60
64
 
70
74
 
71
75
     (with the Bourne shell and its clones):
72
76
 
73
 
       CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
 
77
        CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
74
78
           ./configure
75
79
 
76
80
     (with csh, tcsh and their clones):
77
81
 
78
 
       env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
79
 
       ./configure
 
82
        env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
 
83
           ./configure
80
84
 
81
85
   If you have shared SSL libs installed in a directory where your run-time
82
86
   linker doesn't find them (which usually causes configure failures), you can
83
87
   provide the -R option to ld on some operating systems to set a hard-coded
84
88
   path to the run-time linker:
85
89
 
86
 
        LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
 
90
        env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
87
91
 
88
92
   MORE OPTIONS
 
93
   ------------
89
94
 
90
95
     To force configure to use the standard cc compiler if both cc and gcc are
91
96
     present, run configure like
127
132
     To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
128
133
     you need to use both --without-ssl and --with-gnutls.
129
134
 
130
 
     To build with yassl support instead of OpenSSL or GunTLS, you must build
 
135
     To build with yassl support instead of OpenSSL or GnuTLS, you must build
131
136
     yassl with its OpenSSL emulation enabled and point to that directory root
132
137
     with configure --with-ssl.
133
138
 
140
145
     To get support for SCP and SFTP, build with --with-libssh2 and have
141
146
     libssh2 0.16 or later installed.
142
147
     
 
148
   SPECIAL CASES
 
149
   -------------
 
150
   Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
 
151
   to get correct large file support.
 
152
 
 
153
   The Open Watcom C compiler on Linux requires configuring with the variables:
 
154
 
 
155
       ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
 
156
           RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
 
157
 
143
158
 
144
159
Win32
145
160
=====
272
287
   at runtime.
273
288
   Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
274
289
 
 
290
   MSVC 6 IDE
 
291
   ----------
 
292
 
 
293
   A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
 
294
   source distribution archive to allow proper building of the two included
 
295
   projects, the libcurl library and the curl tool.
 
296
 
 
297
   1) Open the vc6curl.dsw workspace with MSVC6's IDE.
 
298
   2) Select 'Build' from top menu.
 
299
   3) Select 'Batch Build' from dropdown menu.
 
300
   4) Make sure that the eight project configurations are 'checked'.
 
301
   5) Click on the 'Build' button.
 
302
   6) Once the eight project configurations are built you are done.
 
303
 
 
304
   Dynamic and static libcurl libraries are built in debug and release flavours,
 
305
   and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
 
306
   LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
 
307
 
 
308
   In the same way four curl executables are created, each using its respective
 
309
   library. The resulting curl executables are located in its own subdirectory,
 
310
   DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
 
311
 
 
312
   These reference VC++ 6.0 configurations are generated using the dynamic CRT.
 
313
 
 
314
   Intentionally, these reference VC++ 6.0 projects and configurations don't use
 
315
   third party libraries, such as OpenSSL or Zlib, to allow proper compilation
 
316
   and configuration for all new users without further requirements.
 
317
 
 
318
   If you need something more 'involved' you might adjust them for your own use,
 
319
   or explore the world of makefiles described above 'MSVC from command line'.
 
320
 
275
321
   Borland C++ compiler
276
322
   ---------------------
277
323
 
300
346
                                 -L c:\openssl\out32\ssleay32.lib
301
347
                                 simplessl.c
302
348
 
303
 
 
304
 
   MSVC IDE
305
 
   --------
 
349
   OTHER MSVC IDEs
 
350
   ---------------
306
351
 
307
352
   If you use VC++, Borland or similar compilers. Include all lib source
308
353
   files in a static lib "project" (all .c and .h files that is).
311
356
   Make the sources in the src/ drawer be a "win32 console application"
312
357
   project. Name it curl.
313
358
 
314
 
   For VC++ 6, there's an included Makefile.vc6 that should be possible
315
 
   to use out-of-the-box.
316
 
 
317
359
 
318
360
   Disabling Specific Protocols in Win32 builds
319
361
   --------------------------------------------
332
374
   CURL_DISABLE_DICT     disables DICT
333
375
   CURL_DISABLE_FILE     disables FILE
334
376
   CURL_DISABLE_TFTP     disables TFTP
 
377
   CURL_DISABLE_HTTP     disables HTTP
335
378
 
336
379
   If you want to set any of these defines you have the following
337
380
   possibilities:
338
381
 
 
382
   - Modify lib/config-win32.h
339
383
   - Modify lib/setup.h
340
384
   - Modify lib/Makefile.vc6
341
385
   - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
342
 
     in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project.
 
386
     in the libcurl.dsw/libcurl.dsp Visual C++ 6 IDE project.
343
387
 
344
388
 
345
389
   Important static libcurl usage note
618
662
Minix
619
663
=====
620
664
   curl can be compiled on Minix 3 using gcc or ACK (starting with
621
 
   ver. 3.1.3).  The default heap size allocated to several required
622
 
   programs is inadequate for configuring and compiling curl and will
623
 
   result in strange errors unless fixed (which only needs to be done
624
 
   once).
 
665
   ver. 3.1.3).
625
666
   
626
667
   ACK
627
668
   ---
628
 
   Increase heap sizes with the commands:
629
 
 
630
 
     chmem =1024000 /usr/lib/em_cemcom.ansi
631
 
     chmem =512000 /usr/lib/i386/as
632
 
 
633
 
   If you have bash installed:
634
 
 
635
 
     chmem =2048000 /usr/local/bin/bash
 
669
   Increase the heap sizes of the compiler with the command:
 
670
 
 
671
     binsizes xxl
636
672
 
637
673
   Configure and compile with:
638
674
 
639
 
     ./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
 
675
     ./configure CONFIG_SHELL=/bin/bigsh CC=cc LD=cc AR=/usr/bin/aal \
 
676
                 GREP=grep CPPFLAGS='-D_POSIX_SOURCE=1 -I/usr/local/include'
640
677
     make
 
678
     chmem =256000 src/curl
641
679
 
642
680
   GCC
643
681
   ---
644
 
   If you have bash installed:
645
 
 
646
 
     chmem =2048000 /usr/local/bin/bash
647
 
 
648
682
   Make sure gcc is in your PATH with the command:
649
683
   
650
684
     export PATH=/usr/gnu/bin:$PATH
651
685
   
652
686
   then configure and compile curl with:
653
687
 
654
 
     ./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
 
688
     ./configure CONFIG_SHELL=/bin/bigsh CC=gcc AR=/usr/gnu/bin/gar GREP=grep
655
689
     make
 
690
     chmem =256000 src/curl
656
691
 
657
692
 
658
693
Symbian OS
673
708
   (This section was graciously brought to us by Jim Duey, with additions by
674
709
   Dan Fandrich)
675
710
 
676
 
   Download and unpack the cURL package.  Version should be 7.9.1 or later.
 
711
   Download and unpack the cURL package.
677
712
 
678
713
   'cd' to the new directory. (e.g. cd curl-7.12.3)
679
714
 
723
758
   important factor.  First, be sure to set the CFLAGS variable when
724
759
   configuring with any relevant compiler optimization flags to reduce the
725
760
   size of the binary.  For gcc, this would mean at minimum the -Os option,
726
 
   potentially the -march=X and -mdynamic-no-pic options as well, e.g.:
 
761
   and potentially the -march=X and -mdynamic-no-pic options as well, e.g.
727
762
 
728
763
      ./configure CFLAGS='-Os' ...
729
764
 
730
765
   Note that newer compilers often produce smaller code than older versions
731
 
   due to better optimization.
 
766
   due to improved optimization.
732
767
 
733
768
   Be sure to specify as many --disable- and --without- flags on the configure
734
769
   command-line as you can to disable all the libcurl features that you
737
772
   will not use, here are some other flags that can reduce the size of the
738
773
   library:
739
774
 
740
 
     --disable-ares (disables support for the ARES DNS library)
 
775
     --disable-ares (disables support for the C-ARES DNS library)
741
776
     --disable-cookies (disables support for HTTP cookies)
742
777
     --disable-crypto-auth (disables HTTP cryptographic authentication)
743
778
     --disable-ipv6 (disables support for IPv6)
 
779
     --disable-manual (disables support for the built-in documentation)
 
780
     --disable-proxy (disables support for HTTP and SOCKS proxies)
744
781
     --disable-verbose (eliminates debugging strings and error code strings)
745
782
     --enable-hidden-symbols (eliminates unneeded symbols in the shared library)
746
783
     --without-libidn (disables support for the libidn DNS library)
747
784
     --without-ssl (disables support for SSL/TLS)
748
785
     --without-zlib (disables support for on-the-fly decompression)
749
786
 
750
 
   The GNU linker has a number of options to reduce the size of the libcurl
751
 
   dynamic libraries on some platforms even further. Specify them by giving
752
 
   the options -Wl,-Bsymbolic and -Wl,-s on the gcc command-line.  
 
787
   The GNU compiler and linker have a number of options that can reduce the
 
788
   size of the libcurl dynamic libraries on some platforms even further.
 
789
   Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
 
790
   configure command-line:
 
791
     CFLAGS="-ffunction-sections -fdata-sections" \
 
792
     LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
 
793
 
753
794
   Be sure also to strip debugging symbols from your binaries after
754
795
   compiling using 'strip' (or the appropriate variant if cross-compiling).
755
796
   If space is really tight, you may be able to remove some unneeded
756
797
   sections of the shared library using the -R option to objcopy (e.g. the
757
798
   .comment section).
758
799
 
759
 
   Using these techniques it is possible to create an HTTP-only shared libcurl
760
 
   library for i386 Linux platforms that is only 96 KiB in size (as of libcurl
761
 
   version 7.17.1, using gcc 4.2.2).
 
800
   Using these techniques it is possible to create a basic HTTP-only shared
 
801
   libcurl library for i386 Linux platforms that is only 94 KiB in size, and
 
802
   an FTP-only library that is 87 KiB in size (as of libcurl version 7.19.1,
 
803
   using gcc 4.2.2).
762
804
 
763
805
   You may find that statically linking libcurl to your application will
764
 
   result in a lower total size.
 
806
   result in a lower total size than dynamically linking.
 
807
 
 
808
   Note that the curl test harness can detect the use of some, but not all, of
 
809
   the --disable statements suggested above. Use will cause tests relying on
 
810
   those features to fail.  The test harness can be manually forced to skip
 
811
   the relevant tests by specifying certain key words on the runtests.pl
 
812
   command line.  Following is a list of appropriate key words:
 
813
 
 
814
     --disable-cookies          !cookies
 
815
     --disable-crypto-auth      !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth
 
816
     --disable-manual           !--manual
 
817
     --disable-proxy            !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
765
818
 
766
819
 
767
820
PORTS
778
831
        - Alpha OpenBSD 3.0
779
832
        - Alpha OpenVMS V7.1-1H2
780
833
        - Alpha Tru64 v5.0 5.1
 
834
        - AVR32 Linux
 
835
        - ARM INTEGRITY
 
836
        - ARM iPhone OS
 
837
        - Cell Linux
 
838
        - Cell Cell OS
781
839
        - HP-PA HP-UX 9.X 10.X 11.X
782
840
        - HP-PA Linux
783
841
        - HP3000 MPE/iX
 
842
        - MicroBlaze uClinux
784
843
        - MIPS IRIX 6.2, 6.5
785
844
        - MIPS Linux
786
845
        - OS/400
787
846
        - Pocket PC/Win CE 3.0
788
847
        - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
789
848
        - PowerPC Darwin 1.0
 
849
        - PowerPC INTEGRITY
790
850
        - PowerPC Linux
791
851
        - PowerPC Mac OS 9
792
852
        - PowerPC Mac OS X
799
859
        - StrongARM (and other ARM) RISC OS 3.1, 4.02
800
860
        - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
801
861
        - StrongARM NetBSD 1.4.1
802
 
        - Symbian OS (P.I.P.S.)
 
862
        - Symbian OS (P.I.P.S.) 9.x
803
863
        - TPF
804
864
        - Ultrix 4.3a
805
865
        - UNICOS 9.0
828
888
        - m68k OpenBSD
829
889
        - m88k dg-dgux5.4R3.00
830
890
        - s390 Linux
 
891
        - x86_64 Linux
831
892
        - XScale/PXA250 Linux 2.4
832
893
        - Nios II uClinux
833
894