version 1.38, 2009/06/21 14:48:42 |
version 1.39, 2009/12/07 18:43:10 |
|
|
dnl |
dnl |
dnl Copyright (c) 1994-1996,1998-2009 Todd C. Miller <Todd.Miller@courtesan.com> |
dnl Copyright (c) 1994-1996,1998-2009 Todd C. Miller <Todd.Miller@courtesan.com> |
dnl |
dnl |
AC_INIT([sudo], [1.7.2], [http://www.sudo.ws/bugs/], [sudo]) |
AC_INIT([sudo], [1.7.2p2], [http://www.sudo.ws/bugs/], [sudo]) |
AC_CONFIG_HEADER(config.h pathnames.h) |
AC_CONFIG_HEADER(config.h pathnames.h) |
dnl |
dnl |
dnl This won't work before AC_INIT |
dnl This won't work before AC_INIT |
|
|
AC_SUBST(ldap_secret) |
AC_SUBST(ldap_secret) |
AC_SUBST(nsswitch_conf) |
AC_SUBST(nsswitch_conf) |
AC_SUBST(netsvc_conf) |
AC_SUBST(netsvc_conf) |
|
AC_SUBST(secure_path) |
dnl |
dnl |
dnl Initial values for above |
dnl Initial values for above |
dnl |
dnl |
|
|
insults=off |
insults=off |
root_sudo=on |
root_sudo=on |
path_info=on |
path_info=on |
|
secure_path="not set" |
INSTALL_NOEXEC= |
INSTALL_NOEXEC= |
devdir='$(srcdir)' |
devdir='$(srcdir)' |
dnl |
dnl |
|
|
AC_MSG_CHECKING(whether to override the user's path) |
AC_MSG_CHECKING(whether to override the user's path) |
AC_ARG_WITH(secure-path, [AS_HELP_STRING([--with-secure-path], [override the user's path with a built-in one])], |
AC_ARG_WITH(secure-path, [AS_HELP_STRING([--with-secure-path], [override the user's path with a built-in one])], |
[case $with_secure_path in |
[case $with_secure_path in |
yes) AC_DEFINE_UNQUOTED(SECURE_PATH, "/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc") |
yes) with_secure_path="/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" |
AC_MSG_RESULT([:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc]) |
AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path") |
|
AC_MSG_RESULT([$with_secure_path]) |
|
secure_path="set to $with_secure_path" |
;; |
;; |
no) AC_MSG_RESULT(no) |
no) AC_MSG_RESULT(no) |
;; |
;; |
*) AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path") |
*) AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path") |
AC_MSG_RESULT([$with_secure_path]) |
AC_MSG_RESULT([$with_secure_path]) |
|
secure_path="set to F<$with_secure_path>" |
;; |
;; |
esac], AC_MSG_RESULT(no)) |
esac], AC_MSG_RESULT(no)) |
|
|
|
|
], [ |
], [ |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err" |
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err" |
AC_CHECK_LIB(krb5support, main, [SUDO_LIBS="${SUDO_LIBS} -lkrb5support,"]) |
AC_CHECK_LIB(krb5support, main, [SUDO_LIBS="${SUDO_LIBS} -lkrb5support"]) |
]) |
]) |
AUTH_OBJS="$AUTH_OBJS kerb5.o" |
AUTH_OBJS="$AUTH_OBJS kerb5.o" |
_LIBS="$LIBS" |
_LIBS="$LIBS" |
LIBS="${LIBS} ${SUDO_LIBS}" |
LIBS="${LIBS} ${SUDO_LIBS}" |
AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context krb5_get_init_creds_opt_alloc) |
AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context) |
AC_CACHE_CHECK(whether krb5_get_init_creds_opt_free takes a two argument2, |
AC_CHECK_FUNCS(krb5_get_init_creds_opt_alloc, [ |
sudo_cv_krb5_get_init_creds_opt_free_two_args, [ |
AC_CACHE_CHECK([whether krb5_get_init_creds_opt_free takes a context], |
AC_TRY_COMPILE([#include <krb5.h>], |
sudo_cv_krb5_get_init_creds_opt_free_two_args, [ |
[ |
AC_TRY_COMPILE([#include <krb5.h>], |
krb5_context context = NULL; |
[krb5_get_init_creds_opt_free(NULL, NULL);], |
krb5_get_init_creds_opt *opts = NULL; |
[sudo_cv_krb5_get_init_creds_opt_free_two_args=yes], |
krb5_get_init_creds_opt_free(context, opts); |
[sudo_cv_krb5_get_init_creds_opt_free_two_args=no] |
], |
) |
[sudo_cv_krb5_get_init_creds_opt_free_two_args=yes], |
] |
[sudo_cv_krb5_get_init_creds_opt_free_two_args=no] |
) |
) |
]) |
] |
|
) |
|
if test X"$sudo_cv_krb5_get_init_creds_opt_free_two_args" = X"yes"; then |
if test X"$sudo_cv_krb5_get_init_creds_opt_free_two_args" = X"yes"; then |
AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS) |
AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS) |
fi |
fi |
|
|
AH_TEMPLATE(HAVE_KERB4, [Define to 1 if you use Kerberos IV.]) |
AH_TEMPLATE(HAVE_KERB4, [Define to 1 if you use Kerberos IV.]) |
AH_TEMPLATE(HAVE_KERB5, [Define to 1 if you use Kerberos V.]) |
AH_TEMPLATE(HAVE_KERB5, [Define to 1 if you use Kerberos V.]) |
AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC, [Define to 1 if you have the `krb5_get_init_creds_opt_alloc' function.]) |
AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC, [Define to 1 if you have the `krb5_get_init_creds_opt_alloc' function.]) |
AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS, [Define to 1 if your `krb5_get_init_creds_opt_alloc' function takes two arguments.]) |
AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS, [Define to 1 if your `krb5_get_init_creds_opt_free' function takes two arguments.]) |
AH_TEMPLATE(HAVE_KRB5_INIT_SECURE_CONTEXT, [Define to 1 if you have the `krb5_init_secure_context' function.]) |
AH_TEMPLATE(HAVE_KRB5_INIT_SECURE_CONTEXT, [Define to 1 if you have the `krb5_init_secure_context' function.]) |
AH_TEMPLATE(HAVE_KRB5_VERIFY_USER, [Define to 1 if you have the `krb5_verify_user' function.]) |
AH_TEMPLATE(HAVE_KRB5_VERIFY_USER, [Define to 1 if you have the `krb5_verify_user' function.]) |
AH_TEMPLATE(HAVE_LBER_H, [Define to 1 if your LDAP needs <lber.h>. (OpenLDAP does not)]) |
AH_TEMPLATE(HAVE_LBER_H, [Define to 1 if your LDAP needs <lber.h>. (OpenLDAP does not)]) |