Loading docs/BUGS 0 → 100644 +56 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| BUGS Curl has grown substantially from that day, several years ago, when I started fiddling with it. When I write this, there are 16500 lines of source code, and by the time you read this it has probably grown even more. Of course there are lots of bugs left. And lots of misfeatures. To help us make curl the stable and solid product we want it to be, we need bug reports and bug fixes. If you can't fix a bug yourself and submit a fix for it, try to report an as detailed report as possible to the curl mailing list to allow one of us to have a go at a solution. You should also post your bug/problem at curl's bug tracking system over at http://sourceforge.net/bugs/?group_id=976 When reporting a bug, you should include information that will help us understand what's wrong, what's expected and how to repeat it. You therefore need to supply your operating system's name and version number (uname -a under a unix is fine), what version of curl you're using (curl -v is fine), what URL you were working with and anything else you think matters. If curl crashed, causing a core dump (in unix), there is hardly any use to send that huge file to anyone of us. Unless we have an exact same system setup as you, we can't do much with it. What we instead ask of you is to get a stack trace and send that (much smaller) output to us instead! The address and how to subscribe to the mailing list is detailed in the README.curl file. HOW TO GET A STACK TRACE with a common unix debugger ==================================================== First, you must make sure that you compile all sources with -g and that you don't 'strip' the final executable. Run the program until it bangs. Run your debugger on the core file, like '<debugger> curl core'. <debugger> should be replaced with the name of your debugger, in most cases that will be 'gdb', but 'dbx' and others also occur. When the debugger has finished loading the core file and presents you a prompt, you can give the compiler instructions. Enter 'where' (without the quotes) and press return. The list that is presented is the stack trace. If everything worked, it is supposed to contain the chain of functions that were called when curl crashed. docs/CONTRIBUTE 0 → 100644 +74 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| CONTRIBUTE To Think About When Contributing Source Code This document is intended to offer some guidelines that can be useful to keep in mind when you decide to write a contribution to the project. This concerns new features as well as corrections to existing flaws or bugs. Naming Try using a non-confusing naming scheme for your new functions and variable names. It doesn't necessarily have to mean that you should use the same as in other places of the code, just that the names should be logical, understandable and be named according to what they're used for. Indenting Please try using the same indenting levels and bracing method as all the other code already does. It makes the source code a lot easier to follow if all of it is written using the same style. I don't ask you to like it, I just ask you to follow the tradition! ;-) Commenting Comment your source code extensively. I don't see myself as a very good source commenter, but I try to become one. Commented code is quality code and enables future modifications much more. Uncommented code much more risk being completely replaced when someone wants to extend things, since other persons' source code can get quite hard to read. General Style Keep your functions small. If they're small you avoid a lot of mistakes and you don't accidentally mix up variables. Non-clobbering All Over When you write new functionality or fix bugs, it is important that you don't fiddle all over the source files and functions. Remember that it is likely that other people have done changes in the same source files as you have and possibly even in the same functions. If you bring completely new functionality, try writing it in a new source file. If you fix bugs, try to fix one bug at a time and send them as separate patches. Separate Patches Doing Different Things It is annoying when you get a huge patch from someone that is said to fix 511 odd problems, but discussions and opinions don't agree with 510 of them - or 509 of them were already fixed in a different way. Then the patcher needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Preferably, all fixes that correct different problems should be in their own patch with an attached description exactly what they correct so that all patches can be selectively applied by the maintainer or other interested parties. Document Writing docs is dead boring and one of the big problems with many open source projects. Someone's gotta do it. It makes it a lot easier if you submit a small description of your fix or your new features with every contribution so that it can be swiftly added to the package documentation. Write Access to CVS Repository If you are a frequent contributor, or have another good reason, you can of course get write access to the CVS repository and then you'll be able to check-in all your changes straight into the CVS tree instead of sending all changes by mail as patches. Just ask if this is what you'd want. docs/FAQ 0 → 100644 +85 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| FAQ Problems connecting to SSL servers. =================================== It took a very long time before I could sort out why curl had problems to connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The error sometimes showed up similar to: 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: It turned out to be because many older SSL servers don't deal with SSLv3 requests properly. To correct this problem, tell curl to select SSLv2 from the command line (-2/--sslv2). I have also seen examples where the remote server didn't like the SSLv2 request and instead you had to force curl to use SSLv3 with -3/--sslv3. Does curl support resume? ========================= Yes. Both ways on FTP, download ways on HTTP. Is libcurl thread safe? ======================= Yes, as far as curl's own code goes. It does use system calls that often aren't thread safe in most environments, such as gethostbyname(). I am very interested in once and for all getting some kind of report or README file from those who have used libcurl in a threaded environment, since I haven't and I get this question more and more frequently! Why doesn't my posting using -F work? ===================================== You can't simply use -F or -d at your choice. The web server that will receive your post assumes one of the formats. If the form you're trying to "fake" sets the type to 'multipart/form-data', than and only then you must use the -F type. In all the most common cases, you should use -d which then causes a posting with the type 'application/x-www-form-urlencoded'. Does curl support custom FTP commands? ====================================== Yes it does, you can tell curl to perform optional commands both before and/or after a file transfer. Study the -Q/--quote option. Since curl is used for file transfers, you don't use curl to just perform ftp commands without transfering anything. Therefore you must always specify a URL to transfer to/from even when doing custom FTP commands. Does curl work with other SSL libraries? ======================================== Curl has been written to use OpenSSL, although I doubt there would be much problems using a different library. I just don't know any other free one and that has limited my possibilities to develop against anything else. If anyone does "port" curl to use a commercial SSL library, I am of course very interested in getting the patch! configre doesn't find OpenSSL even when it is installed ======================================================= Platforms: Solaris (native cc compiler) and HPUX (native cc compiler) When configuring curl, I specify --with-ssl. OpenSSL is installed in /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find CRYPTO_lock in -lcrypto Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER -lcrypto, so ld can't find the library. This is due to a bug in the GNU autoconf tool. Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of ./configure places the -L/usr/local/ssl/lib early enough in the command line to make things work Submitted by: Bob Allison <allisonb@users.sourceforge.net> docs/FEATURES 0 → 100644 +82 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| FEATURES Misc - full URL syntax - custom maximum download time - custom least download speed acceptable - custom output result after completion - multiple URLs - guesses protocol from host name unless specified - uses .netrc - progress bar/time specs while downloading - PROXY environment variables support - config file support - compiles on win32 HTTP - GET - PUT - HEAD - POST - multipart POST - authentication - resume - follow redirects - custom HTTP request - cookie get/send - understands the netscape cookie file - custom headers (that can replace internally generated headers) - custom user-agent string - custom referer string - range - proxy authentication - time conditions - via http-proxy HTTPS (*1) - (all the HTTP features) - using certificates - via http-proxy FTP - download - authentication - PORT or PASV - single file size information (compare to HTTP HEAD) - 'type=' URL support - dir listing - dir listing names-only - upload - upload append - upload via http-proxy as HTTP PUT - download resume - upload resume - QUOT commands (before and/or after the transfer) - simple "range" support - via http-proxy TELNET - connection negotiation - stdin/stdout I/O LDAP (*2) - full LDAP URL support DICT - extended DICT URL support GOPHER - GET - via http-proxy FILE - URL support *1 = requires OpenSSL *2 = requires OpenLDAP docs/INSTALL 0 → 100644 +259 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| 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) or OS/2, you should continue reading from the Win32 header below. All other systems should be capable of being installed as described in the the UNIX header. PORTS ===== Just to show off, this is a probably incomplete list of known hardware and operating systems that curl has been compiled for: - Ultrix - SINIX-Z v5 Alpha DEC OSF 4 HP-PA HP-UX 10.X 11.X MIPS IRIX 6.2, 6.5 Power AIX 4.2, 4.3.1 PowerPC Darwin 1.0 PowerPC Mac OS X Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7 Sparc SunOS 4.1.* i386 BeOS i386 FreeBSD i386 Linux 1.3, 2.0, 2.2 i386 NetBSD i386 OS/2 i386 OpenBSD i386 Solaris 2.7 i386 Windows 95, 98, NT m68k AmigaOS 3 m68k OpenBSD UNIX ==== 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 /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 (from Doug Kaufman <dkaufman@rahul.net>) Without SSL support, just run: ./configure Then run: make Use the executable `curl` in src/ directory. 'make install' copies the curl file to /usr/local/bin/ (or $prefix/bin if you used the --prefix option to configure) and copies the curl.1 man page to a suitable place too. 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: (from Ralph Beckmann <rabe@uni-paderborn.de>) ./configure [...] cd lib; make; cd .. cd src; make; cd .. cp src/curl elsewhere/bin/ 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 Win32 ===== Without SSL: MingW32 (GCC-2.95) style ------------------------ Run the 'mingw32.bat' file to get the proper environment variables set, then run 'make -f Makefile.m32' in the lib/ dir and then 'make -f Makefile.m32' in the src/ 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 ------------ 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 -f Makefile.vc6' in the lib/ dir and then 'nmake -f Makefile.vc6' in the src/ dir. 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, as the hugehelp.c won't compile otherwise due to "too long puts string" or something like that! With SSL: MingW32 (GCC-2.95) style ------------------------ Run the 'mingw32.bat' file to get the proper environment variables set, then run 'make -f Makefile.m32 SSL=1' in the lib/ dir and then 'make -f Makefile.m32 SSL=1' in the src/ 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 ---------------------------- Run the 'vcvars32.bat' file to get the proper environment variables set, then run 'nmake -f Makefile.vc6 release-ssl' in the lib/ dir and then 'nmake -f Makefile.vc6' in the src/ dir. 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. OpenSSL ======= You'll find OpenSSL information at: http://www.openssl.org MingW32/Cygwin ============== You'll find MingW32 and Cygwin information at: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html 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. Loading
docs/BUGS 0 → 100644 +56 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| BUGS Curl has grown substantially from that day, several years ago, when I started fiddling with it. When I write this, there are 16500 lines of source code, and by the time you read this it has probably grown even more. Of course there are lots of bugs left. And lots of misfeatures. To help us make curl the stable and solid product we want it to be, we need bug reports and bug fixes. If you can't fix a bug yourself and submit a fix for it, try to report an as detailed report as possible to the curl mailing list to allow one of us to have a go at a solution. You should also post your bug/problem at curl's bug tracking system over at http://sourceforge.net/bugs/?group_id=976 When reporting a bug, you should include information that will help us understand what's wrong, what's expected and how to repeat it. You therefore need to supply your operating system's name and version number (uname -a under a unix is fine), what version of curl you're using (curl -v is fine), what URL you were working with and anything else you think matters. If curl crashed, causing a core dump (in unix), there is hardly any use to send that huge file to anyone of us. Unless we have an exact same system setup as you, we can't do much with it. What we instead ask of you is to get a stack trace and send that (much smaller) output to us instead! The address and how to subscribe to the mailing list is detailed in the README.curl file. HOW TO GET A STACK TRACE with a common unix debugger ==================================================== First, you must make sure that you compile all sources with -g and that you don't 'strip' the final executable. Run the program until it bangs. Run your debugger on the core file, like '<debugger> curl core'. <debugger> should be replaced with the name of your debugger, in most cases that will be 'gdb', but 'dbx' and others also occur. When the debugger has finished loading the core file and presents you a prompt, you can give the compiler instructions. Enter 'where' (without the quotes) and press return. The list that is presented is the stack trace. If everything worked, it is supposed to contain the chain of functions that were called when curl crashed.
docs/CONTRIBUTE 0 → 100644 +74 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| CONTRIBUTE To Think About When Contributing Source Code This document is intended to offer some guidelines that can be useful to keep in mind when you decide to write a contribution to the project. This concerns new features as well as corrections to existing flaws or bugs. Naming Try using a non-confusing naming scheme for your new functions and variable names. It doesn't necessarily have to mean that you should use the same as in other places of the code, just that the names should be logical, understandable and be named according to what they're used for. Indenting Please try using the same indenting levels and bracing method as all the other code already does. It makes the source code a lot easier to follow if all of it is written using the same style. I don't ask you to like it, I just ask you to follow the tradition! ;-) Commenting Comment your source code extensively. I don't see myself as a very good source commenter, but I try to become one. Commented code is quality code and enables future modifications much more. Uncommented code much more risk being completely replaced when someone wants to extend things, since other persons' source code can get quite hard to read. General Style Keep your functions small. If they're small you avoid a lot of mistakes and you don't accidentally mix up variables. Non-clobbering All Over When you write new functionality or fix bugs, it is important that you don't fiddle all over the source files and functions. Remember that it is likely that other people have done changes in the same source files as you have and possibly even in the same functions. If you bring completely new functionality, try writing it in a new source file. If you fix bugs, try to fix one bug at a time and send them as separate patches. Separate Patches Doing Different Things It is annoying when you get a huge patch from someone that is said to fix 511 odd problems, but discussions and opinions don't agree with 510 of them - or 509 of them were already fixed in a different way. Then the patcher needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Preferably, all fixes that correct different problems should be in their own patch with an attached description exactly what they correct so that all patches can be selectively applied by the maintainer or other interested parties. Document Writing docs is dead boring and one of the big problems with many open source projects. Someone's gotta do it. It makes it a lot easier if you submit a small description of your fix or your new features with every contribution so that it can be swiftly added to the package documentation. Write Access to CVS Repository If you are a frequent contributor, or have another good reason, you can of course get write access to the CVS repository and then you'll be able to check-in all your changes straight into the CVS tree instead of sending all changes by mail as patches. Just ask if this is what you'd want.
docs/FAQ 0 → 100644 +85 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| FAQ Problems connecting to SSL servers. =================================== It took a very long time before I could sort out why curl had problems to connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The error sometimes showed up similar to: 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: It turned out to be because many older SSL servers don't deal with SSLv3 requests properly. To correct this problem, tell curl to select SSLv2 from the command line (-2/--sslv2). I have also seen examples where the remote server didn't like the SSLv2 request and instead you had to force curl to use SSLv3 with -3/--sslv3. Does curl support resume? ========================= Yes. Both ways on FTP, download ways on HTTP. Is libcurl thread safe? ======================= Yes, as far as curl's own code goes. It does use system calls that often aren't thread safe in most environments, such as gethostbyname(). I am very interested in once and for all getting some kind of report or README file from those who have used libcurl in a threaded environment, since I haven't and I get this question more and more frequently! Why doesn't my posting using -F work? ===================================== You can't simply use -F or -d at your choice. The web server that will receive your post assumes one of the formats. If the form you're trying to "fake" sets the type to 'multipart/form-data', than and only then you must use the -F type. In all the most common cases, you should use -d which then causes a posting with the type 'application/x-www-form-urlencoded'. Does curl support custom FTP commands? ====================================== Yes it does, you can tell curl to perform optional commands both before and/or after a file transfer. Study the -Q/--quote option. Since curl is used for file transfers, you don't use curl to just perform ftp commands without transfering anything. Therefore you must always specify a URL to transfer to/from even when doing custom FTP commands. Does curl work with other SSL libraries? ======================================== Curl has been written to use OpenSSL, although I doubt there would be much problems using a different library. I just don't know any other free one and that has limited my possibilities to develop against anything else. If anyone does "port" curl to use a commercial SSL library, I am of course very interested in getting the patch! configre doesn't find OpenSSL even when it is installed ======================================================= Platforms: Solaris (native cc compiler) and HPUX (native cc compiler) When configuring curl, I specify --with-ssl. OpenSSL is installed in /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find CRYPTO_lock in -lcrypto Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER -lcrypto, so ld can't find the library. This is due to a bug in the GNU autoconf tool. Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of ./configure places the -L/usr/local/ssl/lib early enough in the command line to make things work Submitted by: Bob Allison <allisonb@users.sourceforge.net>
docs/FEATURES 0 → 100644 +82 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| FEATURES Misc - full URL syntax - custom maximum download time - custom least download speed acceptable - custom output result after completion - multiple URLs - guesses protocol from host name unless specified - uses .netrc - progress bar/time specs while downloading - PROXY environment variables support - config file support - compiles on win32 HTTP - GET - PUT - HEAD - POST - multipart POST - authentication - resume - follow redirects - custom HTTP request - cookie get/send - understands the netscape cookie file - custom headers (that can replace internally generated headers) - custom user-agent string - custom referer string - range - proxy authentication - time conditions - via http-proxy HTTPS (*1) - (all the HTTP features) - using certificates - via http-proxy FTP - download - authentication - PORT or PASV - single file size information (compare to HTTP HEAD) - 'type=' URL support - dir listing - dir listing names-only - upload - upload append - upload via http-proxy as HTTP PUT - download resume - upload resume - QUOT commands (before and/or after the transfer) - simple "range" support - via http-proxy TELNET - connection negotiation - stdin/stdout I/O LDAP (*2) - full LDAP URL support DICT - extended DICT URL support GOPHER - GET - via http-proxy FILE - URL support *1 = requires OpenSSL *2 = requires OpenLDAP
docs/INSTALL 0 → 100644 +259 −0 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| 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) or OS/2, you should continue reading from the Win32 header below. All other systems should be capable of being installed as described in the the UNIX header. PORTS ===== Just to show off, this is a probably incomplete list of known hardware and operating systems that curl has been compiled for: - Ultrix - SINIX-Z v5 Alpha DEC OSF 4 HP-PA HP-UX 10.X 11.X MIPS IRIX 6.2, 6.5 Power AIX 4.2, 4.3.1 PowerPC Darwin 1.0 PowerPC Mac OS X Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7 Sparc SunOS 4.1.* i386 BeOS i386 FreeBSD i386 Linux 1.3, 2.0, 2.2 i386 NetBSD i386 OS/2 i386 OpenBSD i386 Solaris 2.7 i386 Windows 95, 98, NT m68k AmigaOS 3 m68k OpenBSD UNIX ==== 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 /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 (from Doug Kaufman <dkaufman@rahul.net>) Without SSL support, just run: ./configure Then run: make Use the executable `curl` in src/ directory. 'make install' copies the curl file to /usr/local/bin/ (or $prefix/bin if you used the --prefix option to configure) and copies the curl.1 man page to a suitable place too. 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: (from Ralph Beckmann <rabe@uni-paderborn.de>) ./configure [...] cd lib; make; cd .. cd src; make; cd .. cp src/curl elsewhere/bin/ 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 Win32 ===== Without SSL: MingW32 (GCC-2.95) style ------------------------ Run the 'mingw32.bat' file to get the proper environment variables set, then run 'make -f Makefile.m32' in the lib/ dir and then 'make -f Makefile.m32' in the src/ 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 ------------ 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 -f Makefile.vc6' in the lib/ dir and then 'nmake -f Makefile.vc6' in the src/ dir. 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, as the hugehelp.c won't compile otherwise due to "too long puts string" or something like that! With SSL: MingW32 (GCC-2.95) style ------------------------ Run the 'mingw32.bat' file to get the proper environment variables set, then run 'make -f Makefile.m32 SSL=1' in the lib/ dir and then 'make -f Makefile.m32 SSL=1' in the src/ 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 ---------------------------- Run the 'vcvars32.bat' file to get the proper environment variables set, then run 'nmake -f Makefile.vc6 release-ssl' in the lib/ dir and then 'nmake -f Makefile.vc6' in the src/ dir. 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. OpenSSL ======= You'll find OpenSSL information at: http://www.openssl.org MingW32/Cygwin ============== You'll find MingW32 and Cygwin information at: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html 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.