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

📄 configure

📁 tiff文件开发库
💻
📖 第 1 页 / 共 4 页
字号:
#!/bin/sh#	$Header: /cvsroot/osrs/libtiff/configure,v 1.31 2003/10/09 08:33:47 dron Exp $## Tag Image File Format (TIFF) Software## Copyright (c) 1988-1997 Sam Leffler# Copyright (c) 1991-1997 Silicon Graphics, Inc.# # Permission to use, copy, modify, distribute, and sell this software and # its documentation for any purpose is hereby granted without fee, provided# that (i) the above copyright notices and this permission notice appear in# all copies of the software and related documentation, and (ii) the names of# Sam Leffler and Silicon Graphics may not be used in any advertising or# publicity relating to the software without the specific, prior written# permission of Sam Leffler and Silicon Graphics.# # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  # # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE.## Configuration script for the TIFF Software## Shell script to setup machine-dependent files in# preparation for building TIFF source.#POSIXLY_CORRECT=1; export POSIXLY_CORRECT	# disable GNU extensionsQUIET=no				# suppress messages to ttyNONINTERACTIVE=no			# control prompting of config paramsSITE=					# dir where config.site is locatedTARGET=					# target system identitySRCDIR=					# dir where source is located## Setup general configuration parameters.#PREFIX=/usr/local                       # root of installation EPREFIX=${PREFIX}DIRS_LIBINC=				# dirs to search for ancillary includesDIR_JPEGLIB=				# dir for IJG -ljpegDIR_GZLIB=				# dir for zlib -lgzDSO=auto				# auto-enable DSO supportLIBCOPTS=				# library-specific C-compiler optionsJPEG=no					# configure JPEG supportZIP=no					# configure ZIP/Deflate supportPORT=auto				# enable portability emulationsHTML=no					# install HTML documentationLIBGL=auto				# auto-enable build of SGI -lgl appsLIBIMAGE=auto				# auto-enable build of SGI -limage apps: ${CC=}				# name of C compiler to use: ${CCOMPILER=}				# full pathname of C compiler: ${OPTIMIZER=-O}			# Optimization flag: ${ENVOPTS=}				# CC opts for ANSI C compilation: ${MAKE=make}				# make to use# screws up the test of `-f -': ${MAKEFLAGS=}				# unset MAKEFLAGSRM="rm -f"## Error diagnostics that should go to the terminal are# done with this interface (or cat).#bitch(){    echo "configure: $@" 1>&2}## This is the preferred interface for# configure to terminate abnormally.#boom(){    bitch ""    bitch "Unrecoverable error!  Once you've corrected the problem rerun this script."    kill -1 $$				# use kill so trap handler is called}usage(){    cat<<'EOF'Usage: configure [options] [host]Options: [defaults in brackets after descriptions]  --help                  print this message  --quiet                 do not print `Using ...' messages  --verbose		  opposite of --quiet  --noninteractive        don't ask any questions  --version               print the version of autoconf that created configure  --prefix=PREFIX         root of installation [PREFIX=/usr/local]  --exec-prefix=EPREFIX   root of installation [EPREFIX=PREFIX]  --target=TARGET         configure for TARGET [TARGET=HOST]  --srcdir=DIR            find the sources in DIR [configure dir or ..]  --with-PARAM[=ARG]      set configuration PARAM [ARG=yes]EOF}## Crack command line arguments.  We purposely# use syntax and options that are compatible# with GNU autoconf.#ac_prev=for ac_optiondo    if [ -n "$ac_prev" ]; then		# assign the argument to previous option	eval "$ac_prev=\$ac_option"	ac_prev=	continue    fi    case "$ac_option" in		# collect optional argument    -*=*)	ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'`;;    *)		ac_optarg=;;    esac    case "$ac_option" in    -with-*|--with-*)	ac_with=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`	# Reject names that are not valid shell variable names.	if [ -n "`echo $ac_with| sed 's/[-_a-zA-Z0-9]//g'`" ]; then	    bitch "configure: $ac_with: invalid parameter name."	    kill -1 $$	fi	ac_with=`echo $ac_with| sed 's/-/_/g'`	case "$ac_option" in	*=*)	;;	*)	ac_optarg=yes;;	esac	eval "${ac_with}='$ac_optarg'"	;;    -quiet|--quiet)		QUIET=yes;;    -verbose|--verbose)		QUIET=no;;    -noninteractive|--noninteractive) NONINTERACTIVE=yes;;    -site|--site)		ac_prev=SITE;;    -site=*|--site=*)		SITE="$ac_optarg";;    -srcdir|--srcdir)		ac_prev=SRCDIR;;    -srcdir=*|--srcdir=*)	SRCDIR="$ac_optarg";;    --exec-prefix)		ac_prev=EPREFIX;;    --exec-prefix=*)		EPREFIX="$ac_optarg" ;;    --prefix)			ac_prev=PREFIX;;    --prefix=*)			PREFIX="$ac_optarg";                                EPREFIX=${PREFIX} ;;    -target|--target)		ac_prev=TARGET;;    -target=*|--target=*)	TARGET="$ac_optarg" ;;    -version|--version)	echo "This is TIFF configure $Revision: 1.31 $"	exit 0	;;    -help|--help)		usage; exit 0;;    -*)	bitch "configure: $ac_option: invalid option; use -help for usage."	kill -1 $$	;;    *)	if [ x"$TARGET" != x ]; then	    bitch "configure: Can only configure for one target at a time."	    kill -1 $$	fi	TARGET="$ac_option"	;;    esacdoneDIR_BIN=${EPREFIX}/bin		# destination for applicationsDIR_LIB=${EPREFIX}/lib		# destination for libraryDIR_INC=${PREFIX}/include		# destination for include filesDIR_HTML=${PREFIX}/doc/libtiff		# destination for HTML filesif [ -n "$ac_prev" ]; then    bitch "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`"    kill -1 $$fi## Locate source directory by looking for the VERSION file.# The directory must either be specified through the# environment or be located in the current directory or a# parent of the current directory.#test "$SRCDIR" || {    configure=$0    # NB: don't use dirname since it may not exist    SRCDIR=`echo $configure | sed 's;/[^/][^/]*$;;'`    if [ @"$SRCDIR" = @"$configure" ]; then        SRCDIR=.    fi    while [ ! -r $SRCDIR/VERSION ]; do	# strip last directory from pathname	newdir=`echo $SRCDIR | sed 's;/[^/]*$;;'`	if [ -z "$newdir" ] || [ "$newdir" = $SRCDIR ]; then	    break;	fi	SRCDIR=$newdir    done}if [ ! -r $SRCDIR/VERSION ]; then    bitch "Cannot locate sources in $SRCDIR."    kill -1 $$fiSRCDIR=`echo "$SRCDIR" | sed 's;\([^/]\)/*$;\1;'`if [ -r ${SRCDIR}/tif_version.c ] ; then    SRCDIR_IS_LIBTIFF=yes    PORTDOTH=port.helse    SRCDIR_IS_LIBTIFF=no    PORTDOTH=libtiff/port.hfi## Descriptor usage:# 1: ???# 2: errors that should be seen even if we're in the background.# 3: [stdout from test runs]# 4: verbose-style messages (Using ...)# 5: compiler stderr when running tests#if [ $QUIET = yes ]; then    exec 4>/dev/null			# chuck messageselse    exec 4>&1				# messages got to stdoutfiexec 5>./config.log			# compiler messages and the likecapture(){    (eval "set -x; $*") >&5 2>&1    return}captureX(){    (eval "set -x; $*") 2>&5    return}date >&5echo Running "$0" with arguments: "$@" >&5cat 1>&5 <<'EOF'This file contains information that is captured from running the configurescript.  Lines that begin with a "+" are command lines echoed by theshell.  Other lines are the output of commands; usually the contents oftest case files or the output from compilers.  If configure does thewrong thing, you can use the information captured here to aid in debugging.EOFVERSIONFILE=$SRCDIR/VERSIONRELEASE_DATE_FILE=$SRCDIR/RELEASE-DATEDATE=`date`eval `cat $VERSIONFILE |  sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\(.*\)/DIST_MAJOR=\1; DIST_MINOR=\2; DIST_POINT=\3/'`VERSION="v${DIST_MAJOR}.${DIST_MINOR}.${DIST_POINT}"RELEASE=`cat $VERSIONFILE |  sed -e 's/[0-9 \.]//g'`Note(){    echo "$@" 1>&4}Note ""if [ $SRCDIR_IS_LIBTIFF = yes ] ; then  Note "Configuring TIFF Software (library only) $VERSION"else  Note "Configuring TIFF Software $VERSION"fiNote ""Note "If configure does the wrong thing, check the file config.log for"Note "information that may help you understand what went wrong."Note ""## Read site and local configuration parameters.#if [ -f $SITE/config.site ]; then    Note "Reading site-wide parameters from $SITE/config.site."    . $SITE/config.site    capture . $SITE/config.siteelif [ -f $SRCDIR/config.site ]; then    Note "Reading site-wide parameters from $SRCDIR/config.site."    . $SRCDIR/config.site    capture . $SRCDIR/config.sitefiif [ -f config.local ]; then    Note "Reading local parameters from config.local."    . ./config.local    capture . ./config.localelif [ -f $SRCDIR/config.local ]; then    Note "Reading local parameters from $SRCDIR/config.local."    . $SRCDIR/config.local    capture . $SRCDIR/config.localfi## Emulate old-style settups...#test -z "${DIR_JPEG-}"  || {    DIRS_LIBINC="${DIRS_LIBINC} ${DIR_JPEG}"    DIR_JPEGLIB="${DIR_JPEG}"}test -z "${DIR_LIBGZ-}" || {    DIRS_LIBINC="${DIRS_LIBINC} ${DIR_LIBGZ}"    DIR_GZLIB="${DIR_LIBGZ}"}identifyTarget(){    random=`date | awk '{print $4}' | sed -e 's/.*://'` 2>/dev/null    case "$random" in    *0) Note "Wow, you've got a $1 system!";;    *1) Note "Hmm, looks like a $1 system.";;    *2) Note "Oh no, not another $1 system...";;    *3) Note "Well I'll be, a $1 system.";;    *4) Note "Fee, fie, foe, this smells like a $1 system.";;    *5)	Note "Gosh, aren't you lucky to have a $1 system!";;    *6)	Note "YOW!!  Did something bad happen or am I on a $1 system?";;    *7)	Note "Do they really still make $1 systems?!";;    *8)	Note "I'm always happy to encounter another $1 system.";;    *9)	Note "Here we are again, this time on a $1 system.";;esac}## If no target is specified, try to deduce the system.# We use the GNU scripts for guessing and canonicalizing# the system identification, if available.#if [ -z "$TARGET" ]; then    test -f $SRCDIR/config.guess && TARGET=`sh $SRCDIR/config.guess` 2>/dev/null    if [ -z "$TARGET" ]; then	bitch "Sorry, no target specified on the command line and I don't seem"	bitch "to have the GNU config.guess script that is used to deduce your"	bitch "system type."	kill -1 $$    fi    identifyTarget $TARGETelif [ -f $SRCDIR/config.sub ]; then    TARGET=`sh $SRCDIR/config.sub "$TARGET"`else    Note "Warning, I don't seem to have the GNU config.sub script to canonicalize"    Note "your target specification; this may cause problems later on..."fiif [ -z "${FILLORDER-}" ]; then    #    # Host bit order within a word.    #    case $TARGET in    mips-dec-*)	FILLORDER=LSB2MSB;;    i[345]86-*)	FILLORDER=LSB2MSB;;    *)		FILLORDER=MSB2LSB;;    esacfi## Find the full pathname of a file# using the specified test operation.#findThing(){    t="$1"; app="$2"; path="$3";    case "$app" in    /*) eval "$t" "$app" && { echo "$app"; return; };;    esac    (IFS=:    for i in $path; do	eval "$t" "$i/$app" && { echo "$i/$app"; return 0; }    done    return 1    )}## Find the full pathname of a plain file.#findFile(){    findThing "test -f" "$1" "$2"}## Find the full pathname of an executable.#findApp(){    findThing "test -x" $1 $2}## Find the full pathname of an executable;# supply a default if nothing is found.#findAppDef(){    app=$1; path=$2; def=$3    case $app in    /*) test -x $app && { echo $app; return; };;    esac    IFS=:    for i in $path; do	test -x $i/$app && { echo $i/$app; return; }    done    echo $def}## Find the full pathname of a header file; in search-path $DIRS_LIBINC#findHeader(){    case "$1" in    /*) echo "$1"; return ;;    esac    for i in ${DIRS_LIBINC} /usr/include; do	test -r $i/$1 && {	    case "$i" in	    /*) echo "$i/$1"; return ;;	    esac	    if [ $SRCDIR_IS_LIBTIFF = yes ]; then		echo "$i/$1";	    else		echo "../$i/$1";	    fi	    return;	}    done}## Locate a C compiler that satisfies our needs (using assorted heuristics).#JUNK="    a.out    confsed    conftestmmap    confx confy    confMakefile    core    dummy    dummy.a    dummy.c    dummy.o    foo    so_locations    t.c    t.o    t    xMakedepend    xdefs    xgnu.c    xmakeinc    xport.h"trap "$RM \$JUNK; exit 1" 1 2 15$RM $JUNKcat>xgnu.c<<EOF#ifdef __GNUC__yes;#endifEOF## Check if the specified compiler is from GNU #isGNU(){    capture "cat xgnu.c; ($1 -E xgnu.c 2>&5 | egrep yes)"}

⌨️ 快捷键说明

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