]> andersk Git - openssh.git/blobdiff - configure.ac
- (dtucker) [INSTALL configure.ac] Make zlib version check test for 1.1.4 or
[openssh.git] / configure.ac
index 1e8b14558d3adc9febbb20e6b1960222b84c71ac..3a96fd3f9f91a9585e51e8fa73df3af40bb35977 100644 (file)
@@ -123,7 +123,7 @@ case "$host" in
                ])
        dnl Check for various auth function declarations in headers.
        AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess,
-           passwdexpired], , , [#include <usersec.h>])
+           passwdexpired, setauthdb], , , [#include <usersec.h>])
        dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
        AC_CHECK_DECLS(loginfailed,
                 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
@@ -361,6 +361,7 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(SETEUID_BREAKS_SETUID)
        AC_DEFINE(BROKEN_SETREUID)
        AC_DEFINE(BROKEN_SETREGID)
+       AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
        ;;
 # UnixWare 7.x, OpenUNIX 8
 *-*-sysv5*)
@@ -368,6 +369,7 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(SETEUID_BREAKS_SETUID)
        AC_DEFINE(BROKEN_SETREUID)
        AC_DEFINE(BROKEN_SETREGID)
+       AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
        ;;
 *-*-sysv*)
        ;;
@@ -587,10 +589,9 @@ AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
 dnl zlib is required
 AC_ARG_WITH(zlib,
        [  --with-zlib=PATH        Use zlib in PATH],
-       [
-               if test "x$withval" = "xno" ; then
-                       AC_MSG_ERROR([*** zlib is required ***])
-               fi
+       [ if test "x$withval" = "xno" ; then
+               AC_MSG_ERROR([*** zlib is required ***])
+         elif test "x$withval" != "xyes"; then
                if test -d "$withval/lib"; then
                        if test -n "${need_dash_r}"; then
                                LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -609,7 +610,7 @@ AC_ARG_WITH(zlib,
                else
                        CPPFLAGS="-I${withval} ${CPPFLAGS}"
                fi
-       ]
+       fi ]
 )
 
 AC_CHECK_LIB(z, deflate, ,
@@ -642,29 +643,40 @@ AC_ARG_WITH(zlib-version-check,
        ]
 )
 
-AC_MSG_CHECKING(for zlib 1.1.4 or greater)
+AC_MSG_CHECKING(for possibly buggy zlib)
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
 #include <zlib.h>
 int main()
 {
-       int a, b, c, v;
-       if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3)
+       int a=0, b=0, c=0, d=0, n, v;
+       n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
+       if (n != 3 && n != 4)
                exit(1);
-       v = a*1000000 + b*1000 + c;
-       if (v >= 1001004)
+       v = a*1000000 + b*10000 + c*100 + d;
+       fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
+
+       /* 1.1.4 is OK */
+       if (a == 1 && b == 1 && c >= 4)
+               exit(0);
+
+       /* 1.2.1.2 and up are OK */
+       if (v >= 1020102)
                exit(0);
+
        exit(2);
 }
        ]])],
-       AC_MSG_RESULT(yes),
-       [ AC_MSG_RESULT(no)
+       AC_MSG_RESULT(no),
+       [ AC_MSG_RESULT(yes)
          if test -z "$zlib_check_nonfatal" ; then
                AC_MSG_ERROR([*** zlib too old - check config.log ***
 Your reported zlib version has known security problems.  It's possible your
 vendor has fixed these problems without changing the version number.  If you
 are sure this is the case, you can disable the check by running
 "./configure --without-zlib-version-check".
-If you are in doubt, upgrade zlib to version 1.1.4 or greater.])
+If you are in doubt, upgrade zlib to version 1.2.1.2 or greater.
+See http://www.gzip.org/zlib/ for details.])
          else
                AC_MSG_WARN([zlib version may have security problems])
          fi
@@ -851,13 +863,18 @@ LIBEDIT_MSG="no"
 AC_ARG_WITH(libedit,
        [  --with-libedit[[=PATH]]   Enable libedit support for sftp],
        [ if test "x$withval" != "xno" ; then
+               if test "x$withval" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -I$withval/include"
+                       LDFLAGS="$LDFLAGS -L$withval/lib"
+               fi
                AC_CHECK_LIB(edit, el_init,
                        [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp])
                          LIBEDIT="-ledit -lcurses"
                          LIBEDIT_MSG="yes"
                          AC_SUBST(LIBEDIT)
                        ],
-                       [], [-lcurses]
+                       [ AC_MSG_ERROR(libedit not found) ],
+                       [ -lcurses ]
                )
        fi ]
 )
@@ -1016,7 +1033,9 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
                [#include <sys/types.h>
                 #include <sys/socket.h>],
                [int i = SO_PEERCRED;],
-               [AC_MSG_RESULT(yes)],
+               [ AC_MSG_RESULT(yes)
+                 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option])
+               ],
                [AC_MSG_RESULT(no)
                NO_PEERCHECK=1]
         )
This page took 0.034741 seconds and 4 git commands to generate.