1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

Paul Ackersviller: 26962: updated HP-UX dynamic linking

This commit is contained in:
Peter Stephenson 2009-05-16 12:13:00 +00:00
parent 49db32f2b5
commit 9169cd747f
6 changed files with 35 additions and 25 deletions

View file

@ -1,3 +1,8 @@
2009-05-16 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Paul Ackersviller: 26962: configure.ac, aczsh.m4,
Src/module.c, MACHINES, INSTALL: updated HP-UX dynamic linking.
2009-05-13 Peter Stephenson <pws@csr.com> 2009-05-13 Peter Stephenson <pws@csr.com>
* users/14118: Functions/Prompts/prompt_special_chars: fix test * users/14118: Functions/Prompts/prompt_special_chars: fix test
@ -11711,5 +11716,5 @@
***************************************************** *****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL * This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4686 $ * $Revision: 1.4687 $
***************************************************** *****************************************************

12
INSTALL
View file

@ -325,12 +325,12 @@ shell needs to provide output to the terminal. The most common have been
termcap, which is now largely outmoded, and curses, which supersedes termcap, which is now largely outmoded, and curses, which supersedes
termcap and typically contains the same features as well as others. termcap and typically contains the same features as well as others.
configure will search for an appropriate library; the default search order configure will search for an appropriate library; the default search order
is "ncursesw tinfo termcap ncurses curses" except on HP-UX and Solaris is "ncursesw tinfo termcap ncurses curses" except on HP-UX ("Hcurses ncursesw
where it is "Hcurses ncursesw ncurses curses termcap". Note that even ncurses curses termcap") and Solaris ("ncursesw ncurses curses termcap").
though termcap is searched before traditional forms of curses zsh tries to Note that even though termcap is searched before traditional forms of curses
make features from curses available and if the curses library contains both zsh tries to make features from curses available and if the curses library
curses and termcap features, as is normal, the curses variant is used. contains both curses and termcap features, as is normal, the curses variant
ncurses is a newer version of curses and tinfo is related to it. is used. ncurses is a newer version of curses and tinfo is related to it.
The library ncursesw is a variant of ncurses that supports wide characters. The library ncursesw is a variant of ncurses that supports wide characters.
zsh attempts to use this to provide functions needed by the zsh/curses zsh attempts to use this to provide functions needed by the zsh/curses

View file

@ -94,11 +94,13 @@ HP: HP-UX 9, 10.20, 11.x (PA-RISC, Itanium)
have been found to stop functioning. One suggested fix is have been found to stop functioning. One suggested fix is
to alter the way the curses library is linked in the Makefile. to alter the way the curses library is linked in the Makefile.
Replacing `-lcurses' with `-lHcurses -lcurses' in the libraries Replacing `-lcurses' with `-lHcurses -lcurses' in the libraries
is reported to fix. An attempt to fix this in configure is reported to fix this on 11.0, but is no longer necessary on
is apparently ineffective; more information would be appreciated more recent versions of HP-UX 11, i.e. 11.11+.
as the maintainers do not have access to an HP-UX system.
Recent reports indicated this is not necessary on recent versions Typical gcc installations on HP-UX use HP's linker rather than
of HP-UX 11. the GNU one. Configure will fail to set up dynamic linking in
this situation. The following should allow building of modules:
DLLD=/usr/ccs/bin/ld DLLDFLAGS=-b DLCFLAGS=-fpic ./configure ...
Compiling with gcc 2.7.1 is known to fail with header file Compiling with gcc 2.7.1 is known to fail with header file
conflicts. Use the HP ANSI C compiler. conflicts. Use the HP ANSI C compiler.

View file

@ -1480,7 +1480,7 @@ load_and_bind(const char *fn)
#else #else
#ifdef HAVE_DLFCN_H #ifdef HAVE_DLFCN_H
# if defined(HAVE_DL_H) && defined(HPUXDYNAMIC) # if defined(HAVE_DL_H) && defined(HPUX10DYNAMIC)
# include <dl.h> # include <dl.h>
# else # else
# include <dlfcn.h> # include <dlfcn.h>
@ -1498,7 +1498,7 @@ load_and_bind(const char *fn)
#endif #endif
/**/ /**/
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
# define dlopen(file,mode) (void *)shl_load((file), (mode), (long) 0) # define dlopen(file,mode) (void *)shl_load((file), (mode), (long) 0)
# define dlclose(handle) shl_unload((shl_t)(handle)) # define dlclose(handle) shl_unload((shl_t)(handle))

View file

@ -118,7 +118,7 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH
@ -199,7 +199,7 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH
@ -274,7 +274,7 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH
@ -343,7 +343,7 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
save_ldflags=$LDFLAGS save_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH
@ -416,7 +416,7 @@ elif
save_ldflags=$LDFLAGS save_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s" LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s"
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH
@ -483,7 +483,7 @@ echo 'int fred () { return 42; }' > conftest1.c
if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AC_FD_CC); then AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AC_FD_CC); then
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH

View file

@ -669,7 +669,7 @@ dnl Prefer BSD termcap library to SysV curses library, except on certain
dnl SYSV-derived systems. However, if we find terminfo and termcap dnl SYSV-derived systems. However, if we find terminfo and termcap
dnl stuff in the same library we will use that; typically this dnl stuff in the same library we will use that; typically this
dnl is ncurses or curses. dnl is ncurses or curses.
dnl On HPUX, Hcurses is reported to work better than curses. dnl On pre-11.11 HPUX, Hcurses is reported to work better than curses.
dnl Prefer ncurses to curses on all systems. tinfo isn't very common now. dnl Prefer ncurses to curses on all systems. tinfo isn't very common now.
AC_ARG_WITH(term-lib, AC_ARG_WITH(term-lib,
AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]), AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
@ -680,7 +680,10 @@ else
termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses"
fi], fi],
[case "$host_os" in [case "$host_os" in
hpux10.*|hpux11.*|solaris*) solaris*)
termcap_curses_order="$ncursesw_test $ncurses_test curses termcap" ;;
hpux10.*|hpux11.*)
DL_EXT="${DL_EXT=sl}"
termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;; termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;;
*) *)
termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;;
@ -2434,7 +2437,7 @@ fi
dnl --------------- dnl ---------------
dnl dynamic loading dnl dynamic loading
dnl --------------- dnl ---------------
AH_TEMPLATE([HPUXDYNAMIC], AH_TEMPLATE([HPUX10DYNAMIC],
[Define to 1 if you want to use dynamically loaded modules on HPUX 10.]) [Define to 1 if you want to use dynamically loaded modules on HPUX 10.])
L=N L=N
INSTLIB="install.bin-\$(L)" INSTLIB="install.bin-\$(L)"
@ -2467,7 +2470,7 @@ elif test "$ac_cv_func_dlopen" != yes ||
dnl going into a header, and we can't undefine anything, so dnl going into a header, and we can't undefine anything, so
dnl just define this anyway and rely on the later tests to dnl just define this anyway and rely on the later tests to
dnl define DYNAMIC or not. dnl define DYNAMIC or not.
AC_DEFINE(HPUXDYNAMIC)dnl AC_DEFINE(HPUX10DYNAMIC)dnl
fi fi
fi fi
@ -2677,7 +2680,7 @@ EOM
AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) && AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) &&
AC_TRY_RUN([ AC_TRY_RUN([
#include <stdio.h> #include <stdio.h>
#ifdef HPUXDYNAMIC #ifdef HPUX10DYNAMIC
#include <dl.h> #include <dl.h>
#define RTLD_LAZY BIND_DEFERRED #define RTLD_LAZY BIND_DEFERRED
#define RTLD_GLOBAL DYNAMIC_PATH #define RTLD_GLOBAL DYNAMIC_PATH