From: Tom Lane <tgl@sss.pgh.pa.us>

HP-UX (all versions) requires shared libraries to have execute
permission, and really needs them to be exactly mode 555 for
performance reasons.  The standard configure/install procedure
installs libpq.sl as mode 644, which DOES NOT WORK.

The attached patch modifies the makefiles to distinguish
INSTL_LIB_OPTS (install mode for ordinary libraries) from
INSTL_SHLIB_OPTS (mode for shared libs), and adds a test
to configure to set INSTL_SHLIB_OPTS="-m 555" when on HP-UX.
This commit is contained in:
Marc G. Fournier 1998-04-27 14:55:46 +00:00
parent 1af6b56427
commit 6d817475b2
5 changed files with 297 additions and 271 deletions

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.39 1998/04/12 01:18:35 momjian Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.40 1998/04/27 14:54:05 scrappy Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@ -159,6 +159,7 @@ RANLIB= @RANLIB@
INSTLOPTS= @INSTLOPTS@
INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
##############################################################################
#

539
src/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -332,18 +332,27 @@ fi
INSTLOPTS="-m 444"
INSTL_EXE_OPTS="-m 555"
INSTL_LIB_OPTS="-m 644"
INSTL_SHLIB_OPTS="-m 644"
dnl HPUX wants shared libs to be mode 555.
case "$host_os" in
hpux*)
INSTL_SHLIB_OPTS="-m 555" ;;
esac
case "`basename $INSTALL`" in
install|installbsd|scoinst)
INSTLOPTS="-c $INSTLOPTS"
INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS";;
INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS"
INSTL_SHLIB_OPTS="-c $INSTL_SHLIB_OPTS";;
esac
echo "- Using $INSTALL"
AC_SUBST(INSTALL)
AC_SUBST(INSTLOPTS)
AC_SUBST(INSTL_LIB_OPTS)
AC_SUBST(INSTL_SHLIB_OPTS)
AC_SUBST(INSTL_EXE_OPTS)
dnl Check the option to echo to inhibit newlines.

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.12 1998/04/21 12:38:32 scrappy Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.13 1998/04/27 14:54:50 scrappy Exp $
#
#-------------------------------------------------------------------------
@ -66,6 +66,13 @@ ifeq ($(PORTNAME), univel)
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), hpux)
install-shlib-dep := install-shlib
shlib := libpq.sl
LDFLAGS_SL = -b
CFLAGS += $(CFLAGS_SL)
endif
OBJS= pgtcl.o pgtclCmds.o pgtclId.o
@ -98,7 +105,7 @@ install-libpgtcl: libpgtcl.a
$(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(LIBDIR)/libpgtcl.a
install-shlib: $(shlib)
$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) \
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) \
$(LIBDIR)/$(shlib)
ln -sf $(shlib) $(LIBDIR)/libpgtcl.so

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.15 1998/04/21 12:38:46 scrappy Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.16 1998/04/27 14:55:46 scrappy Exp $
#
#-------------------------------------------------------------------------
@ -174,7 +174,7 @@ install-libpq: libpq.a
$(INSTALL) $(INSTL_LIB_OPTS) libpq.a $(LIBDIR)/libpq.a
install-shlib: $(shlib)
$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
rm -f $(LIBDIR)/libpq.so
ln -s $(shlib) $(LIBDIR)/libpq.so