Disable environment resetting. This sets the default value
of the "env_reset" Defaults option in sudoers to false.
+ --enable-nls[=location]
+ Enable natural language support using the gettext() family
+ of functions. If specified, location is the base directory
+ containing the libintl include and lib directories. If
+ this option is not specified, configure will look for the
+ gettext() family of functions in the standard C library
+ first, then check for a standalone libintl (linking with
+ libiconv as needed).
+
--disable-nls
Disable natural language support. By default, sudo will
use the gettext() family of functions, if available, to
# Check whether --enable-zlib was given.
if test "${enable_zlib+set}" = set; then :
enableval=$enable_zlib;
+else
+ enable_zlib=yes
fi
# Check whether --enable-nls was given.
if test "${enable_nls+set}" = set; then :
- enableval=$enable_nls; case "$enableval" in
- yes|no) enable_nls=$enableval
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring unknown argument to --enable-nls: $enableval" >&5
-$as_echo "$as_me: WARNING: Ignoring unknown argument to --enable-nls: $enableval" >&2;}
- ;;
- esac
-
+ enableval=$enable_nls;
else
enable_nls=yes
fi
# Since gcc prefers /usr/local/include to /usr/include, we need to
# make sure we use the gettext() that matches the include file.
# First check that it links w/o additional libs, then try with -lintl.
-if test "$enable_nls" = "yes"; then
+if test "$enable_nls" != "no"; then
+ if test "$enable_nls" != "yes"; then
+ CPPFLAGS="${CPPFLAGS} -I${enable_nls}/include"
+
+ if test X"$with_rpath" = X"yes"; then
+ case "$host" in
+ *-*-hpux*) LDFLAGS="${LDFLAGS} -L$enable_nls/lib -Wl,+b,$enable_nls/lib"
+ ;;
+ *) LDFLAGS="${LDFLAGS} -L$enable_nls/lib -Wl,-R$enable_nls/lib"
+ ;;
+ esac
+ else
+ LDFLAGS="${LDFLAGS} -L$enable_nls/lib"
+ fi
+ if test X"$blibpath" != X"" -a "LDFLAGS" = "SUDO_LDFLAGS"; then
+ blibpath_add="${blibpath_add}:$enable_nls/lib"
+ fi
+
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext" >&5
$as_echo_n "checking for gettext... " >&6; }
if test "${sudo_cv_gettext+set}" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_gettext" >&5
$as_echo "$sudo_cv_gettext" >&6; }
- if test "$sudo_cv_gettext" = "yes"; then
- $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
-
- else
+ if test "$sudo_cv_gettext" != "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
$as_echo_n "checking for gettext in -lintl... " >&6; }
if test "${ac_cv_lib_intl_gettext+set}" = set; then :
$as_echo "$ac_cv_lib_intl_gettext" >&6; }
if test "x$ac_cv_lib_intl_gettext" = x""yes; then :
LIBINTL="-lintl"
- $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
$as_echo "$ac_cv_lib_intl_gettext_liconv" >&6; }
if test "x$ac_cv_lib_intl_gettext_liconv" = x""yes; then :
LIBINTL="-lintl -liconv"
- $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
-
else
enable_nls=no
fi
fi
fi
- if test "$enable_nls" = "yes"; then
+ if test "$enable_nls" != "no"; then
+ $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
+
# List of available translations
LINGUAS="uk zh_CN"
fi
fi
-case ${enable_zlib-"yes"} in
+case "$enable_zlib" in
yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzdopen in -lz" >&5
$as_echo_n "checking for gzdopen in -lz... " >&6; }
AC_ARG_ENABLE(zlib,
[AS_HELP_STRING([--enable-zlib[[=PATH]]], [Whether to enable or disable zlib])],
-[])
+[], [enable_zlib=yes])
AC_MSG_CHECKING(whether to enable environment resetting by default)
AC_ARG_ENABLE(env_reset,
AC_ARG_ENABLE(nls,
[AS_HELP_STRING([--disable-nls], [Disable natural language support using gettext])],
-[ case "$enableval" in
- yes|no) enable_nls=$enableval
- ;;
- *) AC_MSG_WARN([Ignoring unknown argument to --enable-nls: $enableval])
- ;;
- esac
-], [enable_nls=yes])
+[], [enable_nls=yes])
AC_ARG_WITH(selinux, [AS_HELP_STRING([--with-selinux], [enable SELinux support])],
[case $with_selinux in
# Since gcc prefers /usr/local/include to /usr/include, we need to
# make sure we use the gettext() that matches the include file.
# First check that it links w/o additional libs, then try with -lintl.
-if test "$enable_nls" = "yes"; then
+if test "$enable_nls" != "no"; then
+ if test "$enable_nls" != "yes"; then
+ CPPFLAGS="${CPPFLAGS} -I${enable_nls}/include"
+ SUDO_APPEND_LIBPATH(LDFLAGS, [$enable_nls/lib])
+ fi
AC_MSG_CHECKING([for gettext])
AC_CACHE_VAL(sudo_cv_gettext, [
AC_LINK_IFELSE(
], [sudo_cv_gettext=yes], [sudo_cv_gettext=no])
])
AC_MSG_RESULT($sudo_cv_gettext)
- if test "$sudo_cv_gettext" = "yes"; then
- AC_DEFINE(HAVE_LIBINTL_H)
- else
+ if test "$sudo_cv_gettext" != "yes"; then
AC_CHECK_LIB(intl, gettext,
- [LIBINTL="-lintl"]
- [AC_DEFINE(HAVE_LIBINTL_H)],
+ [LIBINTL="-lintl"],
[
- AC_CHECK_LIB(intl, gettext, [LIBINTL="-lintl -liconv"]
- AC_DEFINE(HAVE_LIBINTL_H), [enable_nls=no], [-liconv])
+ AC_CHECK_LIB(intl, gettext, [LIBINTL="-lintl -liconv"],
+ [enable_nls=no], [-liconv])
])
fi
- if test "$enable_nls" = "yes"; then
+ if test "$enable_nls" != "no"; then
+ AC_DEFINE(HAVE_LIBINTL_H)
# List of available translations
LINGUAS="uk zh_CN"
fi
dnl Deferred zlib option processing.
dnl By default we use the system zlib if it is present.
dnl
-case ${enable_zlib-"yes"} in
+case "$enable_zlib" in
yes)
AC_CHECK_LIB(z, gzdopen, [
AC_CHECK_HEADERS(zlib.h, [ZLIB="-lz"], [enable_zlib=builtin])