aboutsummaryrefslogtreecommitdiff
path: root/docs/INSTALL
blob: 1ae77a0ecc1d293c0f3344d40b490cfd8cdc926c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
                                  _   _ ____  _     
                              ___| | | |  _ \| |    
                             / __| | | | |_) | |    
                            | (__| |_| |  _ <| |___ 
                             \___|\___/|_| \_\_____|

                                How To Compile

Curl has been compiled and built on numerous different operating systems. The
way to proceed is mainly divided in two different ways: the unix way or the 
windows way.

If you're using Windows (95/98/NT/ME/2000 or whatever) or OS/2, you should
continue reading from the Win32 or OS/2 headers further down. All other
systems should be capable of being installed as described below.

UNIX
====

   A normal unix installation is made in three or four steps (after you've
   unpacked the source archive):

        ./configure
        make
        make test (optional)
        make install

   You probably need to be root when doing the last command.

   If you want to install curl in a different file hierarchy than /usr/local,
   you need to specify that already when running configure:

        ./configure --prefix=/path/to/curl/tree

   The configure script always tries to find a working SSL library unless
   explicitly told not to. If you have OpenSSL installed in the default search
   path for your compiler/linker, you don't need to do anything special. If
   you have OpenSSL installed in e.g /usr/local/ssl, you can run configure
   like:

	./configure --with-ssl

   If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
   you can run configure like this:

	./configure --with-ssl=/opt/OpenSSL

   If you insist on forcing a build *without* SSL support, even though you may
   have it installed in your system, you can run configure like this:

        ./configure --without-ssl

   If you have OpenSSL installed, but with the libraries in one place and the
   header files somewhere else, you'll have to set the LDFLAGS and CPPFLAGS
   environment variables prior to running configure.  Something like this
   should work:

     (with the Bourne shell and its clones):

       CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
           ./configure

     (with csh, tcsh and their clones):
     
       env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
       ./configure

   If your SSL library was compiled with rsaref (usually for use in the United
   States), you may also need to set:

     LIBS=-lRSAglue -lrsaref
     (as suggested by Doug Kaufman)

   KNOWN PROBLEMS

     If you happen to have autoconf installed, but a version older than 2.12
     you will get into trouble. Then you can still build curl by issuing these
     commands (note that this requires curl to be built staticly): (from Ralph
     Beckmann)

       ./configure [...]
       cd lib; make; cd ..
       cd src; make; cd ..
       cp src/curl elsewhere/bin/

     As suggested by David West, you can make a faked version of autoconf and
     autoheader:

       ----start of autoconf----
       #!/bin/bash
       #fake autoconf for building curl
       if [ "$1" = "--version" ] then
         echo "Autoconf version 2.13"
       fi
       ----end of autoconf----

     Then make autoheader a symbolic link to the same script and make sure
     they're executable and set to appear in the path *BEFORE* the actual (but
     obsolete) autoconf and autoheader scripts.

   MORE OPTIONS

     Remember, to force configure to use the standard cc compiler if both
     cc and gcc are present, run configure like

       CC=cc ./configure
         or
       env Cc=cc ./configure

     To force a static library compile, disable the shared library creation
     by running configure like:

       ./configure --disable-shared

     To tell the configure script to skip searching for thread-safe functions,
     add an option like:

       ./configure --disable-thread

     To build curl with kerberos4 support enabled, curl requires the krb4 libs
     and headers installed. You can then use a set of options to tell
     configure where those are:

          --with-krb4-includes[=DIR]   Specify location of kerberos4 headers
          --with-krb4-libs[=DIR]       Specify location of kerberos4 libs
          --with-krb4[=DIR]            where to look for Kerberos4

     In most cases, /usr/athena is the install prefix and then it works with

       ./configure --with-krb4=/usr/athena

     If your system support shared libraries, but you want to built a static
     version only, you can disable building the shared version by using:

       ./configure --disable-shared

     If you're a curl developer and use gcc, you might want to enable more
     debug options with the --enable-debug option.

Win32
=====
 
   Without SSL:

      MingW32 (GCC-2.95) style
      ------------------------
        Run the 'mingw32.bat' file to get the proper environment variables
        set, then run 'make mingw32' in the root dir.

        If you have any problems linking libraries or finding header files, be
        sure to verify that the provided "Makefile.m32" files use the proper
        paths, and adjust as necessary.

      Cygwin style
      ------------
        Almost identical to the unix installation. Run the configure script in
        the curl root with 'sh configure'. Make sure you have the sh
        executable in /bin/ or you'll see the configure fail towards the end.

        Run 'make'

      Microsoft command line style
      ----------------------------
        Run the 'vcvars32.bat' file to get the proper environment variables
        set, then run 'nmake vc' in the root dir.

        The vcvars32.bat file is part of the Microsoft development
        environment.

      IDE-style
      -------------------------
        If you use VC++, Borland or similar compilers. Include all lib source
        files in a static lib "project" (all .c and .h files that is).
        (you should name it libcurl or similar)

        Make the sources in the src/ drawer be a "win32 console application"
        project. Name it curl.

        With VC++, add 'wsock32.lib' to the link libs when you build curl!
        Borland seems to do that itself magically. Of course you have to
        make sure it links with the libcurl too!

        For VC++ 6, there's an included Makefile.vc6 that should be possible
        to use out-of-the-box.

        Microsoft note: add /Zm200 to the compiler options to increase the 
		compiler's memory allocation limit, as the hugehelp.c won't compile
		due to "too long puts string".


   With SSL:

      MingW32 (GCC-2.95) style
      ------------------------
        Run the 'mingw32.bat' file to get the proper environment variables
        set, then run 'make mingw32-ssl' in the root dir.

        If you have any problems linking libraries or finding header files, be
        sure to look at the provided "Makefile.m32" files for the proper
        paths, and adjust as necessary.

      Cygwin style
      ------------
        Haven't done, nor got any reports on how to do. It should although be
        identical to the unix setup for the same purpose. See above.

      Microsoft command line style
      ----------------------------
        Please read the OpenSSL documentation on how to compile and install
        the OpenSSL library.  This generates the libeay32.dll and ssleay32.dll
        files.

        Run the 'vcvars32.bat' file to get the proper environment variables
        set. Edit the makefile.vc6 in the lib directory and define
        OPENSSL_PATH.  Set the location of the OpenSSL library and run 'nmake
        vc-ssl' in the root directory.

        The vcvars32.bat file is part of the Microsoft development
        environment.

      Microsoft / Borland style
      -------------------------
        If you have OpenSSL, and want curl to take advantage of it, edit your
        project properties to use the SSL include path, link with the SSL libs
        and define the USE_SSLEAY symbol.


IBM OS/2
========

   Building under OS/2 is not much different from building under unix.
   You need:

      - emx 0.9d
      - GNU make
      - GNU patch
      - ksh
      - GNU bison
      - GNU file utilities
      - GNU sed
      - autoconf 2.13

   If you want to build with OpenSSL or OpenLDAP support, you'll need to
   download those libraries, too. Dirk Ohme has done some work to port SSL
   libraries under OS/2, but it looks like he doesn't care about emx.  You'll
   find his patches on: http://come.to/Dirk_Ohme

   If during the linking you get an error about _errno being an undefined
   symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__
   in your definitions.

   If everything seems to work fine but there's no curl.exe, you need to add
   -Zexe to your linker flags.

   If you're getting huge binaries, probably your makefiles have the -g in
   CFLAGS.

PORTS
=====
   This is a probably incomplete list of known hardware and operating systems
   that curl has been compiled for:

        - Ultrix 4.3a
        - SINIX-Z v5
        - Alpha DEC OSF 4
        - Alpha Digital UNIX v3.2
        - Alpha FreeBSD 4.1
        - Alpha Linux 2.2.16
        - Alpha OpenVMS V7.1-1H2
        - Alpha Tru64 v5.0 5.1
        - ARM RISC OS
        - HP-PA HP-UX 9.X 10.X 11.X
        - MIPS IRIX 6.2, 6.5
        - Power AIX 4.2, 4.3.1, 4.3.2
        - PowerPC Darwin 1.0
        - PowerPC Linux
        - PowerPC Mac OS X
        - Sparc Linux
        - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8
        - Sparc SunOS 4.1.X
        - i386 BeOS
        - i386 FreeBSD
        - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4
        - i386 NetBSD
        - i386 OS/2
        - i386 OpenBSD
        - i386 SCO unix
        - i386 Solaris 2.7
        - i386 Windows 95, 98, ME, NT, 2000
        - ia64 Linux 2.3.99
        - m68k AmigaOS 3
        - m68k OpenBSD
        - StrongARM NetBSD 1.4.1

OpenSSL
=======

   You'll find OpenSSL information at:

      http://www.openssl.org


MingW32/Cygwin
==============

   You'll find MingW32 and Cygwin information at:

      http://www.mingw.org

OpenLDAP
========

   You'll find OpenLDAP information at:

      http://www.openldap.org

   You need to install it with shared libraries, which is enabled when running
   the ldap configure script with "--enable-shared". With my linux 2.0.36
   kernel I also had to disable using threads (with --without-threads),
   because the configure script couldn't figure out my system.