What I have done: 1, Download and install Command Line Tools (download from here) 2, Download source code from openssl.net ,4509212 Jan 6 15:39:19 2014 openssl-1.0.1f.tar.gz (MD5) (SHA1) (PGP sign) [LATEST] 3, Change file crypto/ui/ui_openssl.c from static volatile sig_atomic_t intr_signal; to static volatile int intr_signal; 4, Make Dirs with command: ...
OpenSSL has instructions for building for iOS. The instructions include a build script to set the environemnt so the proper target is set. You can find the instructions in the OpenSSL FIPS User Guide 2.0, Appendix E.2.
If you don't want to go through the step-by-step guide, try out this Github account. Its got OpenSSL pre-built for iOS 6.0 and 7.0 (arch ARMv7, ARMv7s, i386, and ARM64) for OpenSSL 1.0.1e and 1.0.1f. The Github offering also offers the script to set the environment.
(Sorry about the link answers. There's no way to digest all the information into a couple of paragraphs).