From 21724616f5a521010b6a0a7fa73fe06f0437fcd1 Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Tue, 3 Apr 2001 05:17:02 +0000 Subject: [PATCH] Wide variety of HP/UX configuration changes --- ChangeLog | 11 +++++++++++ Makefile.in | 40 ++++++++++++++++++++-------------------- config.site | 3 ++- configure | 16 ++++++++-------- libtiff/Makefile.in | 12 ++++++------ man/Makefile.in | 10 +++++----- tools/Makefile.in | 6 +++--- 7 files changed, 55 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 251b28ee..e5cb8804 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2001-04-03 Frank Warmerdam + + * configure, *Makefile.in: Various changes to improve configuration + for HP/UX specifically, and also in general. They include: + - Try to handle /usr/bin/sh instead of /bin/sh where necessary. + - Upgrade to HP/UX 10.x+ compiler, linker and dso options. + - Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP + - Use -${MAKEFLAGS} in sub makes from makefiles. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=40 + 2001-04-02 Frank Warmerdam * libtiff/tiff.h: Applied hac to try and resolve the problem diff --git a/Makefile.in b/Makefile.in index f525cb12..64166b3e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ #! smake -# $Header: /cvs/maptools/cvsroot/libtiff/Makefile.in,v 1.18 2001-01-08 16:07:33 mwelles Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/Makefile.in,v 1.19 2001-04-03 05:17:02 warmerda Exp $ # # @WARNING@ # @@ -45,38 +45,38 @@ INSTALL = @INSTALL@ all default: @if [ "@PORT@" = yes ]; then \ - ${ECHO} "= "port; cd port; ${MAKE}; \ + ${ECHO} "= "port; cd port; ${MAKE} -${MAKEFLAGS}; \ else \ true; \ fi - @${ECHO} "= "libtiff; cd libtiff; ${MAKE} - @${ECHO} "= "tools; cd tools; ${MAKE} - @${ECHO} "= "man; cd man; ${MAKE} + @${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} + @${ECHO} "= "tools; cd tools; ${MAKE} -${MAKEFLAGS} + @${ECHO} "= "man; cd man; ${MAKE} -${MAKEFLAGS} install: - @${ECHO} "= "libtiff; cd libtiff; ${MAKE} install - @${ECHO} "= "tools; cd tools; ${MAKE} install - @${ECHO} "= "man; cd man; ${MAKE} install + @${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} install + @${ECHO} "= "tools; cd tools; ${MAKE} -${MAKEFLAGS} install + @${ECHO} "= "man; cd man; ${MAKE} -${MAKEFLAGS} install @if [ "@HTML@" = yes ]; then \ - ${ECHO} "= "html; cd html; ${MAKE} install; \ + ${ECHO} "= "html; cd html; ${MAKE} -${MAKEFLAGS} install; \ else \ true; \ fi install-private: install - @${ECHO} "= "libtiff; cd libtiff; ${MAKE} installPrivateHdrs + @${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} installPrivateHdrs clean: @if [ "@PORT@" = yes ]; then \ - ${ECHO} "= "port; cd port; ${MAKE} clean; \ + ${ECHO} "= "port; cd port; ${MAKE} -${MAKEFLAGS} clean; \ else \ true; \ fi - @${ECHO} "= "libtiff; cd libtiff; ${MAKE} clean - @${ECHO} "= "tools; cd tools; ${MAKE} clean - @${ECHO} "= "man; cd man; ${MAKE} clean -# -cd contrib/dbs; ${MAKE} clean -# -cd contrib/dbs/xtiff; ${MAKE} clean + @${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} clean + @${ECHO} "= "tools; cd tools; ${MAKE} -${MAKEFLAGS} clean + @${ECHO} "= "man; cd man; ${MAKE} -${MAKEFLAGS} clean +# -cd contrib/dbs; ${MAKE} -${MAKEFLAGS} clean +# -cd contrib/dbs/xtiff; ${MAKE} -${MAKEFLAGS} clean clobber distclean: clean rm -f Makefile libtiff/port.h config.log @@ -99,7 +99,7 @@ installLink:: product:: test -d dist || mkdir dist rm -f dist/rawidb - SRC=`pwd` RAWIDB=`pwd`/dist/rawidb ${MAKE} install installLink + SRC=`pwd` RAWIDB=`pwd`/dist/rawidb ${MAKE} -${MAKEFLAGS} install installLink rm -f dist/idb sort -u +4 dist/rawidb > dist/idb ${GENDIST} -v -dist dist -idb dist/idb \ @@ -488,10 +488,10 @@ rcsclean: release: (cd ${SRCDIR}/dist; sh newversion) - ${MAKE} release.stamp + ${MAKE} -${MAKEFLAGS}release.stamp # ${SRCDIR}/configure ${CONFIG} -# ${MAKE} product - ${MAKE} release.tar.zip +# ${MAKE} -${MAKEFLAGS} product + ${MAKE} -${MAKEFLAGS} release.tar.zip # stamp relevant files according to current alpha diff --git a/config.site b/config.site index ee81b622..48ea8b0d 100644 --- a/config.site +++ b/config.site @@ -1,4 +1,4 @@ -# $Header: /cvs/maptools/cvsroot/libtiff/Attic/config.site,v 1.4 2001-04-03 03:51:57 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/Attic/config.site,v 1.5 2001-04-03 05:18:51 warmerda Exp $ # # TIFF Software # @@ -139,6 +139,7 @@ #RANLIB=":" # pathname of suitable ranlib program #DSOSUF="so" # DSO filename suffix #LIBCOPTS="-K PIC" # compiler options for building library +#SHELL=/usr/bin/sh # Bourne shell to use(normally /bin/sh) # # Makefile construction parameters. diff --git a/configure b/configure index 635da62b..f426e536 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.12 2001-04-03 03:51:57 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.13 2001-04-03 05:17:02 warmerda Exp $ # # Tag Image File Format (TIFF) Software # @@ -152,7 +152,7 @@ do -target|--target) ac_prev=TARGET;; -target=*|--target=*) TARGET="$ac_optarg" ;; -version|--version) - echo "This is TIFF configure $Revision: 1.12 $" + echo "This is TIFF configure $Revision: 1.13 $" exit 0 ;; -help|--help) usage; exit 0;; @@ -502,7 +502,7 @@ checkCompiler() if [ -z "${ENVOPTS-}" ]; then case $ISGCC-$TARGET in no-*-irix*) C_ANSI="-ansi";; - no-*-hp*) C_ANSI="-Aa -D_HPUX_SOURCE -Dhpux";; + no-*-hp*) C_ANSI="-D_HPUX_SOURCE";; no-*-apollo-*) C_ANSI="-A nansi";; no-*-aix*) C_ANSI="-Dunix -qlanglvl=ansi -qsrcmsg";; *-sco*) C_ANSI="-Dsco";; @@ -916,13 +916,12 @@ main() int fd; buf1 = (char *)valloc(i2); - buf2 = (char *)valloc(i); buf3 = (char *)malloc(i2); for (j = 0; j < i2; ++j) *(buf1 + j) = rand(); fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); write(fd, buf1, i2); - mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); + mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_VARIABLE | MAP_PRIVATE, fd, 0); for (j = 0; j < i; ++j) if (*(buf1 + j) != *(buf2 + j)) exit(1); @@ -1144,10 +1143,11 @@ if [ "$DSO" = auto ]; then ;; *-hpux*) DSOSUF=sl + DSOSUF_VERSION=${DIST_MAJOR}.${DIST_MINOR}${DIST_POINT} DSOOPTS='-b' - LIBCOPTS="+Z" + LIBCOPTS="+z" DSO=HPUX - TIFFLIBREF="-Wl,+s,+b${DIR_LIB}"' -L${DEPTH}/libtiff -ltiff' + TIFFLIBREF='-L$(DEPTH)/libtiff -ltiff' ;; *-solaris*) DSOSUF=so @@ -1348,7 +1348,7 @@ if [ -z "${MANSCHEME-}" ]; then *-ultrix*) MANSCHEME=bsd-source-cat;; *-sunos*) MANSCHEME=bsd-source-cat-strip;; *-sysv[234]*) MANSCHEME=sysv-source-cat-strip;; - *-hpux*) MANSCHEME=sysv-source-cat-strip;; + *-hpux*) MANSCHEME=sysv-source-cat;; *-solaris*) MANSCHEME=sysv-source-cat-strip;; *-aix*) MANSCHEME=sysv-source-strip;; *-isc*|*-sco*) MANSCHEME=sysv-source-cat;; diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in index 37a62a87..e8bdaee4 100644 --- a/libtiff/Makefile.in +++ b/libtiff/Makefile.in @@ -1,4 +1,4 @@ -# $Header: /cvs/maptools/cvsroot/libtiff/libtiff/Makefile.in,v 1.9 2001-03-30 01:55:32 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/libtiff/Makefile.in,v 1.10 2001-04-03 05:17:02 warmerda Exp $ # # Tag Image File Format Library # @@ -139,7 +139,7 @@ TARGETS = libtiff.a all: ${TARGETS} if [ @DSO@dso != nodso ]; then \ - ${MAKE} @DSO@dso; \ + ${MAKE} -${MAKEFLAGS} @DSO@dso; \ else \ true; \ fi @@ -180,9 +180,9 @@ IRIX52dso: ${OBJS} SOLARISdso: ${OBJS} ${LD} -L@DIR_LIB@ -G -h libtiff.@DSOSUF@ -o libtiff.@DSOSUF@ ${OBJS} touch $@ -# HP-UX A.09.03 +# HP-UX 10.x+ HPUXdso: ${OBJS} - ${LD} +b@DIR_LIB@ -b -o libtiff.@DSOSUF@ ${OBJS} + ${LD} -b -o libtiff.@DSOSUF_VERSION@ +h libtiff.@DSOSUF_VERSION@ ${OBJS} touch $@ # AIX 2.3.5 and 4.1.1 AIXdso: ${OBJS} @@ -203,7 +203,7 @@ GNULDdso: ${OBJS} -o libtiff.@DSOSUF_VERSION@ ${OBJS} \ @LIBJPEG@ @LIBGZ@ @MACHDEPLIBS@ rm -f libtiff.@DSOSUF@ - if [ @DSOSUB_VERSION != @DSOSUF ] ; then \ + if [ @DSOSUB_VERSION != @DSOSUF@ ] ; then \ @LN@ @LN_S@ libtiff.@DSOSUF_VERSION@ libtiff.@DSOSUF@; \ fi touch $@ @@ -362,7 +362,7 @@ install: all installHdrs ${INSTALL} -idb tiff.sw.dev -m 755 -dir @DIR_LIB@ ${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_LIB@ -O libtiff.a if [ @DSO@dso != nodso ]; then \ - ${MAKE} installDSO; \ + ${MAKE} -${MAKEFLAGS} installDSO; \ else \ true; \ fi diff --git a/man/Makefile.in b/man/Makefile.in index 5d6aa2b6..293db3e5 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,5 +1,5 @@ #! smake -# $Header: /cvs/maptools/cvsroot/libtiff/man/Makefile.in,v 1.3 1999-11-29 16:42:44 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/man/Makefile.in,v 1.4 2001-04-03 05:17:02 warmerda Exp $ # # @WARNING@ # @@ -330,7 +330,7 @@ lib/TIFFWriteBufferSetup.3t:; ${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@ apps/Makefile: test -d apps || mkdir apps - ${MAKE} ${MANTOOLS} + ${MAKE} -${MAKEFLAGS} ${MANTOOLS} ${RM} apps/Makefile (cd apps; \ ${ECHO} 'install:'; \ @@ -342,7 +342,7 @@ apps/Makefile: )>apps/Makefile lib/Makefile: test -d lib || mkdir lib - ${MAKE} ${MANDEV} ${MANDEVLINKS} + ${MAKE} -${MAKEFLAGS} ${MANDEV} ${MANDEVLINKS} ${RM} lib/Makefile (cd lib; \ ${ECHO} 'install:'; \ @@ -356,9 +356,9 @@ lib/Makefile: install: all ${INSTALL} -m 755 -dir -idb tiff.man.tools ${MAN} ${INSTALL} -m 755 -dir -idb tiff.man.tools ${MAN}/${MANAPPS} - cd apps; ${MAKE} install + cd apps; ${MAKE} -${MAKEFLAGS} install ${INSTALL} -m 755 -dir -idb tiff.man.dev ${MAN}/${MANLIB} - cd lib; ${MAKE} install + cd lib; ${MAKE} -${MAKEFLAGS} install clean: rm -rf apps lib diff --git a/tools/Makefile.in b/tools/Makefile.in index 8d3a1bbf..175b759c 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,4 +1,4 @@ -# $Header: /cvs/maptools/cvsroot/libtiff/tools/Makefile.in,v 1.6 2001-03-30 01:55:32 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/tools/Makefile.in,v 1.7 2001-04-03 05:17:02 warmerda Exp $ # # @WARNING@ # @@ -100,12 +100,12 @@ TARGETS =\ all: ${TARGETS} @if [ "@LIBIMAGE@" = yes ]; then \ - ${MAKE} sgi2tiff; \ + ${MAKE} -${MAKEFLAGS} sgi2tiff; \ else \ true; \ fi @if [ "@LIBGL@" = yes ]; then \ - ${MAKE} tiffgt tiffsv; \ + ${MAKE} -${MAKEFLAGS} tiffgt tiffsv; \ else \ true; \ fi