⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 tiff文件开发库
💻
📖 第 1 页 / 共 4 页
字号:
    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep big >&5 && \       return 0    echo 'main() { int one = 1; char* cp = (char*)&one; exit(*cp!=0); }'>t.c    capture cat t.c    runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c" && ./a.out}## Check an existing port.h to see if it was created# for the target and compiler we are using.#CheckPortDotH(){    getConfigTag()    {	param=`grep "$1:" $2 | sed -e 's/.*:[ 	]*\([^ 	]*\).*/\1/'`    }    getConfigTag TARGET $PORTDOTH; target="$param"    getConfigTag CCOMPILER $PORTDOTH; ccompiler="$param"    CCOMP=$CCOMPILER    if [ $ISGCC = yes ]; then	CCOMP="${CCOMP}-${GCCversion}"    fi    test "$target" = "$TARGET" && test "$ccompiler" = "$CCOMP"}## Built port.h based on the system and compiler setup.#BuildPortDotH(){    Note ""    Note "Creating $PORTDOTH with necessary definitions."    (EmitCPlusPlusPrologue _PORT_    CheckForIncludeFile sys/types.h && echo '#include <sys/types.h>'    CheckVarDecl off_t 'typedef long off_t;' sys/types.h stdlib.h    CheckVarDecl size_t 'typedef unsigned size_t;' sys/types.h stdlib.h    CheckVarDecl u_char 'typedef unsigned char u_char;' sys/types.h    CheckVarDecl u_short 'typedef unsigned short u_short;' sys/types.h    CheckVarDecl u_int 'typedef unsigned int u_int;' sys/types.h    CheckVarDecl u_long 'typedef unsigned long u_long;' sys/types.h    echo "#define HOST_FILLORDER FILLORDER_${FILLORDER}"    CPU=`echo $TARGET | sed 's/-.*//'`    Note "... using $FILLORDER bit order for your $CPU cpu"    if CheckForBigEndian; then	echo "#define HOST_BIGENDIAN	1"	Note "... using big-endian byte order for your $CPU cpu"    else	echo "#define HOST_BIGENDIAN	0"	Note "... using little-endian byte order for your $CPU cpu"    fi    CheckForMMAP && {	echo '#define HAVE_MMAP 1'	Note "... configure use of mmap for memory-mapped files"	CheckFuncDecl mmap \	    'extern void* mmap(void*, size_t, int, int, int, off_t);' sys/mman.h    }    CheckForIncludeFile stdio.h		&& echo '#include <stdio.h>'    CheckForIncludeFile unistd.h	&& echo '#include <unistd.h>'    CheckForIncludeFile string.h	&& echo '#include <string.h>'    CheckForIncludeFile stdlib.h	&& echo '#include <stdlib.h>'    if CheckForDefine O_RDONLY fcntl.h; then	echo '#include <fcntl.h>'	Note "... O_RDONLY is in <fcntl.h>"    elif CheckForDefine O_RDONLY sys/file.h; then	echo '#include <sys/file.h>'	Note "... O_RDONLY is in <sys/file.h>"    else	AddDefine O_RDONLY "O_RDONLY	0"	AddDefine O_WRONLY "O_WRONLY	1"	AddDefine O_RDWR   "O_RDWR	2"    fi    echo 'typedef double dblparam_t;'	Note "... using double for promoted floating point parameters"    if [ -z "${INLINE-}" ]; then	if [ $ISGCC = yes ]; then	    echo '#ifdef __STRICT_ANSI__'	    echo '#define	INLINE	__inline__'	    echo '#else'	    echo '#define	INLINE	inline'	    echo '#endif'	    Note "... enabling use of inline functions"	else	    echo '#define	INLINE'	    Note "... disabling use of inline functions"	fi    else	echo "#define INLINE $INLINE"	Note "... using \"$INLINE\" to control inline function usage"    fi    echo '#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME'    CheckFuncDecl memset 'extern void* memset(void*, int, size_t);' string.h    CheckFuncDecl floor 'extern double floor(double);' math.h    CheckFuncDecl ceil 'extern double ceil(double);' math.h    CheckFuncDecl exp 'extern double exp(double);' math.h    CheckFuncDecl pow 'extern double pow(double, double);' math.h    CheckFuncDecl read 'extern int read(int, const void*, unsigned int);' unistd.h    CheckFuncDecl malloc 'extern void* malloc(size_t);' stdlib.h    CheckFuncDecl realloc 'extern void* realloc(void*, size_t);' stdlib.h    CheckFuncDecl free 'extern void free(void*);' stdlib.h    EmitCPlusPlusEpilogue    )>xport.h    if [ $SRCDIR_IS_LIBTIFF = no -a ! -d libtiff ]; then	Note "Creating libtiff directory"	mkdir libtiff    fi    mv xport.h $PORTDOTH; chmod 444 $PORTDOTH    Note "Done creating $PORTDOTH."}if [ "$PORT" != no ] && test -f $PORTDOTH && CheckPortDotH; then    Note ""    Note "Using previously created $PORTDOTH."else    $RM xport.h t.c a.out $PORTDOTH    BuildPortDotHfiif [ "$PORT" = auto ]; then    Note ""    Note "Checking system libraries for functionality to emulate."    FUNCS="        strcasecmp        strtoul        getopt    "    for i in $FUNCS; do        CheckForFunc $i || {            Note "... emulate $i"            PORTFUNCS="${PORTFUNCS-} $i.c"        }    done    if [ "${PORTFUNCS-}" ]; then        LIBPORT='../port/libport.a'        PORT=yes    else        PORT=no    fifiif [ $PORT != yes ] ; then   LIBPORT=   PORTFUNCS=fiNote "Done checking system libraries."Note ""Note "Checking for Dynamic Shared Object (DSO) support."if [ "$DSO" = auto ]; then    DSO=no    DSOSUF_VERSION=    DSOLD='${LD}'    TIFFLIBREF=    case $TARGET-$CC-$ISGCC in    *-irix5.2*)	if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then	    DSOSUF=so	    DSOOPTS='-elf -shared -no_unresolved -all'	    DSO=IRIX52	    TIFFLIBREF='-L${DEPTH}/libtiff -rpath '${DIR_LIB}' -ltiff'	fi	;;    *-irix*)	if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then	    DSOSUF=so	    DSOLD="${CCOMPILER} ${ENVOPTS}"            if [ $ISGCC = yes ]; then               LIBCOPTS="-fpic"               DSOOPTS='-shared -rdata_shared'            else               LIBCOPTS="-KPIC"               DSOOPTS='-shared -rdata_shared -check_registry ${SRCDIR}/port/irix/so_locations -quickstart_info'            fi	    DSO=IRIX	    TIFFLIBREF='-L${DEPTH}/libtiff -rpath '${DIR_LIB}' -ltiff'	fi	;;    *-aix*)	DSOSUF=a	DSOOPTS='-r'	LIBCOPTS="-bM\:SRE"	DSO=AIX	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'	;;    *-hpux*yes)        DSOSUF=sl        DSOLD=gcc        DSOOPTS='-fpic -shared'        LIBCOPTS=-fpic        DSO=HPUX	TIFFLIBREF="-Wl,+s,+b${DIR_LIB}"' -L${DEPTH}/libtiff -ltiff'        ;;		     *-hpux*)	DSOSUF=sl	DSOSUF_VERSION=${DIST_MAJOR}.${DIST_MINOR}${DIST_POINT}	DSOOPTS='-b'	LIBCOPTS="+z"	DSO=HPUX	TIFFLIBREF='-L$(DEPTH)/libtiff -ltiff'	;;    *-solaris*)	DSOSUF=so	DSOOPTS='-G'	if [ $ISGCC = yes ]; then	    LIBCOPTS="-fpic"	else	    LIBCOPTS="-K PIC"	fi	DSO=SOLARIS	TIFFLIBREF='-L${DEPTH}/libtiff -R'${DIR_LIB}' -ltiff'	;;    *-netbsd*)	DSOSUF=so.${DIST_MAJOR}.0	LIBCOPTS='-fPIC'	DSO=NETBSD	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'	;;    *-freebsd*)	DSOSUF=so.${DIST_MAJOR}	DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}	LIBCOPTS='-fPIC'	DSOOPTS='-shared'	DSO=GNULD	;;    *-openbsd*)	DSOSUF=so.${DIST_MAJOR}.${DIST_MINOR}	LIBCOPTS='-fpic'	DSOSUF=so.${DIST_MAJOR}${DIST_MINOR}.${DIST_POINT}	if [ "`uname -m`" = "sparc64" ]; then	  LIBCOPTS='-fPIC'	else	  LIBCOPTS='-fpic'	fi	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'	case "$TARGET" in	   *-openbsd[01].* | *-openbsd2.[0-7] | *-openbsd2.[0-7].*)	      DSO=oldOPENBSD	   ;;	   *)	      DSO=OPENBSD	      DSOLD="${CCOMPILER} ${ENVOPTS}"	      DSOOPTS='-shared ${LIBCOPTS}'	   ;;	esac	;;    *-darwin*)        DSOSUF=dylib        DSOSUF_VERSION=${DIST_MAJOR}.${DIST_MINOR}.${DIST_POINT}.dylib        LIBCOPTS='-fno-common'        DSOLD="${CCOMPILER} ${ENVOPTS}"        DSOOPTS='-dynamiclib -undefined error'        DSO=DARWIN        ;;    *-linux*)	DSOSUF=so.${DIST_MAJOR}	DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}	LIBCOPTS='-fPIC'	DSOOPTS='-shared'	DSO=GNULD	;;    *-osf3*|*-osf4*)	DSOSUF=so	DSOOPTS='-shared'	DSO=OSF	;;    *-sco3.2*)        DSOSUF=so.${DIST_MAJOR}        DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}        LIBCOPTS='-fPIC'        DSOOPTS='-shared'        DSO=OPENSERVER        ;;    esacfiif [ "$DSO" != no ]; then    JUNK="$JUNK t.${DSOSUF}"    #    # Check to make sure the compilers process    # the DSO options in the expected way.    #    CheckCCDSO()    {    $RM t.c t.o t.${DSOSUF}    cat>t.c<<EOFint f() { return 0; }EOF    capture cat t.c    runMake t \	"t.o:; ${CCOMPILER} ${ENVOPTS} ${LIBCOPTS} -c t.c" \	"t: t.o; ${DSOLD} ${DSOOPTS} -o t.${DSOSUF} t.o"    }    if CheckCCDSO; then	Note "Looks like your system supports $DSO-style DSOs."    else	cat 1>&4 <<EOFLooks like your system supports $DSO-style DSOs...... sigh, but $CCOMPILER does not support DSOs in the expected way.EOF	DSO=no    fifiif [ "$DSO" = no ]; then    DSOSUF=a DSOOPTS= LIBCOPTS=     DSOSUF_VERSION=$DSOSUFfitest -z "$TIFFLIBREF" && TIFFLIBREF="\${DEPTH}/libtiff/libtiff.${DSOSUF}"test -z "$DSOSUF_VERSION" && DSOSUF_VERSION=${DSOSUF}Note "Done checking for DSO support."Note ""if [ "$LIBIMAGE" = auto ]; then    if CheckForLibrary iopen -limage && CheckForIncludeFile gl/image.h; then	Note "Looks like there is support for SGI RGB images."	LIBIMAGE=yes    else	LIBIMAGE=no    fifiif [ "$LIBGL" = auto ]; then    if CheckForLibrary winopen -lgl && CheckForIncludeFile gl.h; then	Note "Looks like there is support for IRIS GL."	LIBGL=yes    else	LIBGL=no    fifitest $LIBGL = no -a $LIBIMAGE = no || Note ""Note "Selecting programs used during installation."## Miscellaneous ``little'' programs.#test -z "${CHMOD-}"	&& CHMOD=`findAppDef chmod $PATH chmod`test -z "${LN-}"	&& LN=`findAppDef ln $PATH ln`test -z "${SED-}"	&& SED=`findAppDef sed $PATH sed`test -z "${STRIP-}"	&& STRIP=`findAppDef strip $PATH strip`## Check if mv -f is supported#if [ -z "${MV_F-}" ]; then    $RM t.c; echo "">t.c    if mv -f t.c t.o; then	Note "Looks like mv supports the -f option to force a move."	MV_F=-f    else	Note "Warning, looks like mv has no -f option to force move operations;"	Note "... this may cause problems during installation."	MV_F=    fifi## Check if ln -s creates a symbolic link.#if [ -z "${LN_S-}" ]; then    $RM t.c; $LN -s foo t.c && LN_S=-sfiif [ -n "$LN_S" ]; then    Note "Looks like $LN supports the -s option to create a symbolic link."else    Note "Warning, looks like $LN has no -s option to create symbolic links;"    Note "... this may cause problems during installation."fi## Pick install mechanism.#if [ -z "${INSTALL-}" ]; then    case $TARGET in    *-irix*)	INSTALL=`findApp install /sbin:$PATH`;;    *)		INSTALL='${SCRIPT_SH} ../port/install.sh';;    esacfiNote "Done selecting programs."## User-changable configuration parameters section.# Anything selected here is presented to the user# and may be interactively changed.#Note ""Note "Selecting default TIFF configuration parameters."Note ""## Fill in any other configuration parameters not# setup in the site and local files.#bitchExecutable(){    echo ""    echo "Warning, $1 does not seem to be an executable program;"    echo "you'll need to correct this before starting up the fax server."    echo ""}## Setup manual page-related stuff.## Manual pages are processed according to:# 1. Section organization (BSD or System V)# 2. Pre-formatted (w/ nroff) or source.# 3. Compressed (compress, gzip, pack) or uncompressed.# 4. Whether or not the FlexFAX ``F'' suffix must be#    stripped for pages to be found (only for 4F pages).#if [ -z "${DIR_MAN-}" ]; then    MANPATH="	$MANPATH	/usr/local/man	/usr/contrib/man	/usr/catman/local    "    DIR_MAN=    for i in $MANPATH; do	test -d $i && { DIR_MAN=$i; break; }    done    test -z "$DIR_MAN" && DIR_MAN=${PREFIX}/manfiNote "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;;    *-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	;;    esacfiNote "Looks like manual pages should be installed with $MANSCHEME."## Figure out which brand of echo we have and define# prompt and print shell functions accordingly.#if [ `echo foo\\\c`@ = "foo@" ]; then    prompt()    {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -