summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-08-20 20:17:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2006-08-20 20:17:53 +1000
commit639bbe8bfe3d5038c279c97699de06cb0f120458 (patch)
treedaea3de927ee9deee1991514a7c41df630d04255
parent3e6bde483de0de7ec38f131ee2639e52c828bec8 (diff)
- (dtucker) [configure.ac] Bug #1181: Explicitly test to see if OpenSSL
(0.9.8a and presumably newer) requires -ldl to successfully link.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac47
2 files changed, 45 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index dc43a0544..62adc612b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
4 afterward. Removes the need to mangle $LIBS later to remove -lpam and -ldl. 4 afterward. Removes the need to mangle $LIBS later to remove -lpam and -ldl.
5 - (dtucker) [configure.ac] Relocate --with-pam parts in preparation for 5 - (dtucker) [configure.ac] Relocate --with-pam parts in preparation for
6 fixing bug #1181. No changes yet. 6 fixing bug #1181. No changes yet.
7 - (dtucker) [configure.ac] Bug #1181: Explicitly test to see if OpenSSL
8 (0.9.8a and presumably newer) requires -ldl to successfully link.
7 9
820060819 1020060819
9 - (djm) OpenBSD CVS Sync 11 - (djm) OpenBSD CVS Sync
@@ -5281,4 +5283,4 @@
5281 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 5283 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
5282 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 5284 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
5283 5285
5284$Id: ChangeLog,v 1.4501 2006/08/20 10:03:50 dtucker Exp $ 5286$Id: ChangeLog,v 1.4502 2006/08/20 10:17:53 dtucker Exp $
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
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.353 $) 18AC_REVISION($Revision: 1.354 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_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
1828AC_MSG_CHECKING([if programs using OpenSSL functions will link])
1829AC_LINK_IFELSE(
1830 [AC_LANG_SOURCE([[
1831#include <openssl/evp.h>
1832int 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>
1845int 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
1828AC_ARG_WITH(ssl-engine, 1858AC_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