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

📄 configure

📁 C++类模版库实现
💻
📖 第 1 页 / 共 5 页
字号:
# because not all systems understand e.g. LANG=C (notably SCO).# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!# Non-C LC_CTYPE values break the ctype check.if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fiif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fiif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fiif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi# confdefs.h avoids OS command line length limits that DEFS can exceed.rm -rf conftest* confdefs.h# AIX cpp loses on an empty file, so make sure it contains at least a newline.echo > confdefs.h# 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.ac_unique_file=stlconf.h.in# Find the source files, if location was not specified.if test -z "$srcdir"; then  ac_srcdir_defaulted=yes  # Try the directory containing this script, then its parent.  ac_prog=$0  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.  srcdir=$ac_confdir  if test ! -r $srcdir/$ac_unique_file; then    srcdir=..  fielse  ac_srcdir_defaulted=nofiif test ! -r $srcdir/$ac_unique_file; then  if test "$ac_srcdir_defaulted" = yes; then    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }  else    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }  fifisrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`# Prefer explicitly selected file to automatically selected ones.if test -z "$CONFIG_SITE"; then  if test "x$prefix" != xNONE; then    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"  else    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"  fififor ac_site_file in $CONFIG_SITE; do  if test -r "$ac_site_file"; then    echo "loading site script $ac_site_file"    . "$ac_site_file"  fidoneac_ext=c# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.ac_cpp='$CPP $CPPFLAGS'ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crossif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then    ac_n= ac_c='' ac_t='	'  else    ac_n=-n ac_c= ac_t=  fielse  ac_n= ac_c='\c' ac_t=fiecho "$ac_t""*** $0: STLport configuration utility ***" 1>&6if test "${CXXFLAGS}" = ""; then echo "$ac_t""* Note: for best reliability - try \"CXXFLAGS=-treat_warnings_as_errors\" $0 " 1>&6echo "$ac_t""* Please don't forget specifying typical CXXFLAGS you'll be using - " 1>&6 echo "$ac_t""* such as that enabling exceptions handling" 1>&6fiecho "$ac_t""Please stand by while exploring compiler capabilities..." 1>&6echo "$ac_t""Be patient - that may take a while..." 1>&6echo "$ac_t""***" 1>&6# utility functioncheck_warning () {    warn_str=`tail -1 config.log | egrep -i "arning|\(W\)"`    if test "$warn_str" = ""; then      return 0    else     return 1    fi}# Check whether --enable-extension or --disable-extension was given.if test "${enable_extension+set}" = set; then  enableval="$enable_extension"  case "$enableval" in	no) echo "$ac_t""Info :.cpp used as extension for tests" 1>&6 	    ac_ext=cpp       	;;	 *) echo "$ac_t""Argument : .$enableval used as extension" 1>&6 	ac_ext=$enablevalesacelse  echo "$ac_t""Info : .cpp used as extension for tests" 1>&6 	ac_ext=cppfi# Save that, as it is being redefined several times use_ac_ext=$ac_extfor ac_prog in $CCC c++ g++ gcc CC cxx cc++do# Extract the first word of "$ac_prog", so it can be a program name with args.set dummy $ac_prog; ac_word=$2echo $ac_n "checking for $ac_word""... $ac_c" 1>&6echo "configure:601: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test -n "$CXX"; then  ac_cv_prog_CXX="$CXX" # Let the user override the test.else  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"  for ac_dir in $PATH; do    test -z "$ac_dir" && ac_dir=.    if test -f $ac_dir/$ac_word; then      ac_cv_prog_CXX="$ac_prog"      break    fi  done  IFS="$ac_save_ifs"fifiCXX="$ac_cv_prog_CXX"if test -n "$CXX"; then  echo "$ac_t""$CXX" 1>&6else  echo "$ac_t""no" 1>&6fitest -n "$CXX" && breakdonetest -n "$CXX" || CXX="gcc"echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6echo "configure:632: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5ac_ext=C# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.ac_cpp='$CXXCPP $CPPFLAGS'ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cxx_crosscat > conftest.$ac_ext <<EOF#line 642 "configure"#include "confdefs.h"main(){return(0);}EOFif { (eval echo configure:646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then  ac_cv_prog_cxx_works=yes  # If we can't run a trivial program, we are probably using a cross compiler.  if (./conftest; exit) 2>/dev/null; then    ac_cv_prog_cxx_cross=no  else    ac_cv_prog_cxx_cross=yes  fielse  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  ac_cv_prog_cxx_works=nofirm -fr conftest*ac_ext=c# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.ac_cpp='$CPP $CPPFLAGS'ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crossecho "$ac_t""$ac_cv_prog_cxx_works" 1>&6if test $ac_cv_prog_cxx_works = no; then  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }fiecho $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6echo "configure:672: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6cross_compiling=$ac_cv_prog_cxx_crossecho $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6echo "configure:677: checking whether we are using GNU C++" >&5if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.C <<EOF#ifdef __GNUC__  yes;#endifEOFif { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then  ac_cv_prog_gxx=yeselse  ac_cv_prog_gxx=nofifiecho "$ac_t""$ac_cv_prog_gxx" 1>&6if test $ac_cv_prog_gxx = yes; then  GXX=yes  ac_test_CXXFLAGS="${CXXFLAGS+set}"  ac_save_CXXFLAGS="$CXXFLAGS"  CXXFLAGS=  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6echo "configure:701: checking whether ${CXX-g++} accepts -g" >&5if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  echo 'void f(){}' > conftest.ccif test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then  ac_cv_prog_cxx_g=yeselse  ac_cv_prog_cxx_g=nofirm -f conftest*fiecho "$ac_t""$ac_cv_prog_cxx_g" 1>&6  if test "$ac_test_CXXFLAGS" = set; then    CXXFLAGS="$ac_save_CXXFLAGS"  elif test $ac_cv_prog_cxx_g = yes; then    CXXFLAGS="-g -O2"  else    CXXFLAGS="-O2"  fielse  GXX=  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"fiac_ext=$use_ac_extac_ext=C# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.ac_cpp='$CXXCPP $CPPFLAGS'ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cxx_crossac_ext=$use_ac_extecho $ac_n "checking size of int""... $ac_c" 1>&6echo "configure:740: checking size of int" >&5if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test "$cross_compiling" = yes; then  ac_cv_sizeof_int=4else  cat > conftest.$ac_ext <<EOF#line 748 "configure"#include "confdefs.h"#ifdef __cplusplusextern "C" void exit(int);#endif#include <stdio.h>main(){  FILE *f=fopen("conftestval", "w");  if (!f) exit(1);  fprintf(f, "%d\n", sizeof(int));  exit(0);}EOFif { (eval echo configure:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/nullthen  ac_cv_sizeof_int=`cat conftestval`else  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -fr conftest*  ac_cv_sizeof_int=0firm -fr conftest*fifiecho "$ac_t""$ac_cv_sizeof_int" 1>&6cat >> confdefs.h <<EOF#define SIZEOF_INT $ac_cv_sizeof_intEOFac_ext=$use_ac_extif test "$ac_cv_sizeof_int" = "4"; then  cat >> confdefs.h <<EOF#define _STLP_UINT32_T unsigned intEOFelse  echo $ac_n "checking size of long""... $ac_c" 1>&6echo "configure:790: checking size of long" >&5if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test "$cross_compiling" = yes; then  ac_cv_sizeof_long=4else  cat > conftest.$ac_ext <<EOF#line 798 "configure"#include "confdefs.h"#ifdef __cplusplusextern "C" void exit(int);#endif#include <stdio.h>main(){  FILE *f=fopen("conftestval", "w");  if (!f) exit(1);  fprintf(f, "%d\n", sizeof(long));  exit(0);}EOFif { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/nullthen  ac_cv_sizeof_long=`cat conftestval`else  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -fr conftest*  ac_cv_sizeof_long=0firm -fr conftest*fifiecho "$ac_t""$ac_cv_sizeof_long" 1>&6cat >> confdefs.h <<EOF#define SIZEOF_LONG $ac_cv_sizeof_longEOF  ac_ext=$use_ac_ext  if test "$ac_cv_sizeof_long" = "4"; then    cat >> confdefs.h <<EOF#define _STLP_UINT32_T unsigned longEOF  else      echo $ac_n "checking size of short""... $ac_c" 1>&6echo "configure:839: checking size of short" >&5if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test "$cross_compiling" = yes; then  ac_cv_sizeof_short=4else  cat > conftest.$ac_ext <<EOF#line 847 "configure"#include "confdefs.h"#ifdef __cplusplusextern "C" void exit(int);#endif#include <stdio.h>main(){  FILE *f=fopen("conftestval", "w");  if (!f) exit(1);  fprintf(f, "%d\n", sizeof(short));  exit(0);}EOFif { (eval echo configure:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/nullthen  ac_cv_sizeof_short=`cat conftestval`else  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -fr conftest*  ac_cv_sizeof_short=0firm -fr conftest*fifiecho "$ac_t""$ac_cv_sizeof_short" 1>&6cat >> confdefs.h <<EOF#define SIZEOF_SHORT $ac_cv_sizeof_shortEOF    if test "$ac_cv_sizeof_short" = "4"; then      cat >> confdefs.h <<EOF#define _STLP_UINT32_T unsigned shortEOF    else      { echo "configure: error: Cannot find any 32-bit integer type for your compiler" 1>&2; exit 1; }    fi  ac_ext=$use_ac_ext  fifiac_ext=$use_ac_extif test "$ac_cv_c_cross" = "yes"; then  CXXFLAGS="${CXXFLAGS} -c"fiac_ext=$use_ac_extecho $ac_n "checking for basic STL compatibility""... $ac_c" 1>&6echo "configure:901: checking for basic STL compatibility" >&5cat > conftest.$ac_ext <<EOF#line 903 "configure"#include "confdefs.h"template <class Arg1, class Arg2, class Result>struct binary_function {    typedef Arg1 first_argument_type;    typedef Arg2 second_argument_type;    typedef Result result_type;};      template <class T>struct plus : public binary_function<T, T, T> {    T operator()(const T& x, const T& y) const;};template <class T>T plus<T>::operator()(const T& x, const T& y) const { return x + y; }plus<int> p;int main() {; return 0; }EOFif { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then  rm -rf conftest*  ac_cv_compat="yes"else  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -rf conftest*  { echo "configure: error: Your compiler won't be able to compile this implementation. Sorry." 1>&2; exit 1; }  ac_cv_compat="no"firm -f conftest*echo "$ac_t""$ac_cv_compat" 1>&6echo $ac_n "checking for partial specialization syntax""... $ac_c" 1>&6echo "configure:940: checking for partial specialization syntax" >&5cat > conftest.$ac_ext <<EOF#line 942 "configure"#include "confdefs.h"     template <class T> class fs_foo {};

⌨️ 快捷键说明

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