zsh-workers
 help / color / mirror / code / Atom feed
* DL_EXT for HP-UX
@ 2009-05-12 20:29 Paul Ackersviller
  2009-05-13  8:34 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Ackersviller @ 2009-05-12 20:29 UTC (permalink / raw)
  To: zsh-workers

I noticed that this make macro appears to want to default to .sl on
HP-UX, but it's not working that way on 11.  There's also a comment
in code to the effect that HPUXDYNAMIC should be defined on HP-UX 10.
There seems no need for that on 11, as modules are building fine
without it.

I'd be happy to work out a patch to update this, unless you prefer
to leave as is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DL_EXT for HP-UX
  2009-05-12 20:29 DL_EXT for HP-UX Paul Ackersviller
@ 2009-05-13  8:34 ` Peter Stephenson
  2009-05-15 20:47   ` PATCH: set DL_EXT=sl " Paul Ackersviller
       [not found]   ` <2d460de70912230639o1b07b1f8o11bccb9888be761c@mail.gmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2009-05-13  8:34 UTC (permalink / raw)
  To: zsh-workers

On Tue, 12 May 2009 20:29:53 +0000
Paul Ackersviller <pda@sdf.lonestar.org> wrote:
> I noticed that this make macro appears to want to default to .sl on
> HP-UX, but it's not working that way on 11.  There's also a comment
> in code to the effect that HPUXDYNAMIC should be defined on HP-UX 10.
> There seems no need for that on 11, as modules are building fine
> without it.
> 
> I'd be happy to work out a patch to update this, unless you prefer
> to leave as is.

It would be splendid if you could produce a patch.  Thanks.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 4+ messages in thread

* PATCH: set DL_EXT=sl for HP-UX
  2009-05-13  8:34 ` Peter Stephenson
@ 2009-05-15 20:47   ` Paul Ackersviller
       [not found]   ` <2d460de70912230639o1b07b1f8o11bccb9888be761c@mail.gmail.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Ackersviller @ 2009-05-15 20:47 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DL_EXT for HP-UX
       [not found]   ` <2d460de70912230639o1b07b1f8o11bccb9888be761c@mail.gmail.com>
@ 2009-12-23 14:40     ` Richard Hartmann
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Hartmann @ 2009-12-23 14:40 UTC (permalink / raw)
  To: zsh-workers

Re-sending to the correct list so everything is tracked.


On Wed, Dec 23, 2009 at 15:39, Richard Hartmann
<richih.mailinglist@gmail.com> wrote:
> On Wed, May 13, 2009 at 09:34, Peter Stephenson <pws@csr.com> wrote:
>> On Tue, 12 May 2009 20:29:53 +0000
>> Paul Ackersviller <pda@sdf.lonestar.org> wrote:
>
>>> I'd be happy to work out a patch to update this, unless you prefer
>>> to leave as is.
>
>> It would be splendid if you could produce a patch.  Thanks.
>
> Paul: I know it has been quite some time, but did you follow up on
> this? I am somewhat triaging, again.
>
>
> Richard
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-23 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 20:29 DL_EXT for HP-UX Paul Ackersviller
2009-05-13  8:34 ` Peter Stephenson
2009-05-15 20:47   ` PATCH: set DL_EXT=sl " Paul Ackersviller
     [not found]   ` <2d460de70912230639o1b07b1f8o11bccb9888be761c@mail.gmail.com>
2009-12-23 14:40     ` DL_EXT " Richard Hartmann

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).