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

📄 configure

📁 早期freebsd实现
💻
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh# Guess values for system-dependent variables and create Makefiles.# Generated automatically using autoconf.# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.# This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and# --with-PACKAGE unless this script has special code to handle it.for argdo  # Handle --exec-prefix with a space before the argument.  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=  # Handle --host with a space before the argument.  elif test x$next_host = xyes; then next_host=  # Handle --prefix with a space before the argument.  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=  # Handle --srcdir with a space before the argument.  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=  else    case $arg in     # For backward compatibility, also recognize exact --exec_prefix.     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)	exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)	next_exec_prefix=yes ;;     -gas | --gas | --ga | --g) ;;     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;     -host | --host | --hos | --ho | --h)	next_host=yes ;;     -nfp | --nfp | --nf) ;;     -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)        no_create=1 ;;     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)	prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)	next_prefix=yes ;;     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)	srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)	next_srcdir=yes ;;     -with-* | --with-*)       package=`echo $arg|sed 's/-*with-//'`       # Delete all the valid chars; see if any are left.       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then         echo "configure: $package: invalid package name" >&2; exit 1       fi       eval "with_`echo $package|sed s/-/_/g`=1" ;;     *) ;;    esac  fidonetrap 'rm -f conftest* core; exit 1' 1 3 15rm -f conftest*compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'# A filename unique to this package, relative to the directory that# configure is in, which we can look for to find out if srcdir is correct.unique_file=groff/groff.cc# Find the source files, if location was not specified.if test -z "$srcdir"; then  srcdirdefaulted=yes  # Try the directory containing this script, then `..'.  prog=$0  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`  test "X$confdir" = "X$prog" && confdir=.  srcdir=$confdir  if test ! -r $srcdir/$unique_file; then    srcdir=..  fifiif test ! -r $srcdir/$unique_file; then  if test x$srcdirdefaulted = xyes; then    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2  else    echo "configure: Can not find sources in \`${srcdir}'." 1>&2  fi  exit 1fi# Preserve a srcdir of `.' to avoid automounter screwups with pwd.# But we can't avoid them for `..', to make subdirectories work.case $srcdir in  .|/*|~*) ;;  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.esacif test -z "$prefix"then  echo checking for grops to derive installation directory prefix  saveifs="$IFS"; IFS="$IFS:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test $dir != . && test -f $dir/grops; then      # Not all systems have dirname.      prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`      break    fi  done  IFS="$saveifs"fiif test -z "$prefix"then  echo checking for gcc to derive installation directory prefix  saveifs="$IFS"; IFS="$IFS:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test $dir != . && test -f $dir/gcc; then      # Not all systems have dirname.      prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`      break    fi  done  IFS="$saveifs"fiif test -z "$CC"; then  echo checking for gcc  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/gcc; then      CC="gcc"      break    fi  done  IFS="$saveifs"fitest -z "$CC" && CC="cc"# Find out if we are using GNU C, under whatever name.cat > conftest.c <<EOF#ifdef __GNUC__  yes#endifEOF${CC-cc} -E conftest.c > conftest.out 2>&1if egrep yes conftest.out >/dev/null 2>&1; then  GCC=1 # For later tests.firm -f conftest*cc_compile='$CCC conftest.cc -o conftest $CCLIBS $LIBS >/dev/null 2>&1'if test -z "$CCC"; then# See whether the C compiler is also a C++ compiler.echo checking if C compiler is also a C++ compilercat <<EOF > conftest.cc#ifdef __cplusplus  yes#endifEOF$CC -E conftest.cc >conftest.out 2>&1if egrep yes conftest.out >/dev/null 2>&1; then  CCC="$CC"fifiif test -z "$CCC"; then  echo checking for g++  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/g++; then      CCC="g++"      break    fi  done  IFS="$saveifs"fitest -z "$CCC" && CCC=""if test -z "$CCC"; then  echo checking for CC  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/CC; then      CCC="CC"      break    fi  done  IFS="$saveifs"fitest -z "$CCC" && CCC=""if test -z "$CCC"; then  echo checking for cc++  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/cc++; then      CCC="cc++"      break    fi  done  IFS="$saveifs"fitest -z "$CCC" && CCC=""if test -z "$CCC"; thencat <<EOMThis package requires a C++ compiler, but I couldn't find one.Set the environment variable CCC to the name of your C++ compiler.EOMrm -f conftest* core; exit 1fiecho checking that C++ compiler can compile very simple C++ programcat <<EOF > conftest.ccextern "C" { void exit(int); }int main() { exit(0); }EOFrm -f conftesteval $cc_compileif test -s conftest && (./conftest) 2>/dev/null; then  :else  cat <<EOM$CCC was unable successfully to compile a very simple C++ program(the C++ program was in a file with a suffix of .cc)EOMrm -f conftest* core; exit 1firm -f conftest*echo checking that C++ static constructors and destructors are calledcat <<EOF > conftest.ccextern "C" {  void exit(int);  void _exit(int);}int i;struct A {  char dummy;  A() { i = 1; }  ~A() { if (i == 1) _exit(0); }};A a;main() { exit(1); }EOFrm -f conftesteval $cc_compileif test -s conftest && (./conftest) 2>/dev/null; then  :else  cat <<EOM$CCC is not installed correctly: static constructors and destructors do not workEOMrm -f conftest* core; exit 1firm -f conftest*echo checking for C++ header filescat <<EOF >conftest.cc#include <stdio.h>extern "C" { void exit(int); }int main() { exit(0); } void t() { fopen(0, 0); }EOFif eval $cc_compile; then  :else  cat <<\EOFYour header files do not appear to support C++.I was unable to compile and link a simple C++ program that used a functiondeclared in <stdio.h>.If you're using gcc/g++, you should install libg++.EOFrm -f conftest* core; exit 1firm -f conftest*if test -z "$PSPRINT"then	for p in lprdoif test -z "$LPR"; then  echo checking for $p  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/$p; then      LPR="$p"      break    fi  done  IFS="$saveifs"fitest -z "$LPR" && LPR=""test -n "$LPR" && breakdone	for p in lpdoif test -z "$LP"; then  echo checking for $p  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/$p; then      LP="$p"      break    fi  done  IFS="$saveifs"fitest -z "$LP" && LP=""test -n "$LP" && breakdone	if test -n "$LPR" && test -n "$LP"	then		# HP-UX provides an lpr command that emulates lpr using lp,		# but it doesn't have lpq; in this case we want to use lp		# rather than lpr.		for p in lpqdoif test -z "$LPQ"; then  echo checking for $p  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/$p; then      LPQ="$p"      break    fi  done  IFS="$saveifs"fitest -z "$LPQ" && LPQ=""test -n "$LPQ" && breakdone		test -n "$LPQ" || LPR=	fi	if test -n "$LPR"	then		PSPRINT="$LPR"	elif test -n "$LP"	then		PSPRINT="$LP"	fifi# Figure out DVIPRINT from PSPRINT.if test -n "$PSPRINT" && test -z "$DVIPRINT"then	if test "X$PSPRINT" = "Xlpr"	then		DVIPRINT="lpr -d"	else		DVIPRINT="$PSPRINT"	fifiecho checking for perlPERLPATH=saveifs="$IFS"; IFS="${IFS}:"for dir in $PATH; do  test -z "$dir" && dir=.  if test -f $dir/perl; then     PERLPATH="$dir/perl"     break  fidoneIFS="$saveifs"if test -z "$YACC"; then  echo checking for byacc  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/byacc; then      YACC="byacc"      break    fi  done  IFS="$saveifs"fitest -z "$YACC" && YACC=""if test -z "$YACC"; then  echo checking for bison  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/bison; then      YACC="bison -y"      break    fi  done  IFS="$saveifs"fitest -z "$YACC" && YACC="yacc"if test -z "$RANLIB"; then  echo checking for ranlib  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    if test -f $dir/ranlib; then      RANLIB="ranlib"      break    fi  done  IFS="$saveifs"fitest -z "$RANLIB" && RANLIB="@:"# Make sure to not get the incompatible SysV /etc/install and# /usr/sbin/install, which might be in PATH before a BSD-like install,# or the SunOS /usr/etc/install directory, or the AIX /bin/install,# or the AFS install, which mishandles nonexistent args.  (Sigh.)if test -z "$INSTALL"; then  echo checking for install  saveifs="$IFS"; IFS="${IFS}:"  for dir in $PATH; do    test -z "$dir" && dir=.    case $dir in    /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;    *)      if test -f $dir/install; then	if grep dspmsg $dir/install >/dev/null 2>&1; then	  : # AIX	else	  INSTALL="$dir/install -c"	  INSTALL_PROGRAM='$(INSTALL)'	  INSTALL_DATA='$(INSTALL) -m 644'	  break	fi      fi      ;;    esac  done  IFS="$saveifs"fiINSTALL=${INSTALL-cp}INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}echo checking for ln -srm -f conftestdataif ln -s X conftestdata 2>/dev/nullthen  rm -f conftestdata  LN_S="ln -s"else  LN_S=lnfiecho checking for etags C++ optionfor flag in p Cdo	test -z "$ETAGSCCFLAG" || break	>conftest.c	(etags -$flag -o /dev/null conftest.c >/dev/null 2>&1) 2>/dev/null &&		ETAGSCCFLAG="-$flag"	rm -f conftest.cdoneecho 'checking for csh # hack'cat <<EOF >conftest.sh#!/bin/shtrue || exit 0export PATH || exit 0exit 1EOFchmod +x conftest.shif echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1then	:; SH_SCRIPT_SED_CMD='1s/.*/:/'else	:; SH_SCRIPT_SED_CMD=''firm -f conftest.shecho checking for unistd.hecho checking how to run the C preprocessorif test -z "$CPP"; then  CPP='${CC-cc} -E'  cat > conftest.c <<EOF#include <stdio.h>EOFerr=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`if test -z "$err"; then  :else  CPP=/lib/cppfirm -f conftest*ficat > conftest.c <<EOF#include <unistd.h>EOFerr=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`if test -z "$err"; then  DEFS="$DEFS -DHAVE_UNISTD_H=1"firm -f conftest*

⌨️ 快捷键说明

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