Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: set DL_EXT=sl for HP-UX



This is larger then needed mainly because I wanted to make the macro
HPUXDYNAMIC$ more descriptive as HPUX10DYNAMIC.  Let me know if that's
too much, and I'll take that piece out.

The other thing was to split the hpux cases from solaris to initialize
DL_EXT there.  I expect it should be alright to remove Hcurses from the
solaris list, but I have no such access to verify that.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.123
diff -u -r1.123 configure.ac
--- configure.ac	29 Apr 2009 12:31:29 -0000	1.123
+++ configure.ac	15 May 2009 19:48:45 -0000
@@ -669,7 +669,7 @@
 dnl SYSV-derived systems.  However, if we find terminfo and termcap
 dnl stuff in the same library we will use that; typically this
 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.
 AC_ARG_WITH(term-lib,
 AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
@@ -680,7 +680,10 @@
   termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses"
 fi],
 [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="$ncursesw_test tinfo termcap $ncurses_test curses" ;;
@@ -2434,7 +2437,7 @@
 dnl ---------------
 dnl dynamic loading
 dnl ---------------
-AH_TEMPLATE([HPUXDYNAMIC],
+AH_TEMPLATE([HPUX10DYNAMIC],
 [Define to 1 if you want to use dynamically loaded modules on HPUX 10.])
 L=N
 INSTLIB="install.bin-\$(L)"
@@ -2467,7 +2470,7 @@
     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 define DYNAMIC or not.
-    AC_DEFINE(HPUXDYNAMIC)dnl
+    AC_DEFINE(HPUX10DYNAMIC)dnl
   fi
 fi
 
@@ -2677,7 +2680,7 @@
     AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) &&
     AC_TRY_RUN([
 #include <stdio.h>
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH

Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.19
diff -u -r1.19 aczsh.m4
--- aczsh.m4	31 May 2008 18:30:53 -0000	1.19
+++ aczsh.m4	15 May 2009 19:48:44 -0000
@@ -118,7 +118,7 @@
 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_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH
@@ -199,7 +199,7 @@
 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_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH
@@ -274,7 +274,7 @@
 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_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH
@@ -343,7 +343,7 @@
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
     AC_TRY_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH
@@ -416,7 +416,7 @@
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s"
     AC_TRY_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH
@@ -483,7 +483,7 @@
 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_RUN([
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
 #define RTLD_GLOBAL DYNAMIC_PATH

Index: Src/module.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/module.c,v
retrieving revision 1.40
diff -u -r1.40 module.c
--- Src/module.c	14 Oct 2008 23:41:13 -0000	1.40
+++ Src/module.c	15 May 2009 19:48:46 -0000
@@ -1480,7 +1480,7 @@
 #else
 
 #ifdef HAVE_DLFCN_H
-# if defined(HAVE_DL_H) && defined(HPUXDYNAMIC)
+# if defined(HAVE_DL_H) && defined(HPUX10DYNAMIC)
 #  include <dl.h>
 # else
 #  include <dlfcn.h>
@@ -1498,7 +1498,7 @@
 #endif
 
 /**/
-#ifdef HPUXDYNAMIC
+#ifdef HPUX10DYNAMIC
 # define dlopen(file,mode) (void *)shl_load((file), (mode), (long) 0)
 # define dlclose(handle) shl_unload((shl_t)(handle))

Index: MACHINES
===================================================================
RCS file: /cvsroot/zsh/zsh/MACHINES,v
retrieving revision 1.7
diff -u -r1.7 MACHINES
--- MACHINES	1 Jun 2008 16:39:09 -0000	1.7
+++ MACHINES	15 May 2009 19:48:44 -0000
@@ -94,11 +94,13 @@
 	  have been found to stop functioning.  One suggested fix is
 	  to alter the way the curses library is linked in the Makefile.
 	  Replacing `-lcurses' with `-lHcurses -lcurses' in the libraries
-	  is reported to fix.  An attempt to fix this in configure
-	  is apparently ineffective; more information would be appreciated
-	  as the maintainers do not have access to an HP-UX system.
-	  Recent reports indicated this is not necessary on recent versions
-	  of HP-UX 11.
+	  is reported to fix this on 11.0, but is no longer necessary on
+	  more recent versions of HP-UX 11, i.e. 11.11+.
+
+	  Typical gcc installations on HP-UX use HP's linker rather than
+	  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
 	  conflicts.  Use the HP ANSI C compiler.
 
Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.38
diff -u -r1.38 INSTALL
--- INSTALL	15 Jan 2009 14:49:51 -0000	1.38
+++ INSTALL	15 May 2009 19:48:44 -0000
@@ -325,12 +325,12 @@
 termcap, which is now largely outmoded, and curses, which supersedes
 termcap and typically contains the same features as well as others.
 configure will search for an appropriate library; the default search order
-is "ncursesw tinfo termcap ncurses curses" except on HP-UX and Solaris
-where it is "Hcurses ncursesw ncurses curses termcap".  Note that even
-though termcap is searched before traditional forms of curses zsh tries to
-make features from curses available and if the curses library contains both
-curses and termcap features, as is normal, the curses variant is used.
-ncurses is a newer version of curses and tinfo is related to it.
+is "ncursesw tinfo termcap ncurses curses" except on HP-UX ("Hcurses ncursesw
+ncurses curses termcap") and Solaris ("ncursesw ncurses curses termcap").
+Note that even though termcap is searched before traditional forms of curses
+zsh tries to make features from curses available and if the curses library
+contains both curses and termcap features, as is normal, the curses variant
+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.
 zsh attempts to use this to provide functions needed by the zsh/curses



Messages sorted by: Reverse Date, Date, Thread, Author