diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-08-20 20:17:53 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-08-20 20:17:53 +1000 |
commit | 639bbe8bfe3d5038c279c97699de06cb0f120458 (patch) | |
tree | daea3de927ee9deee1991514a7c41df630d04255 /configure.ac | |
parent | 3e6bde483de0de7ec38f131ee2639e52c828bec8 (diff) |
- (dtucker) [configure.ac] Bug #1181: Explicitly test to see if OpenSSL
(0.9.8a and presumably newer) requires -ldl to successfully link.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index a3eec9520..b2939eeed 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.353 2006/08/20 10:03:50 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.354 2006/08/20 10:17:53 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) | 17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) |
18 | AC_REVISION($Revision: 1.353 $) | 18 | AC_REVISION($Revision: 1.354 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | 20 | ||
21 | AC_CONFIG_HEADER(config.h) | 21 | AC_CONFIG_HEADER(config.h) |
@@ -1825,6 +1825,36 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.]) | |||
1825 | ] | 1825 | ] |
1826 | ) | 1826 | ) |
1827 | 1827 | ||
1828 | AC_MSG_CHECKING([if programs using OpenSSL functions will link]) | ||
1829 | AC_LINK_IFELSE( | ||
1830 | [AC_LANG_SOURCE([[ | ||
1831 | #include <openssl/evp.h> | ||
1832 | int main(void) { SSLeay_add_all_algorithms(); } | ||
1833 | ]])], | ||
1834 | [ | ||
1835 | AC_MSG_RESULT(yes) | ||
1836 | ], | ||
1837 | [ | ||
1838 | AC_MSG_RESULT(no) | ||
1839 | saved_LIBS="$LIBS" | ||
1840 | LIBS="$LIBS -ldl" | ||
1841 | AC_MSG_CHECKING([if programs using OpenSSL need -ldl]) | ||
1842 | AC_LINK_IFELSE( | ||
1843 | [AC_LANG_SOURCE([[ | ||
1844 | #include <openssl/evp.h> | ||
1845 | int main(void) { SSLeay_add_all_algorithms(); } | ||
1846 | ]])], | ||
1847 | [ | ||
1848 | AC_MSG_RESULT(yes) | ||
1849 | ], | ||
1850 | [ | ||
1851 | AC_MSG_RESULT(no) | ||
1852 | LIBS="$saved_LIBS" | ||
1853 | ] | ||
1854 | ) | ||
1855 | ] | ||
1856 | ) | ||
1857 | |||
1828 | AC_ARG_WITH(ssl-engine, | 1858 | AC_ARG_WITH(ssl-engine, |
1829 | [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ], | 1859 | [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ], |
1830 | [ if test "x$withval" != "xno" ; then | 1860 | [ if test "x$withval" != "xno" ; then |
@@ -1926,12 +1956,19 @@ AC_ARG_WITH(pam, | |||
1926 | 1956 | ||
1927 | PAM_MSG="yes" | 1957 | PAM_MSG="yes" |
1928 | 1958 | ||
1959 | LIBPAM="-lpam" | ||
1929 | AC_DEFINE(USE_PAM, 1, | 1960 | AC_DEFINE(USE_PAM, 1, |
1930 | [Define if you want to enable PAM support]) | 1961 | [Define if you want to enable PAM support]) |
1962 | |||
1931 | if test $ac_cv_lib_dl_dlopen = yes; then | 1963 | if test $ac_cv_lib_dl_dlopen = yes; then |
1932 | LIBPAM="-lpam -ldl" | 1964 | case "$LIBS" in |
1933 | else | 1965 | *-ldl*) |
1934 | LIBPAM="-lpam" | 1966 | # libdl already in LIBS |
1967 | ;; | ||
1968 | *) | ||
1969 | LIBPAM="-$LIBPAM -ldl" | ||
1970 | ;; | ||
1971 | esac | ||
1935 | fi | 1972 | fi |
1936 | AC_SUBST(LIBPAM) | 1973 | AC_SUBST(LIBPAM) |
1937 | fi | 1974 | fi |