on 7/24/01 12:16 PM, Darrell S. Begay at [EMAIL PROTECTED] wrote:
> please post your document, i would like to see if i missed anything.
( This is what is checked into our source control, so we remember how to do
this for each revision. It is only about a 10-20 minute operation. Apple's
libopenssl.dylib is over a year old, and we like to keep more current than
that. I did leave one detail: you need to temporarily delete/rename
/usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib because the linker isn't
as smart as it should be. Restore those symlinks when you are finished.)
The function gmtime_r() is not implemented in Darwin. So the first thing to
do is do a global search for "gmtime_r". Everywhere it is used there is a
directive that looks something like this:
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
gmtime_r(&t,&data); /* should return &data, but doesn't on some
systems, so we don't even look at the return value */
ts=&data;
#else
ts=gmtime(&t);
#endif
You need to add a flag for darwin...
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) &&
!defined(DARWIN)
gmtime_r(&t,&data); /* should return &data, but doesn't on some
systems, so we don't even look at the return value */
ts=&data;
#else
ts=gmtime(&t);
#endif
In openssl 0.9.6 there are only 4 such occurrences in a_gentm.c, a_time.c,
and a_utctm.c.
Next, you have to train config to accept Darwin as a valid target. There is
a big case statement in the middle of that file, and I've added Darwin right
after "NEWS-OS".
>From line 270:
NEWS-OS:4.*)
echo "mips-sony-newsos4"; exit 0;
;;
Darwin:1.3*)
echo "Darwin"; exit 0;
;;
You also have to set up a configuration for Darwin in Config. It doesn't
really seem to have a potent affect on the build process, but at the very
least you need something there. I inserted at line 281:
#### Darwin
#cc cflags unistd thread_cflag lflags bn_ops bn_obj des_obj bf_obj
md5_obj sha1_obj cast_obj
# rc4_obj rmd160_obj rc5_obj dso_scheme shared_target shared_cflag
shared_extension ranlib
#
"Darwin","CC:-O3 -fomit-frame-pointer -Wall -dynamic
-DUSE_TOD::-D_REENTRANT::DES_UNROLL
DES_RISC1:::::::::::darwin-shared:-fno-common -dynamiclib
-compatibility_version \$(SHLIB_MAJOR).\$(SHLIB_MINOR) -current_version
\$(SHLIB_MAJOR).\$(SHLIB_MINOR):.dylib:",
Now you can run config from the command line:
./config shared threads -D_REENTRANT -DUSE_TOD -DDARWIN -O3
And run make. Sadly, I still haven't figured out how to get the dynamic
libraries building correctly, but I have figured out how to do them
manually. Try these commands, making sure you do libcrypto _before_ you do
libssl (or else libssl.dylib will include the contents of libcrypto.a).
cc -dynamiclib -o libcrypto.dylib -prebind -compatibility_version 0.9.0
-current_version 0.9.6 -all_load libcrypto.a
cc -dynamiclib -o libssl.dylib -prebind -compatibility_version 0.9.0
-current_version 0.9.6 -all_load -L. -lcrypto libssl.a
And that should give you a useable build of OpenSSL 0.9.6!
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]