~ubuntu-branches/ubuntu/dapper/kstart/dapper

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2006-01-01 18:25:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060101182550-txo82yxcj0ittl46
Tags: 2.9-1
* New upstream release.
  - Build with --enable-reduced-depends to reduce library dependencies.
  - Improved error reporting.
* Update copyright years.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Process this file with autoconf to produce a configure script.
2
 
dnl $Id: configure.ac 162 2005-08-10 05:05:32Z rra $
 
2
dnl $Id: configure.ac 2351 2006-01-02 03:38:00Z rra $
3
3
 
4
 
AC_REVISION($Revision: 162 $)
 
4
AC_REVISION($Revision: 2351 $)
5
5
AC_PREREQ(2.57)
6
 
AC_INIT([kstart], [2.8], [rra@stanford.edu])
 
6
AC_INIT([kstart], [2.9], [rra@stanford.edu])
 
7
 
 
8
m4_include([m4/krb5.m4])
7
9
 
8
10
dnl Checks for programs.
9
11
AC_PROG_CC
25
27
        [Full path to aklog binary.])
26
28
fi
27
29
 
28
 
dnl Find the networking libraries before looking for Kerberos.
29
 
AC_SEARCH_LIBS([gethostbyname], [nsl])
30
 
AC_SEARCH_LIBS([socket], [socket], ,
31
 
    [AC_CHECK_LIB([nsl], [socket], [LIBS="$LIBS -lsocket -lnsl"], ,
32
 
        [-lsocket])])
33
 
AC_SEARCH_LIBS([res_search], [resolv])
34
 
AC_SEARCH_LIBS([crypt], [crypt])
35
 
 
36
 
dnl Where to find the Kerberos libraries.
37
 
AC_ARG_WITH([kerberos],
38
 
    AC_HELP_STRING([--with-kerberos=DIR],
39
 
        [Path to Kerberos headers and libraries]),
40
 
    [if test x"$withval" != xno ; then
41
 
         CPPFLAGS="-I$kerberos/include $CPPFLAGS"
42
 
         LDFLAGS="-L$kerberos/lib $LDFLAGS"
43
 
     fi])
44
 
 
45
 
dnl Find the Kerberos libraries.  Supports both MIT and Heimdal.
46
 
AC_CHECK_LIB([krb4], [main],
47
 
    [KRBLIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
48
 
    [KRBLIBS="-lcrypto -lkrb"],
49
 
    [-ldes425 -lkrb5 -lk5crypto -lcom_err])
50
 
AC_CHECK_LIB([k5crypto], [main],
51
 
    [KRB5LIBS="-lkrb5 -lk5crypto -lcom_err"],
52
 
    [KRB5LIBS="-lkrb5 -lcrypto -lasn1 -lroken -lcom_err"],
53
 
    [-lk5crypto -lcom_err])
54
 
AC_SUBST([KRBLIBS])
55
 
AC_SUBST([KRB5LIBS])
56
 
 
57
 
dnl Allow the user to build statically against the Kerberos libraries.
58
 
AC_ARG_ENABLE([static],
59
 
    AC_HELP_STRING([--enable-static],
60
 
        [Link against the static Kerberos libraries]),
61
 
    [if test x"$enableval" = xyes ; then
62
 
        KRBLIBS="-Wl,-Bstatic $KRBLIBS -Wl,-Bdynamic"
63
 
        KRB5LIBS="-Wl,-Bstatic $KRB5LIBS -Wl,-Bdynamic"
64
 
     fi])
65
 
 
66
 
dnl See if AFS setpag support is desired.
67
 
AC_ARG_WITH([afs-setpag],
68
 
    AC_HELP_STRING([--with-afs-setpag=DIR],
69
 
        [Enable AFS setpag support, libraries at DIR]),
70
 
    [if test x"$withval" != xno ; then
71
 
        if test x"$withval" != xyes ; then
72
 
            LDFLAGS="-L$withval/lib $LDFLAGS"
73
 
        fi
74
 
        AC_CHECK_LIB([afsauthent], [setpag],
75
 
            [LIBS="-lafsauthent -lafsrpc -lpthread $LIBS"
76
 
             AC_DEFINE([HAVE_SETPAG], 1,
77
 
                [Define to 1 if you have the AFS setpag function.])],
78
 
            [AC_MSG_ERROR([setpag function not found])],
79
 
            [-lafsrpc -lpthread])
80
 
     fi])
81
 
 
82
30
dnl Allow the user to disable Kerberos v4 support.  Useful for building
83
31
dnl against just Heimdal, without KTH Kerberos.
84
32
K4START=k4start
93
41
AC_SUBST([K4START])
94
42
AC_SUBST([K4START_MAN])
95
43
 
96
 
dnl Check to see if we need to use our local lifetime function.  All of this
97
 
dnl machinery is annoying, but required because AC_REPLACE_FUNCS doesn't take
98
 
dnl an argument for extra libraries to check.
 
44
dnl Check for the Kerberos v5 libraries and for portability between krb5 and
 
45
dnl Heimdal when getting initial tickets.
99
46
save_LIBS=$LIBS
100
 
LIBS="$KRBLIBS $LIBS"
 
47
RRA_LIB_KRB5([krb5], [true])
 
48
AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_default_flags krb5_err])
 
49
KRB5LIBS=$LIBS
 
50
LIBS=$save_LIBS
 
51
AC_SUBST([KRB5LIBS])
 
52
 
 
53
dnl If we're building k4start, check for the Kerberos v4 libraries and add our
 
54
dnl local lifetime implementation if needed.
 
55
KRBLIBS=
101
56
if test x"$K4START" != x ; then
 
57
    save_LIBS=$LIBS
 
58
    RRA_LIB_KRB5([krb4], [true])
102
59
    AC_CHECK_FUNCS([krb_life_to_time], , [AC_LIBOBJ([lifetime])])
 
60
    KRBLIBS=$LIBS
 
61
    LIBS=$save_LIBS
103
62
fi
104
 
LIBS=$save_LIBS
 
63
AC_SUBST([KRBLIBS])
 
64
 
 
65
dnl See if AFS setpag support is desired.
 
66
AC_ARG_WITH([afs-setpag],
 
67
    AC_HELP_STRING([--with-afs-setpag=DIR],
 
68
        [Enable AFS setpag support, libraries at DIR]),
 
69
    [if test x"$withval" != xno ; then
 
70
        if test x"$withval" != xyes ; then
 
71
            LDFLAGS="-L$withval/lib $LDFLAGS"
 
72
        fi
 
73
        AC_CHECK_LIB([afsauthent], [lsetpag],
 
74
            [AFSLIBS="-lafsauthent -lafsrpc"
 
75
             AC_DEFINE([HAVE_LSETPAG], 1,
 
76
                [Define to 1 if you have the AFS lsetpag function.])],
 
77
            [AC_CHECK_LIB([kafs], [k_setpag],
 
78
                [AFSLIBS="-lkafs"
 
79
                 AC_CHECK_HEADERS([kafs.h])
 
80
                 AC_DEFINE([HAVE_K_SETPAG], 1,
 
81
                     [Define to 1 if you have the k_setpag function.])],
 
82
                [AC_MSG_ERROR([setpag function not found])])],
 
83
            [-lafsrpc])
 
84
        AC_SUBST([AFSLIBS])
 
85
     fi])
105
86
 
106
87
dnl Checks for header files.
107
 
AC_CHECK_HEADERS([kerberosIV/krb.h])
 
88
AC_HEADER_TIME
 
89
AC_CHECK_HEADERS([sys/time.h])
108
90
 
109
91
dnl Checks for types.
110
92
AC_CHECK_TYPES([long long])
111
 
AC_CHECK_TYPES([krb5_realm], , , [#include <krb5.h>])
112
93
 
113
94
dnl Checks for functions.
114
95
AC_CHECK_FUNCS([setsid])
115
96
AC_REPLACE_FUNCS([daemon mkstemp])
116
97
 
117
 
dnl Check for Heimdal functions and different generations of Kerberos v5
118
 
dnl libraries.
119
 
save_LIBS=$LIBS
120
 
LIBS="$KRB5LIBS $LIBS"
121
 
AC_CHECK_FUNCS([initialize_krb5_error_table])
122
 
AC_CHECK_FUNCS([krb5_free_keytab_entry_contents])
123
 
AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_default_flags])
124
 
LIBS=$save_LIBS
125
 
 
126
98
dnl Output the results.
127
99
AC_CONFIG_HEADER([config.h])
128
100
AC_CONFIG_FILES([Makefile])