Note that both the Strawberry Perl bin path and Strawberry C bin path will need to be listed in your environmental path. Also note that I no longer have AS Perl installed! (You could get the wrong Perl binary/environment while running the OpenSSL build or the CPAN operations if both AS Perl and Strawberry Perl are installed. This could lead to erratic results.)
After starting the Strawberry bundled CPAN command line tool "cpan" from with a Windows/DOS Command Prompt, I ran "make Crypt::SSLeay" at the "cpan>" prompt and was alerted immediately to a missing OpenSSL environment. In order to resolve that dependency, I had to obtain the latest OpenSSL 0.98 release and create an installation directory called "c:\openssl" as well as untar the archive to "c:\openssl\src." I tried extracting the tarball with the utilities bundled with Strawberry; the minigzip.exe worked, but the ptar script borked when trying to extract the files from the OpenSSL tarball.
Got this when running ptar -xvf on the OpenSSL tarball.
Can't use an undefined value as an ARRAY reference at C:/strawberry/perl/lib/Archive/Tar.pm line 953.
Oh, well. Fortunately, I had a late model WinZip already installed on my workstation.
In the "c:\openssl\src\<release>" directory you simply run "ms\mingw32" and hopefully everything will build properly within several minutes. Near the end of the bundled OpenSSL INSTALL.W32 text file are instructions for building within the MinGW environment (and not using MSYS by the way), which is the build environment bundled with Strawberry Perl itself. The instructions are basically accurate, but some of the library file names differ slightly. Here's a snapshot of my tree to show the files copied over after building a successful OpenSSL. I have excluded the contents from the "openssl" include directory under "c:\openssl\include" since it contains approximately 69 separate C header files. Your file sizes may vary depending on build options.
Directory of C:\openssl\bin
07/01/2009 11:14 AM <DIR> .
07/01/2009 11:14 AM <DIR> ..
07/01/2009 11:04 AM 1,546,781 libeay32.dll
07/01/2009 11:04 AM 332,254 libssl32.dll
07/01/2009 11:03 AM 1,843,527 openssl.exe
3 File(s) 3,722,562 bytes
2 Dir(s) 30,017,982,464 bytes free
Directory of C:\openssl\lib
07/01/2009 11:14 AM <DIR> .
07/01/2009 11:14 AM <DIR> ..
07/01/2009 11:04 AM 2,273,502 libeay32.a
07/01/2009 11:04 AM 168,560 libssl32.a
2 File(s) 2,442,062 bytes
2 Dir(s) 30,017,982,464 bytes free
Directory of C:\openssl\include
07/01/2009 11:07 AM <DIR> .
07/01/2009 11:07 AM <DIR> ..
07/01/2009 11:08 AM <DIR> openssl
0 File(s) 0 bytes
3 Dir(s) 30,017,847,296 bytes free
Under the openssl subdir are ~69 .h files [ not shown ].
Once the OpenSSL libraries and headers have been created and moved to the proper target directories, you'll need to be in the CPAN shell again and do a little wrangling to get Crypt::SSLeay to build.
cpan> clean Crypt::SSLeay
Should clean up old failed build if any.
cpan> make Crypt::SSLeay
Accept the default library path presented "c:\openssl." At this point I got about 40 missing references during the linking of SSLeay.o. To fix this required me to edit the Makefile generated during the CPAN shell build process. The problem I encountered was that only the libeay32.a import library was included in the const_loadlibs section. So to finish up the task, required going to the directory and editing the Makefile directly. There may be alternate ways of doing this, but this was the quickest route for me.
cpan> look Crypt::SSLeay
This command should drop you into the Windows/DOS Command Prompt subshell and into the temporary build directory for the Crypt::SSLeay module under c:\strawberry\cpan\build. Open the "Makefile", not Makefile.PL, and locate the section:
There are two directives that will require editing: EXTRALIBS, and LDLOADLIBS. I added "c:\openssl\lib\libssl32.a" to the end of both directives. Here are the sections from my Makefile (note that the lines are wrapped in this post, but form one complete line in the Makefile itself.)
EXTRALIBS = c:\openssl\lib\libeay32.a C:\strawberry\c\lib\libmsvcrt.a C:\strawberry\c\lib\libmoldname.a C:\strawberry\c\lib\libkernel32.a C:\strawberry\c\lib\libuser32.a C:\strawberry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\c\lib\libcomdlg32.a C:\strawberry\c\lib\libadvapi32.a C:\strawberry\c\lib\libshell32.a C:\strawberry\c\lib\libole32.a C:\strawberry\c\lib\liboleaut32.a C:\strawberry\c\lib\libnetapi32.a C:\strawberry\c\lib\libuuid.a C:\strawberry\c\lib\libws2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\strawberry\c\lib\libversion.a C:\strawberry\c\lib\libodbc32.a C:\strawberry\c\lib\libodbccp32.a c:\openssl\lib\libssl32.a
LDLOADLIBS = c:\openssl\lib\libeay32.a C:\strawberry\c\lib\libmsvcrt.a C:\strawberry\c\lib\libmoldname.a C:\strawberry\c\lib\libkernel32.a C:\strawberry\c\lib\libuser32.a C:\strawberry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\c\lib\libcomdlg32.a C:\strawberry\c\lib\libadvapi32.a C:\strawberry\c\lib\libshell32.a C:\strawberry\c\lib\libole32.a C:\strawberry\c\lib\liboleaut32.a C:\strawberry\c\lib\libnetapi32.a C:\strawberry\c\lib\libuuid.a C:\strawberry\c\lib\libws2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\strawberry\c\lib\libversion.a C:\strawberry\c\lib\libodbc32.a C:\strawberry\c\lib\libodbccp32.a c:\openssl\lib\libssl32.a
Save the Makefile and exit your editor.
While still in your Windows/DOS Command Prompt subshell, run "dmake". Crypt::SSLeay should build correctly...hopefully :)
If it builds without errors, be sure to run "dmake test" and make sure the tests pass!
If the tests pass, you can run "dmake install" to complete the process.
After the installation of Crypt::SSLeay completes, you can type "exit" to return to the CPAN shell. "quit" will return you to the Windows/DOS Command Prompt.
Basically, you're starting the process in the CPAN shell but you're exiting temporarily to the Windows/DOS Command Prompt subshell to finish the job. I don't know if the next action taken was needed for the build explicitly, but while in the Windows/DOS Command Prompt subshell I added c:\openssl\bin to my path using the "set PATH=%PATH%;c:\openssl\bin" just in case the OpenSSL DLLs were required to run the tests.
I hope this example helps if you experienced problems getting Crypt::SSLeay to build when running Strawberry Perl as your Perl environment.
FYI: Build was done on Windows XP SP2, OpenSSL 0.98k, Crypt::SSLeay 0.57, Strawberry Perl 5.10.0.5 (in default installation location "c:\strawberry").
I'm guessing this would be a lot less work on Ubuntu... :)