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:
55
./configure --with-ssl
54
./configure --with-ssl
57
56
If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
58
57
you can run configure like this:
60
./configure --with-ssl=/opt/OpenSSL
59
./configure --with-ssl=/opt/OpenSSL
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
To build with NSS support instead of OpenSSL for SSL/TLS, note that
144
you need to use both --without-ssl and --with-nss.
150
Building Windows DLLs and C run-time (CRT) linkage issues
151
---------------------------------------------------------
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
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
162
KB94248 - How To Use the C Run-Time
163
http://support.microsoft.com/kb/94248/en-us
165
KB140584 - How to link with the correct C Run-Time (CRT) library
166
http://support.microsoft.com/kb/140584/en-us
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.
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.
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
182
adjust as necessary. It is also possible to override these paths with
183
environment variables, for example:
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
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.
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);
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/
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:
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
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.
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.
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 @@
549
+#include <cyg/fileio/fileio.h>
550
+MTAB_ENTRY( testfs_mte1,
557
int main(int argc, char *argv[])
560
struct Configurable config;
562
+ char *args[] = {"ecos-curl", "-K", "curlconf.txt"};
564
+ argc = sizeof(args)/sizeof(args[0]);
567
+ f = fopen("curlconf.txt", "w");
569
+ fprintf(f, "--url file:curlconf.txt");
573
memset(&config, 0, sizeof(struct Configurable));
575
config.errors = stderr; /* default errors to stderr */
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:
586
chmem =2048000 /usr/local/bin/bash
588
Make sure gcc and bash are in the PATH then configure curl with a
591
./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap
593
Then simply run 'make'.
476
598
(This section was graciously brought to us by Jim Duey, with additions by