aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/AIX/.distfiles2
-rw-r--r--Config/version.mk4
-rw-r--r--aczsh.m430
-rw-r--r--configure.in51
5 files changed, 78 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index bcc77e464..0e538d51c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-04 Peter Stephenson <pws@csr.com>
+
+ * Config/version.mk: 3.1.9-dev-6
+
2000-09-04 Bart Schaefer <schaefer@zsh.org>
* 12733: Functions/Misc/colors: Restore `grey' and other
diff --git a/Completion/AIX/.distfiles b/Completion/AIX/.distfiles
index 0a558b28e..37f732f6c 100644
--- a/Completion/AIX/.distfiles
+++ b/Completion/AIX/.distfiles
@@ -1,5 +1,5 @@
DISTFILES_SRC='
.distfiles
_floppy _lscfg _lsdev _lslv _lspv _lsvg _object_classes
- _physical_volumes _smit _volume_groups
+ _logical_volumes _physical_volumes _smit _volume_groups
'
diff --git a/Config/version.mk b/Config/version.mk
index ae4d8708a..52e1ae68c 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
# This must also serve as a shell script, so do not add spaces around the
# `=' signs.
-VERSION=3.1.9-dev-5
-VERSION_DATE='August 11, 2000'
+VERSION=3.1.9-dev-6
+VERSION_DATE='September 4, 2000'
diff --git a/aczsh.m4 b/aczsh.m4
index e835dcede..7952b9837 100644
--- a/aczsh.m4
+++ b/aczsh.m4
@@ -646,3 +646,33 @@ AC_DEFUN(zsh_COMPILE_FLAGS,
then LIBS="$4"
else LIBS="$enable_libs"
fi)])
+
+# zsh_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# This is derived from autoconf 2.49a AC_SEARCH_LIBS
+# with the following differences:
+# - no extra libs argument
+# - SEARCH-LIBS are taken literally - use -lfoo not foo. That
+# makes it possible to pass several libs, e.g. "-lsocket -lnsl"
+# --------------------------------------------------------
+# Search for a library defining FUNC, if it's not already available.
+AC_DEFUN([zsh_SEARCH_LIBS],
+[AC_CACHE_CHECK([for library containing $1], [zsh_cv_search_$1],
+[zsh_func_search_save_LIBS="$LIBS"
+zsh_cv_search_$1=no
+AC_TRY_LINK_FUNC([$1], [zsh_cv_search_$1="none required"])
+test "$zsh_cv_search_$1" = no && for zsh_lib in $2; do
+LIBS="$zsh_lib $zsh_func_search_save_LIBS"
+AC_TRY_LINK_FUNC([$1],
+[zsh_cv_search_$1="$zsh_lib"
+break])
+done
+LIBS="$zsh_func_search_save_LIBS"])
+if test "$zsh_cv_search_$1" = no; then
+ ifelse([$4], , :, [$4])
+else
+ test "$zsh_cv_search_$1" = "none required" || LIBS="$zsh_cv_search_$1 $LIBS"
+ ifelse([$3], , , [$3])
+fi
+])
+
diff --git a/configure.in b/configure.in
index 4e93e340d..0b46b2d0b 100644
--- a/configure.in
+++ b/configure.in
@@ -512,7 +512,9 @@ dnl -------------------
dnl On some systems, modules need to be linked against libc explicitly,
dnl in case they require objects that exist only in the static version
dnl and might not be compiled into the zsh executable.
-AC_CHECK_LIB(c, printf)
+dnl Also, on SINIX -lc MUST BE after -lsocket, so this test
+dnl adds -lc as the last library
+AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"])
AC_CHECK_LIB(m, pow)
@@ -528,12 +530,43 @@ for lib in $termcap_curses_order; do
AC_CHECK_LIB(${lib}, tgetent, [LIBS="-l$lib $LIBS"; break])
done
-dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
-dnl libnsl (Network Services Library) to find yp_all
-AC_CHECK_FUNCS(yp_all)
-if test $ac_cv_func_yp_all = no; then
- AC_CHECK_LIB(nsl, yp_all)
-fi
+dnl Check for network libraries.
+dnl This is really sad and messy story
+dnl Zsh needs three groups of functions:
+dnl NIS (a.k.a. Yellow Pages)
+dnl socket
+dnl resolver
+dnl Depending on particlular OS (or even on particular OS version)
+dnl these function may be found in -lc, -lnsl, -lresolv, -lsocket.
+dnl Sometimes libraries depend on other (notorious -lnsl that is needed
+dnl on SVR4-derived systems to get any network functionality at all)
+dnl or must follow particular order (SINIX, that has two incompatible
+dnl versions of gethostbyname() in -lsocket and -lresolv).
+dnl So, this test tries to find minimal set of needed libraries;
+dnl it tries to preserve user settings (if needed libs were explcitly
+dnl specified) and -lresolv after -lsocket order.
+
+#
+# First check for -lnsl. Good chances, that if it exists, it
+# will be neeeded anyway.
+#
+zsh_SEARCH_LIBS(yp_all, -lnsl)
+
+#
+# Check for resolver functions to make sure, that
+# -lresolv will be after -lsocket on SINIX
+#
+
+zsh_SEARCH_LIBS(inet_aton, -lnsl -lresolv "-lresolv -lnsl")
+zsh_SEARCH_LIBS(inet_pton, -lnsl -lresolv "-lresolv -lnsl")
+zsh_SEARCH_LIBS(inet_ntop, -lnsl -lresolv "-lresolv -lnsl")
+zsh_SEARCH_LIBS(gethostbyname2, -lnsl -lresolv "-lresolv -lnsl")
+
+#
+# ... and check for socket support
+#
+
+zsh_SEARCH_LIBS(socket, -lnsl -lsocket "-lsocket -lnsl")
dnl I am told that told that unicos reqire these for nis_list
if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
@@ -546,8 +579,6 @@ fi
AC_CHECK_LIB(cap, cap_get_proc)
-AC_CHECK_LIB(socket, socket)
-
dnl ---------------------
dnl CHECK TERMCAP LIBRARY
dnl ---------------------
@@ -857,7 +888,7 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
gethostname gethostbyname2 getipnodebyname \
inet_aton inet_pton inet_ntop \
getlogin getpwent getpwnam getpwuid getgrgid getgrnam \
- initgroups nis_list \
+ initgroups yp_all nis_list \
setuid seteuid setreuid setresuid setsid \
memcpy memmove strstr strerror \
cap_get_proc \