Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/macros/openssl.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Sat Dec 10 11:55:02 2005 UTC (18 years, 4 months ago) by orrisroot
Branch: MAIN
CVS Tags: AL_PORTING, REL20051226, REL20060323, tag20060615, tag20070307current, tag20061115, tag20061130, merge_to_20060605, tag20070307, REL20060213, RELENG_2_0_0a_RELEASE, tag20060622, merge_to_20060411, HEAD
Branch point for: XOONIPS_STABLE_32, XOONIPS_STABLE_3, XOONIPS_STABLE_2
Changes since 1.2: +3 -1 lines
- updated autotools versions.
   autoconf -> 2.59
   automake -> 1.9.6
   libtool  -> 1.5.20
- fixed help messages and indents for './configure --help'.
- fixed extra files list for 'make dist'
- added COPYING file

1 dnl
2 dnl openssl.m4 -- Find the path to the openssl library.
3 dnl
4 AC_DEFUN([AM_PATH_OPENSSL],
5 [OPENSSL_CFLAGS=""
6 OPENSSL_LDFLAGS=""
7 OPENSSL_LIBS=""
8
9 AC_ARG_WITH([openssl-prefix], [ --with-openssl-prefix=PFX
10 Prefix where openssl is installed (optional)],
11 openssl_prefix="$withval", openssl_prefix="")
12 if test x"$openssl_prefix" = xyes ; then
13 openssl_prefix="";
14 fi
15
16 AC_MSG_CHECKING([for openssl location])
17 if test x"$openssl_prefix" = x ; then
18 openssl_header_found="no"
19 for dir in /usr/local /usr ; do
20 if test -f "$dir/include/openssl/ssl.h" ; then
21 openssl_header_found="yes"
22 OPENSSL_CFLAGS="-I$dir/include"
23 OPENSSL_LDFLAGS="-L$dir/lib"
24 break
25 fi
26 done
27 if test x"$openssl_header_found" = "no" ; then
28 AC_MSG_RESULT([no])
29 AC_MSG_ERROR([openssl header file 'openssl/ssl.h' not found.])
30 fi
31 AC_MSG_RESULT([$dir])
32 else
33 OPENSSL_CFLAGS="-I$openssl_prefix/include"
34 OPENSSL_LDFLAGS="-L$openssl_prefix/lib"
35 AC_MSG_RESULT([$openssl_prefix])
36 fi
37
38 openssl_save_LDFLAGS=$LDFLAGS
39 LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
40 openssl_save_CFLAGS=$CFLAGS
41 CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
42 AC_CHECK_LIB([rsaref], [RSAPublicEncrypt],
43 [AC_CHECK_LIB([RSAglue], [RSAPublicEncrypt],
44 [OPENSSL_LIBS="-lRSAglue -lrsaref"],,[-lrsaref])])
45 AC_CHECK_LIB([crypto], [BIO_new],
46 [AC_CHECK_LIB([dl], [DSO_load],
47 [OPENSSL_LIBS="-lcrypto -ldl $OPENSSL_LIBS"],
48 [OPENSSL_LIBS="-lcrypto $OPENSSL_LIBS"], [-lcrypto $OPENSSL_LIBS])],
49 [AC_MSG_ERROR(cannot link with OpenSSL)], [$OPENSSL_LIBS])
50 AC_CHECK_LIB([ssl], [SSL_library_init],
51 [OPENSSL_LIBS="-lssl $OPENSSL_LIBS"],
52 [AC_MSG_ERROR(cannot link with OpenSSL)], [$OPENSSL_LIBS])
53 LDFLAGS=$openssl_save_LDFLAGS
54 CFLAGS=$openssl_save_CFLAGS
55 if test x"$OPENSSL_LIBS" = x ; then
56 AC_MSG_ERROR([openssl required but not found])
57 else
58 OPENSSL_LIBS="$OPENSSL_LDFLAGS $OPENSSL_LIBS"
59 fi
60
61 AC_SUBST([OPENSSL_CFLAGS])
62 AC_SUBST([OPENSSL_LIBS])])
63 ]

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26