$NetBSD: patch-ae,v 1.24 2023/01/05 14:30:13 wiz Exp $ * Customize paths. * Configure for pkgsrc. * LIBPORT needs to be specified with -L and -l (instead of the path to the .a file) to match the other internal libraries. Otherwise the wrappers reorder it relative to the other internal libraries and some symbols aren't resolved at link time. * Allow newer libtiff. * Support DragonFly BSD. --- configure.orig 2012-06-06 00:58:38.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_LOCALE=/usr/local/share/locale -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_LOCALE=${PREFIX}/share/locale +DIR_CGI=${PREFIX}/http/cgi-bin PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe -PATH_IMPRIP=/usr/lib/print/psrip +PATH_IMPRIP=${PREFIX}/lib/print/psrip CGIPATH=/cgi-bin LOCALE_DOMAIN=hylafax DEFVRES=98 PAGESIZE="North American Letter" FAXUID=uucp FAXGID= -SYSUID=bin +SYSUID=root SYSGID= DSO=auto GETTY=auto @@ -70,11 +70,10 @@ GS=no IMP=no UTMP=auto NLS=auto -OPTIMIZER="-O" LIBCRYPT= LIBPAM= -LIBTIFF="-ltiff" -TIFFINC= +LIBTIFF=`pkg-config --libs libtiff-4` +TIFFINC=`pkg-config --cflags libtiff-4` TIFFBIN= LIBUTIL= LIBZ=-lz @@ -229,6 +228,7 @@ PKG_ARCH PKG_EMAIL PKG_VENDOR PORTFUNCS +PREFIX PROTOTYPES PSPACKAGE PS PWDCMD @@ -300,7 +300,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 @@ -831,7 +831,7 @@ checkGCCVersion() # NB: use ANSI C prototype to weed out non-ANSI compilers. # cat>dummy.c<dummy.c<t.c + echo "extern int $1(); int main(){$1($2);exit(0);}" >t.c capture cat t.c runMake t "t:; \${CC} t.c ${MACHDEPLIBS}" } @@ -2448,7 +2448,7 @@ CheckForStructExitStatus() echo "$i" done cat<' cat<t.c< -main() +int main() { ioctl(0, TXADDCD, "rts"); ioctl(0, TXDELCD, "rts"); @@ -2538,7 +2538,7 @@ CheckLibtiff() cat>t.c< #include "tiffio.h" -main() +int main() { printf( "header_ver=%d lib_ver=%s", TIFFLIB_VERSION, TIFFGetVersion() ); exit(0); @@ -2563,7 +2563,7 @@ EOF tiff_offset_t="uint32" tiff_bytecount_t="uint32" ;; - 4.[0]) tiff_runlen_t="uint32" + 4.[0-9]) tiff_runlen_t="uint32" tiff_offset_t="uint64" tiff_bytecount_t="uint64" echo '#define TIFFHeader TIFFHeaderClassic' @@ -3281,7 +3281,7 @@ CheckForSyslog() { (echo '#include '; echo '#include "port.h"'; - echo 'main(){syslog(0,"foo");exit(0);}') >t.c + echo 'int main(){syslog(0,"foo");exit(0);}') >t.c capture cat t.c runMake t "t:; \${CC} t.c ${MACHDEPLIBS}" } @@ -3290,7 +3290,7 @@ CheckForVSyslog() (echo '#include '; echo '#include '; echo '#include "port.h"'; - echo 'main(){va_list ap; vsyslog(0,"foo", ap);exit(0);}') >t.c + echo 'int main(){va_list ap; vsyslog(0,"foo", ap);exit(0);}') >t.c capture cat t.c runMake t "t:; \${CC} t.c ${MACHDEPLIBS}" } @@ -3303,7 +3303,7 @@ else Note "... emulate syslog&co." PORTFUNCS="$PORTFUNCS syslog.c" fi -LIBPORT='${PORT}/libport.a' +LIBPORT='-L${PORT} -lport' Note "Done checking system libraries." @@ -3314,19 +3314,13 @@ Note "Checking ZLIB support." # cat>t.c<