summaryrefslogtreecommitdiff
path: root/m4/sudo.m4
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2015-02-06 11:01:05 -0700
committerTodd C. Miller <Todd.Miller@courtesan.com>2015-02-06 11:01:05 -0700
commitbbf189bd9c9d61de1ba4e08a81f4bb14e4db2bc7 (patch)
treeda32dc266789b06fc387961c021f42fea566831e /m4/sudo.m4
parent16b445abeb29b8e1ce76a2c8333dbdb50ad9eee3 (diff)
downloadsudo-bbf189bd9c9d61de1ba4e08a81f4bb14e4db2bc7.tar.gz
Sanity check the TZ environment variable by special casing it in
env_check. The --with-tzdir configure option can be used to specify the zoneinfo directory if configure doesn't find it.
Diffstat (limited to 'm4/sudo.m4')
-rw-r--r--m4/sudo.m422
1 files changed, 21 insertions, 1 deletions
diff --git a/m4/sudo.m4 b/m4/sudo.m4
index 9087155fa..3111b7225 100644
--- a/m4/sudo.m4
+++ b/m4/sudo.m4
@@ -1,6 +1,6 @@
dnl Local m4 macros for autoconf (used by sudo)
dnl
-dnl Copyright (c) 1994-1996, 1998-2005, 2007-2014
+dnl Copyright (c) 1994-1996, 1998-2005, 2007-2015
dnl Todd C. Miller <Todd.Miller@courtesan.com>
dnl
dnl XXX - should cache values in all cases!!!
@@ -83,6 +83,26 @@ fi
])dnl
dnl
+dnl Detect time zone file directory, if any.
+dnl
+AC_DEFUN([SUDO_TZDIR], [AC_MSG_CHECKING(time zone data directory)
+tzdir="$with_tzdir"
+if test -z "$tzdir"; then
+ tzdir=no
+ for d in /usr/share /usr/share/lib /usr/lib /etc; do
+ if test -d "$d/zoneinfo"; then
+ tzdir="$d/zoneinfo"
+ break
+ fi
+ done
+fi
+AC_MSG_RESULT([$tzdir])
+if test "${tzdir}" != "no"; then
+ SUDO_DEFINE_UNQUOTED(_PATH_ZONEINFO, "$tzdir")
+fi
+])dnl
+
+dnl
dnl Parent directory for time stamp dir.
dnl
AC_DEFUN([SUDO_RUNDIR], [AC_MSG_CHECKING(for sudo run dir location)