version 1.33, 2008/01/21 19:44:29 |
version 1.34, 2008/07/31 16:44:03 |
|
|
dnl |
dnl |
dnl Process this file with GNU autoconf to produce a configure script. |
dnl Process this file with GNU autoconf to produce a configure script. |
dnl $Sudo: configure.in,v 1.413.2.43 2008/01/21 16:46:50 millert Exp $ |
dnl $Sudo: configure.in,v 1.413.2.53 2008/06/22 20:23:56 millert Exp $ |
dnl |
dnl |
dnl Copyright (c) 1994-1996,1998-2007 Todd C. Miller <Todd.Miller@courtesan.com> |
dnl Copyright (c) 1994-1996,1998-2007 Todd C. Miller <Todd.Miller@courtesan.com> |
dnl |
dnl |
|
|
AC_SUBST(SUDOERS_UID) |
AC_SUBST(SUDOERS_UID) |
AC_SUBST(SUDOERS_GID) |
AC_SUBST(SUDOERS_GID) |
AC_SUBST(DEV) |
AC_SUBST(DEV) |
|
AC_SUBST(SELINUX) |
|
AC_SUBST(BAMAN) |
|
AC_SUBST(LCMAN) |
|
AC_SUBST(SEMAN) |
AC_SUBST(mansectsu) |
AC_SUBST(mansectsu) |
AC_SUBST(mansectform) |
AC_SUBST(mansectform) |
AC_SUBST(mansrcdir) |
AC_SUBST(mansrcdir) |
|
AC_SUBST(NOEXECFILE) |
AC_SUBST(NOEXECDIR) |
AC_SUBST(NOEXECDIR) |
AC_SUBST(noexec_file) |
AC_SUBST(noexec_file) |
AC_SUBST(INSTALL_NOEXEC) |
AC_SUBST(INSTALL_NOEXEC) |
|
|
: ${SUDOERS_UID='0'} |
: ${SUDOERS_UID='0'} |
: ${SUDOERS_GID='0'} |
: ${SUDOERS_GID='0'} |
DEV="#" |
DEV="#" |
|
SELINUX="#" |
|
BAMAN='.\" ' |
|
LCMAN='.\" ' |
|
SEMAN='.\" ' |
AUTH_OBJS= |
AUTH_OBJS= |
AUTH_REG= |
AUTH_REG= |
AUTH_EXCL= |
AUTH_EXCL= |
|
|
dnl |
dnl |
dnl Override default configure dirs... |
dnl Override default configure dirs... |
dnl |
dnl |
test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man' |
if test X"$prefix" = X"NONE"; then |
|
test "$mandir" = '${datarootdir}/man' && mandir='$(prefix)/man' |
|
else |
|
test "$mandir" = '${datarootdir}/man' && mandir='$(datarootdir)/man' |
|
fi |
test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' |
test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' |
test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' |
test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' |
test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc' |
test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc' |
|
|
esac |
esac |
], AC_MSG_RESULT(no)) |
], AC_MSG_RESULT(no)) |
|
|
|
AC_ARG_WITH(selinux, [ --with-selinux enable SELinux support], |
|
[case $with_selinux in |
|
yes) AC_DEFINE(HAVE_SELINUX) |
|
SUDO_LIBS="${SUDO_LIBS} -lselinux" |
|
SUDO_OBJS="${SUDO_OBJS} selinux.o" |
|
PROGS="${PROGS} sesh" |
|
SELINUX="" |
|
SEMAN="" |
|
;; |
|
no) ;; |
|
*) AC_MSG_ERROR(["--with-selinux does not take an argument."]) |
|
;; |
|
esac]) |
|
|
dnl |
dnl |
dnl If we don't have egrep we can't do anything... |
dnl If we don't have egrep we can't do anything... |
dnl |
dnl |
|
|
*) ;; |
*) ;; |
esac], [with_noexec="$libexecdir/sudo_noexec$_shrext"]) |
esac], [with_noexec="$libexecdir/sudo_noexec$_shrext"]) |
AC_MSG_RESULT($with_noexec) |
AC_MSG_RESULT($with_noexec) |
|
NOEXECFILE="sudo_noexec$_shrext" |
NOEXECDIR="`echo $with_noexec|sed 's:^\(.*\)/[[^/]]*:\1:'`" |
NOEXECDIR="`echo $with_noexec|sed 's:^\(.*\)/[[^/]]*:\1:'`" |
|
|
dnl |
dnl |
|
|
: ${mansectsu='1m'} |
: ${mansectsu='1m'} |
: ${mansectform='4'} |
: ${mansectform='4'} |
;; |
;; |
*-*-linux*) |
*-*-linux*|*-*-k*bsd*-gnu) |
OSDEFS="${OSDEFS} -D_GNU_SOURCE" |
OSDEFS="${OSDEFS} -D_GNU_SOURCE" |
# Some Linux versions need to link with -lshadow |
# Some Linux versions need to link with -lshadow |
shadow_funcs="getspnam" |
shadow_funcs="getspnam" |
|
|
fi |
fi |
fi |
fi |
if test ${with_logincap-'no'} != "no"; then |
if test ${with_logincap-'no'} != "no"; then |
AC_CHECK_HEADERS(login_cap.h, [ |
AC_CHECK_HEADERS(login_cap.h, [LCMAN="" |
case "$OS" in |
case "$OS" in |
freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" |
freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" |
;; |
;; |
|
|
AC_FUNC_GETGROUPS |
AC_FUNC_GETGROUPS |
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ |
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ |
strftime setrlimit initgroups getgroups fstat gettimeofday \ |
strftime setrlimit initgroups getgroups fstat gettimeofday \ |
setlocale getaddrinfo) |
setlocale getaddrinfo setsid) |
if test -z "$SKIP_SETRESUID"; then |
if test -z "$SKIP_SETRESUID"; then |
AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes]) |
AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes]) |
fi |
fi |
|
|
dnl Check for the dirfd function/macro. If not found, look for dd_fd in DIR. |
dnl Check for the dirfd function/macro. If not found, look for dd_fd in DIR. |
dnl |
dnl |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
#include <$ac_header_dirent>]], [[DIR d; (void)dirfd(&d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h> |
#include <$ac_header_dirent>]], [[DIR *d; (void)dirfd(d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h> |
#include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])]) |
#include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])]) |
dnl |
dnl |
dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS |
dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS |
|
|
esac], AC_MSG_RESULT(yes)) |
esac], AC_MSG_RESULT(yes)) |
case $host in |
case $host in |
*-*-linux*|*-*-solaris*) |
*-*-linux*|*-*-solaris*) |
AC_CHECK_FUNCS(dgettext, [], |
# dgettext() may be defined to dgettext_libintl in the |
[AC_CHECK_LIB(intl, dgettext, [LIBS="${LIBS} -lintl"] |
# header file, so first check that it links w/ additional |
|
# libs, then try with -lintl |
|
AC_LINK_IFELSE([AC_LANG_PROGRAM( |
|
[[#include <libintl.h>]], [(void)dgettext((char *)0, (char *)0);])], |
|
[AC_DEFINE(HAVE_DGETTEXT)], |
|
[AC_CHECK_LIB(intl, dgettext, [LIBS="${LIBS} -lintl"] |
[AC_DEFINE(HAVE_DGETTEXT)])]) |
[AC_DEFINE(HAVE_DGETTEXT)])]) |
;; |
;; |
esac |
esac |
|
|
if test ${with_bsdauth-'no'} != "no"; then |
if test ${with_bsdauth-'no'} != "no"; then |
AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H) |
AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H) |
[AUTH_OBJS="$AUTH_OBJS bsdauth.o"] |
[AUTH_OBJS="$AUTH_OBJS bsdauth.o"] |
[BSDAUTH_USAGE='[[-a auth_type]] '] |
[AUTH_EXCL=BSD_AUTH; BAMAN=""], |
[AUTH_EXCL=BSD_AUTH], |
|
[AC_MSG_ERROR([BSD authentication was specified but bsd_auth.h could not be found])]) |
[AC_MSG_ERROR([BSD authentication was specified but bsd_auth.h could not be found])]) |
fi |
fi |
|
|
|
|
AC_CHECK_FUNCS(ldap_initialize ldap_start_tls_s ldapssl_init ldapssl_set_strength) |
AC_CHECK_FUNCS(ldap_initialize ldap_start_tls_s ldapssl_init ldapssl_set_strength) |
AC_CHECK_HEADERS([ldap_ssl.h] [mps/ldap_ssl.h], [break], [], [#include <ldap.h>]) |
AC_CHECK_HEADERS([ldap_ssl.h] [mps/ldap_ssl.h], [break], [], [#include <ldap.h>]) |
|
|
SUDO_LIBS="${SUDO_LIBS}${LDAP_LIBS}" |
SUDO_LIBS="${SUDO_LIBS} ${LDAP_LIBS}" |
LIBS="$_LIBS" |
LIBS="$_LIBS" |
LDFLAGS="$_LDFLAGS" |
LDFLAGS="$_LDFLAGS" |
# XXX - OpenLDAP has deprecated ldap_get_values() |
# XXX - OpenLDAP has deprecated ldap_get_values() |
|
|
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' |
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' |
|
|
dnl |
dnl |
dnl Defer setting _PATH_SUDO_NOEXEC until after exec_prefix is set |
dnl Defer setting _PATH_SUDO_NOEXEC and _PATH_SUDO_SESH |
|
dnl until after exec_prefix is set |
dnl XXX - this is gross! |
dnl XXX - this is gross! |
dnl |
dnl |
if test "$with_noexec" != "no"; then |
if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then |
PROGS="${PROGS} sudo_noexec.la" |
|
INSTALL_NOEXEC="install-noexec" |
|
|
|
oexec_prefix="$exec_prefix" |
oexec_prefix="$exec_prefix" |
if test "$exec_prefix" = '$(prefix)'; then |
if test "$exec_prefix" = '$(prefix)'; then |
if test "$prefix" = "NONE"; then |
if test "$prefix" = "NONE"; then |
|
|
exec_prefix="$prefix" |
exec_prefix="$prefix" |
fi |
fi |
fi |
fi |
eval noexec_file="$with_noexec" |
if test X"$with_noexec" != X"no"; then |
AC_DEFINE_UNQUOTED(_PATH_SUDO_NOEXEC, "$noexec_file", [The fully qualified pathname of sudo_noexec.so]) |
PROGS="${PROGS} sudo_noexec.la" |
|
INSTALL_NOEXEC="install-noexec" |
|
|
|
eval noexec_file="$with_noexec" |
|
AC_DEFINE_UNQUOTED(_PATH_SUDO_NOEXEC, "$noexec_file", [The fully qualified pathname of sudo_noexec.so]) |
|
fi |
|
if test X"$with_selinux" != X"no"; then |
|
eval sesh_file="$libexecdir/sesh" |
|
AC_DEFINE_UNQUOTED(_PATH_SUDO_SESH, "$sesh_file", [The fully qualified pathname of sesh]) |
|
fi |
exec_prefix="$oexec_prefix" |
exec_prefix="$oexec_prefix" |
fi |
fi |
|
|
|
|
AH_TEMPLATE(HAVE_PAM, [Define to 1 if you use PAM authentication.]) |
AH_TEMPLATE(HAVE_PAM, [Define to 1 if you use PAM authentication.]) |
AH_TEMPLATE(HAVE_PROJECT_H, [Define to 1 if you have the <project.h> header file.]) |
AH_TEMPLATE(HAVE_PROJECT_H, [Define to 1 if you have the <project.h> header file.]) |
AH_TEMPLATE(HAVE_SECURID, [Define to 1 if you use SecurID for authentication.]) |
AH_TEMPLATE(HAVE_SECURID, [Define to 1 if you use SecurID for authentication.]) |
|
AH_TEMPLATE(HAVE_SELINUX, [Define to 1 to enable SELinux RBAC support.]) |
AH_TEMPLATE(HAVE_SIA, [Define to 1 if you use SIA authentication.]) |
AH_TEMPLATE(HAVE_SIA, [Define to 1 if you use SIA authentication.]) |
AH_TEMPLATE(HAVE_SIGACTION_T, [Define to 1 if <signal.h> has the sigaction_t typedef.]) |
AH_TEMPLATE(HAVE_SIGACTION_T, [Define to 1 if <signal.h> has the sigaction_t typedef.]) |
AH_TEMPLATE(HAVE_SKEY, [Define to 1 if you use S/Key.]) |
AH_TEMPLATE(HAVE_SKEY, [Define to 1 if you use S/Key.]) |