diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-11 11:37:00 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-11 11:37:00 +1100 |
commit | b85dcad762e23d4ca4982c3678235e65719babf8 (patch) | |
tree | abce2a8256bd3654990ef05a70c4c9cefd877da8 /configure.in | |
parent | 8f975b6a189fd15cf0dfcce09ba7d7c97f36a16d (diff) |
- Detect RSAref
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 97 |
1 files changed, 56 insertions, 41 deletions
diff --git a/configure.in b/configure.in index 64f100bae..a7a2c699f 100644 --- a/configure.in +++ b/configure.in | |||
@@ -151,46 +151,58 @@ fi | |||
151 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | 151 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) |
152 | for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do | 152 | for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do |
153 | if test ! -z "$ssldir" ; then | 153 | if test ! -z "$ssldir" ; then |
154 | LIBS="$saved_LIBS -L$ssldir" | 154 | LIBS="$saved_LIBS -L$ssldir -lcrypto" |
155 | CFLAGS="$CFLAGS -I$ssldir/include" | 155 | CFLAGS="$CFLAGS -I$ssldir/include" |
156 | if test "x$need_dash_r" = "x1" ; then | 156 | if test "x$need_dash_r" = "x1" ; then |
157 | LIBS="$LIBS -R$ssldir/lib" | 157 | LIBS="$LIBS -R$ssldir/lib" |
158 | fi | 158 | fi |
159 | else | ||
160 | LIBS="$saved_LIBS -lcrypto" | ||
159 | fi | 161 | fi |
160 | LIBS="$LIBS -lcrypto" | ||
161 | 162 | ||
162 | AC_TRY_RUN( | 163 | for WANTS_RSAREF in "" 1 ; do |
163 | [ | 164 | |
164 | #include <openssl/rsa.h> | 165 | if test ! -z "$WANTS_RSAREF" ; then |
165 | #include <openssl/bn.h> | 166 | LIBS="$LIBS -lRSAglue -lrsaref" |
166 | #include <openssl/sha.h> | 167 | fi |
167 | int main(void) | 168 | |
168 | {RSA *key; char seed[2048];memset(seed, 0, sizeof(seed)); | 169 | AC_TRY_RUN( |
169 | RAND_seed(seed, sizeof(seed));key=RSA_generate_key(32,3,NULL,NULL); | 170 | [ |
170 | return(key==NULL);} | 171 | #include <openssl/rsa.h> |
171 | ], | 172 | #include <openssl/bn.h> |
172 | [ | 173 | #include <openssl/sha.h> |
173 | AC_DEFINE(HAVE_OPENSSL) | 174 | int main(void) |
174 | found_crypto=1 | 175 | {RSA *key; char seed[2048];memset(seed, 0, sizeof(seed)); |
175 | break; | 176 | RAND_seed(seed, sizeof(seed));key=RSA_generate_key(32,3,NULL,NULL); |
176 | ], [] | 177 | return(key==NULL);} |
177 | ) | 178 | ], |
178 | AC_TRY_RUN( | 179 | [ |
179 | [ | 180 | AC_DEFINE(HAVE_OPENSSL) |
180 | #include <ssl/rsa.h> | 181 | found_crypto=1 |
181 | #include <ssl/bn.h> | 182 | break; |
182 | #include <ssl/sha.h> | 183 | ], [] |
183 | int main(void) | 184 | ) |
184 | {RSA *key; char seed[2048];memset(seed, 0, sizeof(seed)); | 185 | AC_TRY_RUN( |
185 | RAND_seed(seed, sizeof(seed));key=RSA_generate_key(32,3,NULL,NULL); | 186 | [ |
186 | return(key==NULL);} | 187 | #include <ssl/rsa.h> |
187 | ], | 188 | #include <ssl/bn.h> |
188 | [ | 189 | #include <ssl/sha.h> |
189 | AC_DEFINE(HAVE_SSL) | 190 | int main(void) |
190 | found_crypto=1 | 191 | {RSA *key; char seed[2048];memset(seed, 0, sizeof(seed)); |
191 | break; | 192 | RAND_seed(seed, sizeof(seed));key=RSA_generate_key(32,3,NULL,NULL); |
192 | ], [] | 193 | return(key==NULL);} |
193 | ) | 194 | ], |
195 | [ | ||
196 | AC_DEFINE(HAVE_SSL) | ||
197 | found_crypto=1 | ||
198 | break; | ||
199 | ], [] | ||
200 | ) | ||
201 | done | ||
202 | |||
203 | if test ! -z "$found_crypto" ; then | ||
204 | break; | ||
205 | fi | ||
194 | done | 206 | done |
195 | 207 | ||
196 | if test -z "$found_crypto" ; then | 208 | if test -z "$found_crypto" ; then |
@@ -206,6 +218,9 @@ else | |||
206 | fi | 218 | fi |
207 | fi | 219 | fi |
208 | LIBS="$saved_LIBS -lcrypto" | 220 | LIBS="$saved_LIBS -lcrypto" |
221 | if test ! -z $WANTS_RSAREF ; then | ||
222 | LIBS="$LIBS -lRSAglue -lrsaref" | ||
223 | fi | ||
209 | AC_MSG_RESULT($ssldir) | 224 | AC_MSG_RESULT($ssldir) |
210 | 225 | ||
211 | # Checks for data types | 226 | # Checks for data types |
@@ -448,7 +463,7 @@ AC_TRY_LINK([], | |||
448 | AC_ARG_WITH(rsh, | 463 | AC_ARG_WITH(rsh, |
449 | [ --with-rsh=PATH Specify path to remote shell program ], | 464 | [ --with-rsh=PATH Specify path to remote shell program ], |
450 | [ | 465 | [ |
451 | if test "x$withval" != "$xno" ; then | 466 | if test "x$withval" != "$no" ; then |
452 | AC_DEFINE_UNQUOTED(RSH_PATH, "$withval") | 467 | AC_DEFINE_UNQUOTED(RSH_PATH, "$withval") |
453 | fi | 468 | fi |
454 | ], | 469 | ], |
@@ -549,7 +564,7 @@ AC_MSG_CHECKING([whether to build GNOME ssh-askpass]) | |||
549 | AC_ARG_WITH(gnome-askpass, | 564 | AC_ARG_WITH(gnome-askpass, |
550 | [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)], | 565 | [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)], |
551 | [ | 566 | [ |
552 | if test x$withval = xno ; then | 567 | if test "x$withval" = "xno" ; then |
553 | GNOME_ASKPASS=""; | 568 | GNOME_ASKPASS=""; |
554 | else | 569 | else |
555 | GNOME_ASKPASS="gnome-ssh-askpass"; | 570 | GNOME_ASKPASS="gnome-ssh-askpass"; |
@@ -621,7 +636,7 @@ AC_SUBST(mansubdir) | |||
621 | AC_ARG_WITH(kerberos4, | 636 | AC_ARG_WITH(kerberos4, |
622 | [ --with-kerberos4=PATH Enable Kerberos 4 support], | 637 | [ --with-kerberos4=PATH Enable Kerberos 4 support], |
623 | [ | 638 | [ |
624 | if test "x$withval" != "$xno" ; then | 639 | if test "x$withval" != "xno" ; then |
625 | 640 | ||
626 | if test "x$withval" != "$xyes" ; then | 641 | if test "x$withval" != "$xyes" ; then |
627 | CFLAGS="$CFLAGS -I${withval}/include" | 642 | CFLAGS="$CFLAGS -I${withval}/include" |
@@ -653,7 +668,7 @@ AC_ARG_WITH(kerberos4, | |||
653 | AC_ARG_WITH(afs, | 668 | AC_ARG_WITH(afs, |
654 | [ --with-afs=PATH Enable AFS support], | 669 | [ --with-afs=PATH Enable AFS support], |
655 | [ | 670 | [ |
656 | if test "x$withval" != "$xno" ; then | 671 | if test "x$withval" != "xno" ; then |
657 | 672 | ||
658 | if test "x$withval" != "$xyes" ; then | 673 | if test "x$withval" != "$xyes" ; then |
659 | CFLAGS="$CFLAGS -I${withval}/include" | 674 | CFLAGS="$CFLAGS -I${withval}/include" |
@@ -678,7 +693,7 @@ LIBS="$LIBS $KLIBS" | |||
678 | AC_ARG_WITH(skey, | 693 | AC_ARG_WITH(skey, |
679 | [ --with-skey Enable S/Key support], | 694 | [ --with-skey Enable S/Key support], |
680 | [ | 695 | [ |
681 | if test "x$withval" != "$xno" ; then | 696 | if test "x$withval" != "xno" ; then |
682 | AC_DEFINE(SKEY) | 697 | AC_DEFINE(SKEY) |
683 | LIBS="$LIBS -lskey" | 698 | LIBS="$LIBS -lskey" |
684 | fi | 699 | fi |
@@ -689,7 +704,7 @@ AC_ARG_WITH(skey, | |||
689 | AC_ARG_WITH(tcp-wrappers, | 704 | AC_ARG_WITH(tcp-wrappers, |
690 | [ --with-tcp-wrappers Enable tcpwrappers support], | 705 | [ --with-tcp-wrappers Enable tcpwrappers support], |
691 | [ | 706 | [ |
692 | if test "x$withval" != "$xno" ; then | 707 | if test "x$withval" != "xno" ; then |
693 | saved_LIBS="$LIBS" | 708 | saved_LIBS="$LIBS" |
694 | LIBS="$LIBS -lwrap" | 709 | LIBS="$LIBS -lwrap" |
695 | AC_MSG_CHECKING(for libwrap) | 710 | AC_MSG_CHECKING(for libwrap) |
@@ -717,7 +732,7 @@ AC_ARG_WITH(tcp-wrappers, | |||
717 | AC_ARG_WITH(md5-passwords, | 732 | AC_ARG_WITH(md5-passwords, |
718 | [ --with-md5-passwords Enable use of MD5 passwords], | 733 | [ --with-md5-passwords Enable use of MD5 passwords], |
719 | [ | 734 | [ |
720 | if test "x$withval" != "$xno" ; then | 735 | if test "x$withval" != "xno" ; then |
721 | AC_DEFINE(HAVE_MD5_PASSWORDS) | 736 | AC_DEFINE(HAVE_MD5_PASSWORDS) |
722 | fi | 737 | fi |
723 | ] | 738 | ] |