$NetBSD: patch-ae,v 1.14 2009/08/27 17:09:55 wiz Exp $ --- configure.orig 2005-12-16 22:40:30.000000000 +0000 +++ configure @@ -37,23 +37,23 @@ # # Setup general configuration parameters. # -DIR_BIN=/usr/local/bin -DIR_SBIN=/usr/local/sbin -DIR_LIBDATA=/usr/local/lib/fax -DIR_LIB=/usr/local/lib -DIR_LIBEXEC=$DIR_SBIN -DIR_SPOOL=/var/spool/hylafax -DIR_HTML=/var/httpd/htdocs/hylafax -DIR_CGI=/var/httpd/cgi-bin +DIR_BIN=${PREFIX}/bin +DIR_SBIN=${PREFIX}/sbin +DIR_LIBDATA=${PREFIX}/libdata/hylafax +DIR_LIB=${PREFIX}/lib +DIR_LIBEXEC=${PREFIX}/libexec +DIR_SPOOL=${VARBASE}/spool/hylafax +DIR_HTML=${PREFIX}/http/htdocs/hylafax +DIR_CGI=${PREFIX}/http/cgi-bin PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe -PATH_IMPRIP=/usr/lib/print/psrip +PATH_IMPRIP=${PREFIX}/lib/print/psrip HTMLPATH=/hylafax CGIPATH=/cgi-bin DEFVRES=98 PAGESIZE="North American Letter" FAXUID=uucp FAXGID= -SYSUID=bin +SYSUID=root SYSGID= DSO=auto GETTY=auto @@ -72,9 +72,8 @@ DPS=no GS=no IMP=no UTMP=auto -OPTIMIZER="-O" -LIBTIFF="-L/usr/local/lib -ltiff" -TIFFINC=/usr/local/include +LIBTIFF="-Wl,-R${PREFIX}/lib -L${PREFIX}/lib -ltiff -ljpeg -lz -lm" +TIFFINC=${PREFIX}/include TIFFBIN= LIBZ= ZLIBINC= @@ -82,8 +81,8 @@ REGEX=yes LIBREGEX='-L${DEPTH}/regex -lregex' REGEXINC='${DEPTH}/${TOPSRCDIR}/regex' DBLIB=no -LIBDB="-L/usr/local/lib -ldb" -DBLIBINC=/usr/local/include +LIBDB="-L${PREFIX}/lib -ldb" +DBLIBINC=${PREFIX}/include FAXD= LIBFAXSERVER='libfaxserver.${DSO}' LIBUTIL='${UTIL}/libfaxutil.${DSO}' @@ -224,6 +223,7 @@ PKG_EMAIL PKG_VENDOR PORT PORTFUNCS +PREFIX PROTOTYPES PSPACKAGE PS PWDCMD @@ -290,7 +290,7 @@ test -d /usr/bsd && PATH=$PATH:/usr/bsd test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others test -d /usr/contrib/bin && PATH=$PATH:/usr/contrib/bin # BSDi test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others -test -d /usr/local/bin && PATH=/usr/local/bin:$PATH # for GNU stuff +test -d ${PREFIX}/bin && PATH=${PREFIX}/bin:$PATH # for packages stuff PATH=$PATH:$OPATH POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions @@ -2418,7 +2418,7 @@ EOF if [ ${header_ver} -ge 19960307 ]; then case ${lib_ver} in 3.4) tiff_runlen_t="uint16" ;; - 3.[567]) tiff_runlen_t="uint32" ;; + 3.[56789]) tiff_runlen_t="uint32" ;; esac fi else @@ -3145,13 +3145,7 @@ main() printf("old include files: version %u\n", ZLIB_VERSION); exit(-1); } - if (strncmp(zlib_version, ZLIB_VERSION, 4) != 0) { - printf("library/header file incompatibility: %s %s\n", - zlib_version, ZLIB_VERSION); - exit(-1); - } else { exit(0); - } } EOF capture cat t.c @@ -3213,7 +3207,7 @@ Note "Checking TIFF support." # Location of TIFF binaries # if [ -z "$TIFFBIN" ]; then - DIRS="/usr/local/bin /usr/contrib/bin /usr/gnu/bin /usr/bin" + DIRS="${PREFIX}/bin /usr/local/bin /usr/contrib/bin /usr/gnu/bin /usr/bin" for i in $DIRS; do test -x $i/tiff2ps && { TIFFBIN=$i; break; } done @@ -3722,6 +3716,7 @@ if [ -z "$FAXGID" ]; then *-bsdi*) FAXGID=uucp;; *freebsd2.1*) FAXGID=uucp; break;; # Not sure when this changed.. *bsd*) FAXGID=dialer;; + *-dragonfly*) FAXGID=dialer;; *-hpux*) FAXGID=sys;; *-irix*) FAXGID=nuucp;; *-isc*) FAXGID=uucp;; @@ -3750,6 +3745,7 @@ if [ -z "$SYSGID" ]; then *-aix*) SYSGID=sys;; *netbsd*) SYSGID=wheel;; *bsd*) SYSGID=bin;; + *-dragonfly*) SYSGID=bin;; *-hpux*) SYSGID=bin;; *-irix*) SYSGID=sys;; *-isc*) SYSGID=sys;; @@ -3794,6 +3790,7 @@ fi if [ "$GETTY" = auto ]; then case $TARGET in *bsd*) GETTY=BSD;; + *-dragonfly*) GETTY=BSD;; *-sunos*) GETTY=BSD;; *-ultrix*) GETTY=BSD;; *darwin*) GETTY=BSD;; @@ -3836,7 +3833,7 @@ fi if [ -z "$PATH_VGETTY" ]; then PATH_VGETTY=`findApp vgetty /usr/libexec:/sbin:$PATH` if [ -z "$PATH_VGETTY" ]; then - PATH_VGETTY=/bin/vgetty + PATH_VGETTY=${PREFIX}/bin/vgetty Note "WARNING, no vgetty program found to handle a voice call, using $PATH_VGETTY." else Note "Looks like $PATH_VGETTY is the program to exec for a voice call." @@ -3849,7 +3846,7 @@ fi if [ -z "$PATH_EGETTY" ]; then PATH_EGETTY=`findApp egetty /usr/libexec:/sbin:$PATH` if [ -z "$PATH_EGETTY" ]; then - PATH_EGETTY=/bin/egetty + PATH_EGETTY=${PREFIX}/bin/egetty Note "WARNING, no egetty program found, using $PATH_EGETTY." else Note "Looks like $PATH_EGETTY is the program to exec for an extern call." @@ -3871,6 +3868,7 @@ if [ "$LOCKS" = auto ]; then *-sysv5*) LOCKS="+ascii";; *-solaris*) LOCKS="+ascii";; *-freebsd*) LOCKS=ascii;; + *-dragonfly*) LOCKS=ascii;; *-netbsd*) LOCKS=ascii;; *bsd*) LOCKS=binary;; *) LOCKS=ascii;; @@ -3920,6 +3918,7 @@ PickRIP() { if [ -z "$PATH_GSRIP" ]; then GSLOCS=" + ${PREFIX}/bin/gs /usr/local/bin/gs /usr/contrib/bin/gs /usr/gnu/bin/gs @@ -3967,7 +3966,7 @@ fax software to operate correctly. See on building Ghostscript with the necessary TIFF driver. EOF - PATH_PSRIP=/usr/local/bin/gs + PATH_PSRIP=${PREFIX}/bin/gs PATH_GSRIP=$PATH_PSRIP fi } @@ -4034,9 +4033,9 @@ if [ -z "$PATH_AFM" ]; then else DIR_AFMS=" /usr/lib/afm - /usr/local/lib/afm - /usr/local/share/ghostscript/fonts - /usr/local/lib/ghostscript/fonts + ${PREFIX}/lib/afm + ${PREFIX}/share/ghostscript/fonts + ${PREFIX}/lib/ghostscript/fonts /usr/share/ghostscript/fonts /usr/gnu/lib/ghostscript/fonts /opt/gnu/lib/ghostscript/fonts @@ -4056,7 +4055,7 @@ if [ -z "$PATH_AFM" ]; then fi if [ -z "$PATH_AFM" ]; then # put it where ghostscript normally puts things - PATH_AFM=/usr/local/lib/ghostscript/fonts + PATH_AFM=${PREFIX}/share/ghostscript/fonts Note "WARNING, could not locate a directory with font metric information," Note "guessing that font metric information goes in $PATH_AFM." else @@ -4075,7 +4074,7 @@ fi # if [ -z "$DIR_MAN" ]; then MANPATH=" - $MANPATH + ${PREFIX}/man /usr/local/man /usr/contrib/man /usr/catman/local @@ -4084,43 +4083,11 @@ if [ -z "$DIR_MAN" ]; then for i in $MANPATH; do test -d $i && { DIR_MAN=$i; break; } done - test -z "$DIR_MAN" && DIR_MAN=/usr/local/man + test -z "$DIR_MAN" && DIR_MAN=${PREFIX}/man fi Note "Looks like manual pages go in $DIR_MAN." if [ -z "$MANSCHEME" ]; then - case $TARGET in - *-bsdi*|*-netbsd*) MANSCHEME=bsd-nroff-gzip-0.gz;; - *-freebsd*) MANSCHEME=bsd-source-cat;; - *-linux*) MANSCHEME=bsd-source-cat;; - *-ultrix*) MANSCHEME=bsd-source-cat;; - *-sunos*) MANSCHEME=bsd-source-cat-strip;; - *-sysv[234]*) MANSCHEME=sysv-source-cat-strip;; - *-hpux*) MANSCHEME=sysv-source-cat-strip;; - *-solaris*) MANSCHEME=sysv-source-cat-strip;; - *-aix*) MANSCHEME=sysv-source-strip;; - *-isc*|*-*-sco*) MANSCHEME=sysv-source-cat;; - *-irix*) MANSCHEME=sysv-nroff-compress-Z;; - *) - # - # Try to deduce the setup from existing manual pages. - # XXX needs more work XXX - # - MANSCHEME=sysv-source-cat - if [ -d /usr/share/man ]; then - if [ -d /usr/share/man/u_man ]; then - MANSCHEME=sysv-source-cat - elif [ -d /usr/share/man/man8 ]; then - MANSCHEME=bsd-source-cat - fi - elif [ -d /usr/share/catman ]; then - if [ -d /usr/share/catman/u_man ]; then - MANSCHEME=sysv-nroff-cat - elif [ -d /usr/share/catman/man8 ]; then - MANSCHEME=bsd-nroff-cat - fi - fi - ;; - esac + MANSCHEME=bsd-source-cat-strip fi Note "Looks like manual pages should be installed with $MANSCHEME."