サンプル プログラムをコンパイルするときに、openssl ディレクトリを指定するコンパイル用の -I オプションを含めてみてください。
これは、openssl ディレクトリの INSTALL ファイルからのものです。
* WRITING applications
To write an application that is able to handle both the new
and the old directory layout, so that it can still be compiled
with library versions up to OpenSSL 0.9.2b without bothering
the user, you can proceed as follows:
- Always use the new filename of OpenSSL header files,
e.g. #include <openssl/ssl.h>.
- Create a directory "incl" that contains only a symbolic
link named "openssl", which points to the "include" directory
of OpenSSL.
For example, your application's Makefile might contain the
following rule, if OPENSSLDIR is a pathname (absolute or
relative) of the directory where OpenSSL resides:
incl/openssl:
-mkdir incl
cd $(OPENSSLDIR) # Check whether the directory really exists
-ln -s `cd $(OPENSSLDIR); pwd`/include incl/openssl
You will have to add "incl/openssl" to the dependencies
of those C files that include some OpenSSL header file.
- Add "-Iincl" to your CFLAGS.
With these additions, the OpenSSL header files will be available
under both name variants if an old library version is used:
Your application can reach them under names like <openssl/foo.h>,
while the header files still are able to #include each other
with names of the form <foo.h>.
詳細については、openssl ソース ディレクトリにある INSTALL ファイルをお読みになることをお勧めします。