|
Lines 1254-1259
LIBEDIT_MSG="no"
Link Here
|
| 1254 |
AC_ARG_WITH(libedit, |
1254 |
AC_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 |
| 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 |
fi |
| 1257 |
if test "x$withval" != "xyes"; then |
1269 |
if test "x$withval" != "xyes"; then |
| 1258 |
CPPFLAGS="$CPPFLAGS -I${withval}/include" |
1270 |
CPPFLAGS="$CPPFLAGS -I${withval}/include" |
| 1259 |
if test -n "${need_dash_r}"; then |
1271 |
if test -n "${need_dash_r}"; then |
|
Lines 1262-1275
AC_ARG_WITH(libedit,
Link Here
|
| 1262 |
LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
1274 |
LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
| 1263 |
fi |
1275 |
fi |
| 1264 |
fi |
1276 |
fi |
|
|
1277 |
if test "x$use_pkgconfig_for_libedit" == "xyes"; then |
| 1278 |
LIBEDIT=`$PKGCONFIG --libs-only-l 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( |