summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac27
2 files changed, 25 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 12842f785..89180d15b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
120100409 120100409
2 - (dtucker) [contrib/cygwin/Makefile] Don't overwrite files with the wrong 2 - (dtucker) [contrib/cygwin/Makefile] Don't overwrite files with the wrong
3 ones. Based on a patch from Roumen Petrov. 3 ones. Based on a patch from Roumen Petrov.
4 - (dtucker) [configure.ac] Bug #1744: use pkg-config for libedit flags if we
5 have it and the path is not provided to --with-libedit. Based on a patch
6 from Iain Morgan.
4 7
520100326 820100326
6 - (djm) [openbsd-compat/bsd-arc4random.c] Fix preprocessor detection 9 - (djm) [openbsd-compat/bsd-arc4random.c] Fix preprocessor detection
diff --git a/configure.ac b/configure.ac
index 7580ff591..4e232c7e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.446 2010/03/25 23:27:33 dtucker Exp $ 1# $Id: configure.ac,v 1.447 2010/04/09 04:04:36 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.446 $) 18AC_REVISION($Revision: 1.447 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -1254,7 +1254,18 @@ LIBEDIT_MSG="no"
1254AC_ARG_WITH(libedit, 1254AC_ARG_WITH(libedit,
1255 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1255 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1256 [ if test "x$withval" != "xno" ; then 1256 [ if test "x$withval" != "xno" ; then
1257 if test "x$withval" != "xyes"; then 1257 if test "x$withval" = "xyes" ; then
1258 AC_PATH_PROG(PKGCONFIG, pkg-config, no)
1259 if test "x$PKGCONFIG" != "xno"; then
1260 AC_MSG_CHECKING(if $PKGCONFIG knows about libedit)
1261 if "$PKGCONFIG" libedit; then
1262 AC_MSG_RESULT(yes)
1263 use_pkgconfig_for_libedit=yes
1264 else
1265 AC_MSG_RESULT(no)
1266 fi
1267 fi
1268 else
1258 CPPFLAGS="$CPPFLAGS -I${withval}/include" 1269 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1259 if test -n "${need_dash_r}"; then 1270 if test -n "${need_dash_r}"; then
1260 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" 1271 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -1262,14 +1273,20 @@ AC_ARG_WITH(libedit,
1262 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 1273 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1263 fi 1274 fi
1264 fi 1275 fi
1276 if test "x$use_pkgconfig_for_libedit" == "xyes"; then
1277 LIBEDIT=`$PKGCONFIG --libs-only-l libedit`
1278 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
1279 else
1280 LIBEDIT="-ledit -lcurses"
1281 fi
1282 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
1265 AC_CHECK_LIB(edit, el_init, 1283 AC_CHECK_LIB(edit, el_init,
1266 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp]) 1284 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp])
1267 LIBEDIT="-ledit -lcurses"
1268 LIBEDIT_MSG="yes" 1285 LIBEDIT_MSG="yes"
1269 AC_SUBST(LIBEDIT) 1286 AC_SUBST(LIBEDIT)
1270 ], 1287 ],
1271 [ AC_MSG_ERROR(libedit not found) ], 1288 [ AC_MSG_ERROR(libedit not found) ],
1272 [ -lcurses ] 1289 [ $OTHERLIBS ]
1273 ) 1290 )
1274 AC_MSG_CHECKING(if libedit version is compatible) 1291 AC_MSG_CHECKING(if libedit version is compatible)
1275 AC_COMPILE_IFELSE( 1292 AC_COMPILE_IFELSE(