~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-01-26 13:07:40 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100126130740-d7r70jqrqlbvz3r0
Tags: 1:5.3p1-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Add support for registering ConsoleKit sessions on login.
  - Drop openssh-blacklist and openssh-blacklist-extra to Suggests; they
    take up a lot of CD space, and I suspect that rolling them out in
    security updates has covered most affected systems now.
  - Convert to Upstart.  The init script is still here for the benefit of
    people running sshd in chroots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: configure.ac,v 1.415 2009/02/16 04:37:03 djm Exp $
 
1
# $Id: configure.ac,v 1.427 2009/09/11 04:56:08 dtucker Exp $
2
2
#
3
3
# Copyright (c) 1999-2004 Damien Miller
4
4
#
15
15
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
16
 
17
17
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18
 
AC_REVISION($Revision: 1.415 $)
 
18
AC_REVISION($Revision: 1.427 $)
19
19
AC_CONFIG_SRCDIR([ssh.c])
20
20
 
21
21
AC_CONFIG_HEADER(config.h)
279
279
        sys/cdefs.h \
280
280
        sys/dir.h \
281
281
        sys/mman.h \
282
 
        sys/mount.h \
283
282
        sys/ndir.h \
284
283
        sys/poll.h \
285
284
        sys/prctl.h \
326
325
#include <sys/types.h>
327
326
])
328
327
 
 
328
# older BSDs need sys/param.h before sys/mount.h
 
329
AC_CHECK_HEADERS(sys/mount.h, [], [], [
 
330
#include <sys/param.h>
 
331
])
 
332
 
329
333
# Messages for features tested for in target-specific section
330
334
SIA_MSG="no"
331
335
SPC_MSG="no"
434
438
        AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
435
439
        AC_DEFINE(DISABLE_SHADOW, 1,
436
440
                [Define if you want to disable shadow passwords])
437
 
        AC_DEFINE(IP_TOS_IS_BROKEN, 1,
438
 
                [Define if your system choked on IP TOS setting])
439
441
        AC_DEFINE(NO_X11_UNIX_SOCKETS, 1,
440
442
                [Define if X11 doesn't support AF_UNIX sockets on that system])
441
443
        AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1,
444
446
        AC_DEFINE(DISABLE_FD_PASSING, 1,
445
447
                [Define if your platform needs to skip post auth
446
448
                file descriptor passing])
 
449
        AC_DEFINE(SSH_IOBUFSZ, 65536, [Windows is sensitive to read buffer size])
447
450
        ;;
448
451
*-*-dgux*)
449
 
        AC_DEFINE(IP_TOS_IS_BROKEN)
 
452
        AC_DEFINE(IP_TOS_IS_BROKEN, 1,
 
453
                [Define if your system choked on IP TOS setting])
450
454
        AC_DEFINE(SETEUID_BREAKS_SETUID)
451
455
        AC_DEFINE(BROKEN_SETREUID)
452
456
        AC_DEFINE(BROKEN_SETREGID)
693
697
                after setsid()])
694
698
        AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
695
699
                in case the name is longer than 8 chars])
 
700
        AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang])
696
701
        external_path_file=/etc/default/login
697
702
        # hardwire lastlog location (can't detect it on some versions)
698
703
        conf_lastlog_location="/var/adm/lastlog"
1004
1009
        fi ]
1005
1010
)
1006
1011
 
 
1012
AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1007
1013
AC_CHECK_LIB(z, deflate, ,
1008
1014
        [
1009
1015
                saved_CPPFLAGS="$CPPFLAGS"
1024
1030
                )
1025
1031
        ]
1026
1032
)
1027
 
AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1028
1033
 
1029
1034
AC_ARG_WITH(zlib-version-check,
1030
1035
        [  --without-zlib-version-check Disable zlib version check],
1917
1922
                        LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
1918
1923
                fi
1919
1924
                CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
 
1925
                AC_CHECK_HEADER([openssl/opensslv.h], ,
 
1926
                    AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***]))
1920
1927
                AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1921
1928
                        [
1922
1929
                                AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
2101
2108
        ]
2102
2109
)
2103
2110
 
 
2111
AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
 
2112
AC_LINK_IFELSE(
 
2113
        [AC_LANG_SOURCE([[
 
2114
#include <string.h>
 
2115
#include <openssl/evp.h>
 
2116
int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
 
2117
        ]])],
 
2118
        [
 
2119
                AC_MSG_RESULT(yes)
 
2120
        ],
 
2121
        [
 
2122
                AC_MSG_RESULT(no)
 
2123
                AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
 
2124
                    [Define if EVP_DigestUpdate returns void])
 
2125
        ]
 
2126
)
 
2127
 
2104
2128
# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2105
2129
# because the system crypt() is more featureful.
2106
2130
if test "x$check_for_libcrypt_before" = "x1"; then
2719
2743
#endif
2720
2744
])
2721
2745
 
2722
 
AC_CHECK_TYPES(in_addr_t,,,
 
2746
AC_CHECK_TYPES([in_addr_t, in_port_t],,,
2723
2747
[#include <sys/types.h>
2724
2748
#include <netinet/in.h>])
2725
2749
 
3089
3113
                file descriptor passing])
3090
3114
fi
3091
3115
 
3092
 
AC_MSG_CHECKING(if f_fsid has val members)
 
3116
AC_MSG_CHECKING(if struct statvfs.f_fsid is integral type)
3093
3117
AC_TRY_COMPILE([
3094
3118
#include <sys/types.h>
3095
 
#include <sys/statvfs.h>],
3096
 
[struct fsid_t t; t.val[0] = 0;],
3097
 
        [ AC_MSG_RESULT(yes)
3098
 
          AC_DEFINE(FSID_HAS_VAL, 1, f_fsid has members) ],
3099
 
        [ AC_MSG_RESULT(no) ]
3100
 
)
 
3119
#include <sys/stat.h>
 
3120
#ifdef HAVE_SYS_TIME_H
 
3121
# include <sys/time.h>
 
3122
#endif
 
3123
#ifdef HAVE_SYS_MOUNT_H
 
3124
#include <sys/mount.h>
 
3125
#endif
 
3126
#ifdef HAVE_SYS_STATVFS_H
 
3127
#include <sys/statvfs.h>
 
3128
#endif
 
3129
], [struct statvfs s; s.f_fsid = 0;],
 
3130
[ AC_MSG_RESULT(yes) ],
 
3131
[ AC_MSG_RESULT(no)
 
3132
 
 
3133
        AC_MSG_CHECKING(if fsid_t has member val)
 
3134
        AC_TRY_COMPILE([
 
3135
#include <sys/types.h>
 
3136
#include <sys/statvfs.h>],
 
3137
        [fsid_t t; t.val[0] = 0;],
 
3138
        [ AC_MSG_RESULT(yes)
 
3139
          AC_DEFINE(FSID_HAS_VAL, 1, fsid_t has member val) ],
 
3140
        [ AC_MSG_RESULT(no) ])
 
3141
 
 
3142
        AC_MSG_CHECKING(if f_fsid has member __val)
 
3143
        AC_TRY_COMPILE([
 
3144
#include <sys/types.h>
 
3145
#include <sys/statvfs.h>],
 
3146
        [fsid_t t; t.__val[0] = 0;],
 
3147
        [ AC_MSG_RESULT(yes)
 
3148
          AC_DEFINE(FSID_HAS___VAL, 1, fsid_t has member __val) ],
 
3149
        [ AC_MSG_RESULT(no) ])
 
3150
])
3101
3151
 
3102
3152
AC_CACHE_CHECK([for msg_control field in struct msghdr],
3103
3153
                ac_cv_have_control_in_msghdr, [
3299
3349
                AC_SEARCH_LIBS(res_query, resolv)
3300
3350
                AC_SEARCH_LIBS(dn_expand, resolv)
3301
3351
                AC_MSG_CHECKING(if res_query will link)
3302
 
                AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
 
3352
                AC_LINK_IFELSE([
 
3353
#include "confdefs.h"
 
3354
#include <sys/types.h>
 
3355
#include <netinet/in.h>
 
3356
#include <arpa/nameser.h>
 
3357
#include <netdb.h>
 
3358
#include <resolv.h>
 
3359
int main()
 
3360
{
 
3361
        res_query (0, 0, 0, 0, 0);
 
3362
        return 0;
 
3363
}
 
3364
                   ],
 
3365
                    AC_MSG_RESULT(yes),
3303
3366
                   [AC_MSG_RESULT(no)
3304
3367
                    saved_LIBS="$LIBS"
3305
3368
                    LIBS="$LIBS -lresolv"
3306
3369
                    AC_MSG_CHECKING(for res_query in -lresolv)
3307
3370
                    AC_LINK_IFELSE([
 
3371
#include "confdefs.h"
 
3372
#include <sys/types.h>
 
3373
#include <netinet/in.h>
 
3374
#include <arpa/nameser.h>
 
3375
#include <netdb.h>
3308
3376
#include <resolv.h>
3309
3377
int main()
3310
3378
{
3312
3380
        return 0;
3313
3381
}
3314
3382
                        ],
3315
 
                        [LIBS="$LIBS -lresolv"
3316
 
                         AC_MSG_RESULT(yes)],
 
3383
                        [AC_MSG_RESULT(yes)],
3317
3384
                        [LIBS="$saved_LIBS"
3318
3385
                         AC_MSG_RESULT(no)])
3319
3386
                    ])
3382
3449
                AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
3383
3450
                KRB5_MSG="yes"
3384
3451
 
3385
 
                AC_MSG_CHECKING(for krb5-config)
3386
 
                if test -x  $KRB5ROOT/bin/krb5-config ; then
3387
 
                        KRB5CONF=$KRB5ROOT/bin/krb5-config
3388
 
                        AC_MSG_RESULT($KRB5CONF)
 
3452
                AC_PATH_PROG([KRB5CONF],[krb5-config],
 
3453
                             [$KRB5ROOT/bin/krb5-config],
 
3454
                             [$KRB5ROOT/bin:$PATH])
 
3455
                if test -x $KRB5CONF ; then
3389
3456
 
3390
3457
                        AC_MSG_CHECKING(for gssapi support)
3391
3458
                        if $KRB5CONF | grep gssapi >/dev/null ; then
3411
3478
                                         AC_MSG_RESULT(no)
3412
3479
                        )
3413
3480
                else
3414
 
                        AC_MSG_RESULT(no)
3415
3481
                        CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
3416
3482
                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
3417
3483
                        AC_MSG_CHECKING(whether we are using Heimdal)