summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-03-04 14:03:47 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-03-04 14:03:47 +0000
commit8cba4981ad2b5f234b25238db489c86dd3c4a570 (patch)
tree3389c97e8b884d56ff849b4f8e1a15a8dba300ec
parent2f136f5dafd6b84b6c2f5a1291ee282affc5f282 (diff)
downloadzsh-8cba4981ad2b5f234b25238db489c86dd3c4a570.tar.gz
zsh-8cba4981ad2b5f234b25238db489c86dd3c4a570.zip
19535: Add --enable-cap
-rw-r--r--ChangeLog5
-rw-r--r--INSTALL24
-rw-r--r--configure.ac14
3 files changed, 35 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 4507f4c2b..da7b1a9d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-04 Peter Stephenson <pws@csr.com>
+
+ * 19535: configure.ac, INSTALL: Add --enable-cap flag
+ to turn on search for POSIX capabilities; fails on AIX otherwise.
+
2004-03-03 Wayne Davison <wayned@users.sourceforge.net>
* users/7105: configure.ac, Makefile.in: Added back the stamp-h
diff --git a/INSTALL b/INSTALL
index 75d675d2e..8798294d4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -359,20 +359,32 @@ correct handling of these types.
None of this is relevant for 64-bit systems; zsh should compile and run
without problems if (sizeof(long) == 8).
-Searching for `pcre'
---------------------
+Searching for additional features
+---------------------------------
+
+Various additional features are turned off by default to avoid
+compatibility problems.
+
+--enable-pcre:
Zsh has a module which allows the pcre regular expression library to be
used via shell builtins. Compiling this library into the shell with
dynamic loading (the default where available) produces a dependency on the
library libpcre.so. This is a problem on systems where zsh needs to be
-available at boot before the directory containing libpcre.so (for
-example /usr/lib or /usr/local/lib) is mounted. For this reason,
-pcre support will only be searched for if the option --enable-pcre
-is passed to configure.
+available at boot before the directory containing libpcre.so (for example
+/usr/lib or /usr/local/lib) is mounted. For this reason, pcre support will
+only be searched for if the option --enable-pcre is passed to configure.
(Future versions of the shell may have a better fix for this problem.)
+--enable-cap:
+
+This searches for POSIX capabilities; if found, the `cap' library
+is available and the shell will use these to determine if the
+shell is running in some privileged mode. This is turned off by
+default as on some systems non-standard headers (in particular AIX) are
+required. A direct fix for that problem would be appreciated.
+
Options For Configure
---------------------
diff --git a/configure.ac b/configure.ac
index 518e1754e..18ff78262 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,6 +313,11 @@ AC_ARG_ENABLE(pcre,
AC_HELP_STRING([--enable-pcre],
[enable the search for the pcre library (may create run-time library dependencies)]))
+dnl Do you want to look for capability support?
+AC_ARG_ENABLE(cap,
+AC_HELP_STRING([--enable-cap],
+[enable the search for POSIX capabilities (may require additional headers to be added by hand)]))
+
dnl ------------------
dnl CHECK THE COMPILER
dnl ------------------
@@ -709,7 +714,9 @@ if test "x$dynamic" = xyes; then
AC_CHECK_LIB(dl, dlopen)
fi
-AC_CHECK_LIB(cap, cap_get_proc)
+if test x$enable_cap = xyes; then
+ AC_CHECK_LIB(cap, cap_get_proc)
+fi
AC_CHECK_LIB(socket, socket)
@@ -1029,7 +1036,6 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
initgroups nis_list \
setuid seteuid setreuid setresuid setsid \
memcpy memmove strstr strerror \
- cap_get_proc \
getrlimit \
setlocale \
uname \
@@ -1045,6 +1051,10 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
grantpt unlockpt ptsname)
AC_FUNC_STRCOLL
+if test x$enable_cap = xyes; then
+ AC_CHECK_FUNCS(cap_get_proc)
+fi
+
dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer)
dnl Some termcaps reportedly accept a zero buffer, but then dump core
dnl in tgetstr().