diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac index dfd63765b..b82d48356 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.444 2010/03/05 04:04:35 djm Exp $ | 1 | # $Id: configure.ac,v 1.449 2010/04/10 12:58:01 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.444 $) | 18 | AC_REVISION($Revision: 1.449 $) |
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) |
@@ -512,6 +512,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
512 | *-*-dragonfly*) | 512 | *-*-dragonfly*) |
513 | SSHDLIBS="$SSHDLIBS -lcrypt" | 513 | SSHDLIBS="$SSHDLIBS -lcrypt" |
514 | ;; | 514 | ;; |
515 | *-*-haiku*) | ||
516 | LIBS="$LIBS -lbsd " | ||
517 | AC_CHECK_LIB(network, socket) | ||
518 | AC_DEFINE(HAVE_U_INT64_T) | ||
519 | MANTYPE=man | ||
520 | ;; | ||
515 | *-*-hpux*) | 521 | *-*-hpux*) |
516 | # first we define all of the options common to all HP-UX releases | 522 | # first we define all of the options common to all HP-UX releases |
517 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" | 523 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
@@ -1272,7 +1278,18 @@ LIBEDIT_MSG="no" | |||
1272 | AC_ARG_WITH(libedit, | 1278 | AC_ARG_WITH(libedit, |
1273 | [ --with-libedit[[=PATH]] Enable libedit support for sftp], | 1279 | [ --with-libedit[[=PATH]] Enable libedit support for sftp], |
1274 | [ if test "x$withval" != "xno" ; then | 1280 | [ if test "x$withval" != "xno" ; then |
1275 | if test "x$withval" != "xyes"; then | 1281 | if test "x$withval" = "xyes" ; then |
1282 | AC_PATH_PROG(PKGCONFIG, pkg-config, no) | ||
1283 | if test "x$PKGCONFIG" != "xno"; then | ||
1284 | AC_MSG_CHECKING(if $PKGCONFIG knows about libedit) | ||
1285 | if "$PKGCONFIG" libedit; then | ||
1286 | AC_MSG_RESULT(yes) | ||
1287 | use_pkgconfig_for_libedit=yes | ||
1288 | else | ||
1289 | AC_MSG_RESULT(no) | ||
1290 | fi | ||
1291 | fi | ||
1292 | else | ||
1276 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | 1293 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
1277 | if test -n "${need_dash_r}"; then | 1294 | if test -n "${need_dash_r}"; then |
1278 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" | 1295 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
@@ -1280,14 +1297,20 @@ AC_ARG_WITH(libedit, | |||
1280 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" | 1297 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
1281 | fi | 1298 | fi |
1282 | fi | 1299 | fi |
1300 | if test "x$use_pkgconfig_for_libedit" == "xyes"; then | ||
1301 | LIBEDIT=`$PKGCONFIG --libs-only-l libedit` | ||
1302 | CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`" | ||
1303 | else | ||
1304 | LIBEDIT="-ledit -lcurses" | ||
1305 | fi | ||
1306 | OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'` | ||
1283 | AC_CHECK_LIB(edit, el_init, | 1307 | AC_CHECK_LIB(edit, el_init, |
1284 | [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp]) | 1308 | [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp]) |
1285 | LIBEDIT="-ledit -lcurses" | ||
1286 | LIBEDIT_MSG="yes" | 1309 | LIBEDIT_MSG="yes" |
1287 | AC_SUBST(LIBEDIT) | 1310 | AC_SUBST(LIBEDIT) |
1288 | ], | 1311 | ], |
1289 | [ AC_MSG_ERROR(libedit not found) ], | 1312 | [ AC_MSG_ERROR(libedit not found) ], |
1290 | [ -lcurses ] | 1313 | [ $OTHERLIBS ] |
1291 | ) | 1314 | ) |
1292 | AC_MSG_CHECKING(if libedit version is compatible) | 1315 | AC_MSG_CHECKING(if libedit version is compatible) |
1293 | AC_COMPILE_IFELSE( | 1316 | AC_COMPILE_IFELSE( |
@@ -1558,8 +1581,8 @@ dnl Checks for utmp functions | |||
1558 | AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) | 1581 | AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) |
1559 | AC_CHECK_FUNCS(utmpname) | 1582 | AC_CHECK_FUNCS(utmpname) |
1560 | dnl Checks for utmpx functions | 1583 | dnl Checks for utmpx functions |
1561 | AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) | 1584 | AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline getutxuser pututxline) |
1562 | AC_CHECK_FUNCS(setutxent utmpxname) | 1585 | AC_CHECK_FUNCS(setutxdb setutxent utmpxname) |
1563 | dnl Checks for lastlog functions | 1586 | dnl Checks for lastlog functions |
1564 | AC_CHECK_FUNCS(getlastlogxbyname) | 1587 | AC_CHECK_FUNCS(getlastlogxbyname) |
1565 | 1588 | ||
@@ -4088,34 +4111,6 @@ if test -n "$conf_wtmp_location"; then | |||
4088 | fi | 4111 | fi |
4089 | 4112 | ||
4090 | 4113 | ||
4091 | dnl utmpx detection - I don't know any system so perverse as to require | ||
4092 | dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out | ||
4093 | dnl there, though. | ||
4094 | AC_MSG_CHECKING([if your system defines UTMPX_FILE]) | ||
4095 | AC_TRY_COMPILE([ | ||
4096 | #include <sys/types.h> | ||
4097 | #include <utmp.h> | ||
4098 | #ifdef HAVE_UTMPX_H | ||
4099 | #include <utmpx.h> | ||
4100 | #endif | ||
4101 | #ifdef HAVE_PATHS_H | ||
4102 | # include <paths.h> | ||
4103 | #endif | ||
4104 | ], | ||
4105 | [ char *utmpx = UTMPX_FILE; ], | ||
4106 | [ AC_MSG_RESULT(yes) ], | ||
4107 | [ AC_MSG_RESULT(no) | ||
4108 | system_utmpx_path=no ] | ||
4109 | ) | ||
4110 | if test -z "$conf_utmpx_location"; then | ||
4111 | if test x"$system_utmpx_path" = x"no" ; then | ||
4112 | AC_DEFINE(DISABLE_UTMPX) | ||
4113 | fi | ||
4114 | else | ||
4115 | AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location", | ||
4116 | [Define if you want to specify the path to your utmpx file]) | ||
4117 | fi | ||
4118 | |||
4119 | dnl wtmpx detection | 4114 | dnl wtmpx detection |
4120 | AC_MSG_CHECKING([if your system defines WTMPX_FILE]) | 4115 | AC_MSG_CHECKING([if your system defines WTMPX_FILE]) |
4121 | AC_TRY_COMPILE([ | 4116 | AC_TRY_COMPILE([ |
@@ -4152,12 +4147,13 @@ dnl Adding -Werror to CFLAGS early prevents configure tests from running. | |||
4152 | dnl Add now. | 4147 | dnl Add now. |
4153 | CFLAGS="$CFLAGS $werror_flags" | 4148 | CFLAGS="$CFLAGS $werror_flags" |
4154 | 4149 | ||
4155 | if grep "#define BROKEN_GETADDRINFO 1" confdefs.h >/dev/null || \ | 4150 | if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then |
4156 | test "x$ac_cv_func_getaddrinfo" != "xyes" ; then | 4151 | TEST_SSH_IPV6=no |
4157 | AC_SUBST(TEST_SSH_IPV6, no) | ||
4158 | else | 4152 | else |
4159 | AC_SUBST(TEST_SSH_IPV6, yes) | 4153 | TEST_SSH_IPV6=yes |
4160 | fi | 4154 | fi |
4155 | AC_CHECK_DECL(BROKEN_GETADDRINFO, TEST_SSH_IPV6=no) | ||
4156 | AC_SUBST(TEST_SSH_IPV6, $TEST_SSH_IPV6) | ||
4161 | 4157 | ||
4162 | AC_EXEEXT | 4158 | AC_EXEEXT |
4163 | AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ | 4159 | AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ |