2000-05-22 13:35:35 -04:00
|
|
|
_ _ ____ _
|
|
|
|
___| | | | _ \| |
|
|
|
|
/ __| | | | |_) | |
|
|
|
|
| (__| |_| | _ <| |___
|
|
|
|
\___|\___/|_| \_\_____|
|
|
|
|
|
|
|
|
How To Compile
|
|
|
|
|
2001-08-08 03:50:14 -04:00
|
|
|
Curl has been compiled and built on numerous different operating systems.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-10-24 07:54:42 -04:00
|
|
|
Most systems build curl the same way (unix-style). Continue reading below for
|
|
|
|
more details if you're one of them.
|
|
|
|
|
|
|
|
If you're using Windows (95/98/NT/ME/2000/XP or similar), VMS, RISC OS or OS/2
|
|
|
|
or cross-compile, you should continue reading from one the paragraphs further
|
|
|
|
down.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
UNIX
|
|
|
|
====
|
|
|
|
|
2001-03-15 03:38:15 -05:00
|
|
|
A normal unix installation is made in three or four steps (after you've
|
|
|
|
unpacked the source archive):
|
2000-11-27 08:39:11 -05:00
|
|
|
|
|
|
|
./configure
|
2001-03-15 03:38:15 -05:00
|
|
|
make
|
|
|
|
make test (optional)
|
|
|
|
make install
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-03-15 03:38:15 -05:00
|
|
|
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
|
2000-05-22 13:35:35 -04:00
|
|
|
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
|
|
|
|
|
2001-03-15 03:38:15 -05:00
|
|
|
If your SSL library was compiled with rsaref (usually for use in the United
|
|
|
|
States), you may also need to set:
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
LIBS=-lRSAglue -lrsaref
|
2001-03-15 03:38:15 -05:00
|
|
|
(as suggested by Doug Kaufman)
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
KNOWN PROBLEMS
|
|
|
|
|
2001-02-05 05:24:12 -05:00
|
|
|
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)
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
./configure [...]
|
|
|
|
cd lib; make; cd ..
|
|
|
|
cd src; make; cd ..
|
|
|
|
cp src/curl elsewhere/bin/
|
|
|
|
|
2001-01-11 07:33:26 -05:00
|
|
|
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.
|
|
|
|
|
2001-03-15 03:38:15 -05:00
|
|
|
MORE OPTIONS
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2000-09-18 10:14:33 -04:00
|
|
|
To force a static library compile, disable the shared library creation
|
|
|
|
by running configure like:
|
|
|
|
|
|
|
|
./configure --disable-shared
|
|
|
|
|
2000-09-26 18:32:46 -04:00
|
|
|
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
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-02-05 05:24:12 -05:00
|
|
|
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.
|
|
|
|
|
2000-05-22 13:35:35 -04:00
|
|
|
Win32
|
|
|
|
=====
|
|
|
|
|
|
|
|
Without SSL:
|
|
|
|
|
|
|
|
MingW32 (GCC-2.95) style
|
|
|
|
------------------------
|
|
|
|
Run the 'mingw32.bat' file to get the proper environment variables
|
2001-03-15 09:44:01 -05:00
|
|
|
set, then run 'make mingw32' in the root dir.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-03-15 09:44:01 -05:00
|
|
|
If you have any problems linking libraries or finding header files, be
|
|
|
|
sure to verify that the provided "Makefile.m32" files use the proper
|
2000-05-22 13:35:35 -04:00
|
|
|
paths, and adjust as necessary.
|
|
|
|
|
|
|
|
Cygwin style
|
|
|
|
------------
|
2001-03-15 09:44:01 -05:00
|
|
|
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.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
Run 'make'
|
|
|
|
|
|
|
|
Microsoft command line style
|
|
|
|
----------------------------
|
|
|
|
Run the 'vcvars32.bat' file to get the proper environment variables
|
2001-03-15 09:44:01 -05:00
|
|
|
set, then run 'nmake vc' in the root dir.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-03-15 09:44:01 -05:00
|
|
|
The vcvars32.bat file is part of the Microsoft development
|
|
|
|
environment.
|
2001-01-17 03:24:29 -05:00
|
|
|
|
2000-05-22 13:35:35 -04:00
|
|
|
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.
|
|
|
|
|
2001-11-21 18:11:47 -05:00
|
|
|
With VC++, add 'ws2_32.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!
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
For VC++ 6, there's an included Makefile.vc6 that should be possible
|
|
|
|
to use out-of-the-box.
|
|
|
|
|
2001-03-23 03:16:24 -05:00
|
|
|
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".
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
|
|
|
|
With SSL:
|
|
|
|
|
|
|
|
MingW32 (GCC-2.95) style
|
|
|
|
------------------------
|
|
|
|
Run the 'mingw32.bat' file to get the proper environment variables
|
2001-03-15 09:44:01 -05:00
|
|
|
set, then run 'make mingw32-ssl' in the root dir.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-03-15 09:44:01 -05:00
|
|
|
If you have any problems linking libraries or finding header files, be
|
|
|
|
sure to look at the provided "Makefile.m32" files for the proper
|
2000-05-22 13:35:35 -04:00
|
|
|
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
|
|
|
|
----------------------------
|
2001-06-07 02:21:27 -04:00
|
|
|
Please read the OpenSSL documentation on how to compile and install
|
|
|
|
the OpenSSL library. This generates the libeay32.dll and ssleay32.dll
|
|
|
|
files.
|
|
|
|
|
2000-05-22 13:35:35 -04:00
|
|
|
Run the 'vcvars32.bat' file to get the proper environment variables
|
2001-06-07 02:21:27 -04:00
|
|
|
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.
|
2000-05-22 13:35:35 -04:00
|
|
|
|
2001-03-15 09:44:01 -05:00
|
|
|
The vcvars32.bat file is part of the Microsoft development
|
|
|
|
environment.
|
2001-01-17 03:24:29 -05:00
|
|
|
|
2000-05-22 13:35:35 -04:00
|
|
|
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
|
2001-05-04 02:17:01 -04:00
|
|
|
find his patches on: http://come.to/Dirk_Ohme
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2001-08-08 03:50:14 -04:00
|
|
|
VMS
|
|
|
|
===
|
|
|
|
(The VMS section is in whole contributed by the friendly Nico Baggus)
|
|
|
|
|
|
|
|
This is the first attempt at porting cURL to VMS.
|
|
|
|
|
|
|
|
Curl seems to work with FTP & HTTP other protocols are not tested. (the
|
|
|
|
perl http/ftp testing server supplied as testing too cannot work on VMS
|
|
|
|
because vms has no concept of fork(). [ I tried to give it a whack, but
|
|
|
|
thats of no use.
|
|
|
|
|
|
|
|
SSL stuff has not been ported.
|
|
|
|
|
|
|
|
Telnet has about the same issues as for Win32. When the changes for Win32
|
|
|
|
are clear maybe they'l work for VMS too. The basic problem is that select
|
|
|
|
ONLY works for sockets.
|
|
|
|
|
|
|
|
Marked instances of fopen/[f]stat that might become a problem, especially
|
|
|
|
for non stream files. In this regard, the files opened for writing will be
|
|
|
|
created stream/lf and will thus be safe. Just keep in mind that non-binary
|
|
|
|
read/wring from/to files will have a records size limit of 32767 bytes
|
|
|
|
imposed.
|
|
|
|
|
|
|
|
Stat to get the size of the files is again only safe for stream files &
|
|
|
|
fixed record files without implied CC.
|
|
|
|
|
|
|
|
-- My guess is that only allowing access to stream files is the quickest
|
|
|
|
way to get around the most issues. Therefore all files need to to be
|
|
|
|
checked to be sure they will be stream/lf before processing them. This is
|
|
|
|
the easiest way out, I know. The reason for this is that code that needs to
|
|
|
|
report the filesize will become a pain in the ass otherwise.
|
|
|
|
|
|
|
|
Exit status.... Well we needed something done here,
|
|
|
|
|
|
|
|
VMS has a structured exist status:
|
|
|
|
| 3 | 2 | 1 | 0|
|
|
|
|
|1098|765432109876|5432109876543|210|
|
|
|
|
+----+------------+-------------+---+
|
|
|
|
|Ctrl| Facility | Error code |sev|
|
|
|
|
+----+------------+-------------+---+
|
|
|
|
|
|
|
|
With the Ctrl-bits an application can tell if part or the whole message has
|
|
|
|
allready been printed from the program, DCL doesn't need to print it again.
|
|
|
|
|
|
|
|
Facility - basicaly the program ID. A code assigned to the program
|
|
|
|
the name can be fetched from external or internal message libraries
|
|
|
|
Errorcode - the errodes assigned by the application
|
|
|
|
Sev. - severity: Even = error, off = non error
|
|
|
|
0 = Warning
|
|
|
|
1 = Success
|
|
|
|
2 = Error
|
|
|
|
3 = Information
|
|
|
|
4 = Fatal
|
|
|
|
<5-7> reserved.
|
|
|
|
|
|
|
|
This all presents itself with:
|
|
|
|
%<FACILITY>-<SeV>-<Errorname>, <Error message>
|
|
|
|
|
|
|
|
See also the src/curlmsg.msg file, it has the source for the messages In
|
|
|
|
src/main.c a section is devoted to message status values, the globalvalues
|
|
|
|
create symbols with certain values, referenced from a compiled message
|
|
|
|
file. Have all exit function use a exit status derived from a translation
|
|
|
|
table with the compiled message codes.
|
|
|
|
|
|
|
|
This was all compiled with:
|
|
|
|
|
|
|
|
Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2
|
|
|
|
|
|
|
|
So far for porting notes as of:
|
|
|
|
13-jul-2001
|
|
|
|
N. Baggus
|
|
|
|
|
2001-10-24 07:54:42 -04:00
|
|
|
CROSS COMPILE
|
|
|
|
=============
|
|
|
|
|
|
|
|
(This section was graciously brought to us by Jim Duey, 23-oct-2001)
|
|
|
|
|
|
|
|
Download and unpack the cURL package. Version should be 7.9.1 or later.
|
|
|
|
|
|
|
|
'cd' to the new directory. (ie. curl-7.9.1-pre4)
|
|
|
|
|
|
|
|
Set environment variables to point to the cross-compile toolchain and call
|
|
|
|
configure with any options you need. Be sure and specify the '--host' and
|
|
|
|
'--build' parameters at configuration time. The following script is an
|
|
|
|
example of cross-compiling for the IBM 405GP PowerPC processor using the
|
|
|
|
toolchain from MonteVista for Hardhat Linux.
|
|
|
|
|
|
|
|
(begin script)
|
|
|
|
|
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
|
|
|
|
export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
|
|
|
|
export AR=ppc_405-ar
|
|
|
|
export AS=ppc_405-as
|
|
|
|
export LD=ppc_405-ld
|
|
|
|
export RANLIB=ppc_405-ranlib
|
|
|
|
export CC=ppc_405-gcc
|
|
|
|
export NM=ppc_405-nm
|
|
|
|
|
|
|
|
configure --target=powerpc-hardhat-linux \
|
|
|
|
--host=powerpc-hardhat-linux \
|
|
|
|
--build=i586-pc-linux-gnu \
|
|
|
|
--prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \
|
|
|
|
--exec-prefix=/usr/local
|
|
|
|
|
|
|
|
(end script)
|
|
|
|
|
|
|
|
The '--prefix' parameter specifies where cURL will be installed. If
|
|
|
|
'configure' completes successfully, do 'make' and 'make install' as usual.
|
|
|
|
|
2000-11-27 08:39:11 -05:00
|
|
|
PORTS
|
|
|
|
=====
|
2001-08-06 06:09:43 -04:00
|
|
|
This is a probably incomplete list of known hardware and operating systems
|
|
|
|
that curl has been compiled for:
|
2000-11-27 08:39:11 -05:00
|
|
|
|
|
|
|
- Alpha DEC OSF 4
|
|
|
|
- Alpha Digital UNIX v3.2
|
|
|
|
- Alpha FreeBSD 4.1
|
|
|
|
- Alpha Linux 2.2.16
|
2001-08-06 06:09:43 -04:00
|
|
|
- Alpha OpenVMS V7.1-1H2
|
2000-11-27 08:39:11 -05:00
|
|
|
- Alpha Tru64 v5.0 5.1
|
|
|
|
- HP-PA HP-UX 9.X 10.X 11.X
|
2001-11-22 08:03:11 -05:00
|
|
|
- HP-PA Linux
|
2000-11-27 08:39:11 -05:00
|
|
|
- MIPS IRIX 6.2, 6.5
|
2001-11-22 08:03:11 -05:00
|
|
|
- MIPS Linux
|
2000-11-27 08:39:11 -05:00
|
|
|
- Power AIX 4.2, 4.3.1, 4.3.2
|
|
|
|
- PowerPC Darwin 1.0
|
|
|
|
- PowerPC Linux
|
2001-11-22 08:03:11 -05:00
|
|
|
- PowerPC Mac OS 9
|
2000-11-27 08:39:11 -05:00
|
|
|
- PowerPC Mac OS X
|
2001-10-24 10:16:57 -04:00
|
|
|
- SINIX-Z v5
|
2000-11-27 08:39:11 -05:00
|
|
|
- Sparc Linux
|
|
|
|
- Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8
|
2001-01-11 07:33:26 -05:00
|
|
|
- Sparc SunOS 4.1.X
|
2001-10-24 10:16:57 -04:00
|
|
|
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
|
|
|
- StrongARM Linux 2.4
|
|
|
|
- StrongARM NetBSD 1.4.1
|
|
|
|
- Ultrix 4.3a
|
2000-11-27 08:39:11 -05:00
|
|
|
- i386 BeOS
|
|
|
|
- i386 FreeBSD
|
|
|
|
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4
|
|
|
|
- i386 NetBSD
|
|
|
|
- i386 OS/2
|
|
|
|
- i386 OpenBSD
|
2001-01-11 07:33:26 -05:00
|
|
|
- i386 SCO unix
|
2000-11-27 08:39:11 -05:00
|
|
|
- i386 Solaris 2.7
|
2001-01-11 07:33:26 -05:00
|
|
|
- i386 Windows 95, 98, ME, NT, 2000
|
2000-11-27 08:39:11 -05:00
|
|
|
- ia64 Linux 2.3.99
|
|
|
|
- m68k AmigaOS 3
|
2001-11-22 08:03:11 -05:00
|
|
|
- m68k Linux
|
2000-11-27 08:39:11 -05:00
|
|
|
- m68k OpenBSD
|
2001-10-24 10:16:57 -04:00
|
|
|
- s390 Linux
|
2000-11-27 08:39:11 -05:00
|
|
|
|
2000-05-22 13:35:35 -04:00
|
|
|
OpenSSL
|
|
|
|
=======
|
|
|
|
|
|
|
|
You'll find OpenSSL information at:
|
|
|
|
|
|
|
|
http://www.openssl.org
|
|
|
|
|
|
|
|
|
|
|
|
MingW32/Cygwin
|
|
|
|
==============
|
|
|
|
|
|
|
|
You'll find MingW32 and Cygwin information at:
|
|
|
|
|
2000-09-14 07:25:54 -04:00
|
|
|
http://www.mingw.org
|
2000-05-22 13:35:35 -04:00
|
|
|
|
|
|
|
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.
|