From: Robert Colquhoun Date: Wed, 17 Nov 1999 10:24:50 +0000 (+0000) Subject: bzero and zlib patch. X-Git-Tag: HYLAFAX-4_1BETA3~147 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=af553ea4c07dbcf09ab2860cabd61aee432b1b89;p=thirdparty%2FHylaFAX.git bzero and zlib patch. Note: the zlib patch does not quite work properly yet when zlib is located in say /opt/zlib or /usr/local/zlib. This will have to be fixed at a future date. --- diff --git a/config.site b/config.site index fbc22843..954dd106 100644 --- a/config.site +++ b/config.site @@ -50,7 +50,7 @@ #GS="no" # install Ghostscript RIP (yes|no) #IMP="no" # install SGI Impressario 2.1 support (yes|no) #REGEX="yes" # use distributed regular expression package -#ZLIB="yes" # use distributed zlib distribution +#ZLIB="auto" # use distributed zlib distribution #UTMP="utmpx" # type of utmp+wtmp handling (auto|utmp|utmpx) #DBLIB="no" # use distributed libdb distribution diff --git a/configure b/configure index 93471e7d..65dafff0 100755 --- a/configure +++ b/configure @@ -70,9 +70,9 @@ UTMP=auto LIBTIFF="-L/usr/local/lib -ltiff" TIFFINC=/usr/local/include TIFFBIN= -ZLIB=yes -LIBZ='-L${DEPTH}/zlib -lz' -ZLIBINC='${DEPTH}/${TOPSRCDIR}/zlib' +ZLIB=auto +LIBZ= +ZLIBINC= REGEX=yes LIBREGEX='-L${DEPTH}/regex -lregex' REGEXINC='${DEPTH}/${TOPSRCDIR}/regex' @@ -1298,7 +1298,8 @@ makeDefs() $RM confsed1 WARNING="Warning, this file was automatically created by the HylaFAX configure script" dumpvars "$VAR1" CCOMPILER CXXCOMPILER | sort>confsed1 - $RM xdefs; sed -f confsed1 $SRCDIR/defs.in>$1 + dumpvars "$VAR2" CCOMPILER CXXCOMPILER | sort>confsed2 + $RM xdefs; sed -f confsed1 $SRCDIR/defs.in | sed -f confsed2 >$1 } # NB: save original values for use in checks below OTIFFINC="${TIFFINC}"; x="`relativize ${TIFFINC}`"; TIFFINC="$x" @@ -2395,6 +2396,7 @@ BuildPortDotH() 'extern void* mmap(void*, size_t, int, int, int, off_t);' sys/mman.h } + CheckFuncDecl bzero 'extern void bzero(void *, int);' string.h CheckFuncDecl mkstemp 'extern int mkstemp(char *);' stdlib.h stdio.h unistd.h CheckFuncDecl strerror 'extern char* strerror(int);' string.h CheckFuncDecl strncasecmp \ @@ -2932,7 +2934,7 @@ EOF fi Note "Done checking TIFF support." -if [ $ZLIB = no ]; then +if [ $ZLIB != yes ]; then Note "" Note "Checking ZLIB support." # @@ -2943,23 +2945,51 @@ if [ $ZLIB = no ]; then main() { if (strcmp(ZLIB_VERSION, "0.95") < 0) { /* include file version */ - printf("old include files: version %u\n", ZLIB_VERSION); + 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); + printf("library/header file incompatibility: %s %s\n", + zlib_version, ZLIB_VERSION); + exit(-1); + } else { + exit(0); + } } EOF capture cat t.c if runMake t "t:; \${CC} \${CVERSION} -I${OZLIBINC} t.c ${LIBZ} ${MACHDEPLIBS}" && capture ./a.out; then - Note "Using ZLIB include files from $OZLIBINC" - Note "Using pre-built ZLIB library $LIBZ" + ZLIBINC="${OZLIBINC}" + Note "Using ZLIB include files from $OZLIBINC" + Note "Using pre-built ZLIB library $LIBZ" else - cat 1>&2 <&2 <