📄 configure
字号:
rm -f conftest*firm -f conftest*for hdr in string.hdotrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`echo checking for ${hdr}cat > conftest.c <<EOF#include "confdefs.h"#include <${hdr}>EOFerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`if test -z "$err"; then rm -rf conftest* {test -n "$verbose" && \echo " defining ${trhdr}"echo "#define" ${trhdr} 1 >> confdefs.hDEFS="$DEFS -D${trhdr}=1"}firm -f conftest*donecase "$YACC" in*bison*) # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works# for constant arguments. Useless!echo checking for working alloca.hcat > conftest.c <<EOF#include "confdefs.h"#include <alloca.h>int main() { exit(0); }int t() { char *p = alloca(2 * sizeof(int)); }EOFif eval $compile; then rm -rf conftest* {test -n "$verbose" && \echo " defining HAVE_ALLOCA_H"echo "#define" HAVE_ALLOCA_H 1 >> confdefs.hDEFS="$DEFS -DHAVE_ALLOCA_H=1"}firm -f conftest*decl="#ifdef __GNUC__#define alloca __builtin_alloca#else#if HAVE_ALLOCA_H#include <alloca.h>#else#ifdef _AIX #pragma alloca#elsechar *alloca ();#endif#endif#endif"echo checking for allocacat > conftest.c <<EOF#include "confdefs.h"$declint main() { exit(0); }int t() { char *p = (char *) alloca(1); }EOFif eval $compile; then :else rm -rf conftest* alloca_missing=1cat > conftest.c <<EOF#include "confdefs.h"#if defined(CRAY) && ! defined(CRAY2)winnitude#elselossage#endifEOFeval "$CPP conftest.c > conftest.out 2>&1"if egrep "winnitude" conftest.out >/dev/null 2>&1; then rm -rf conftest* echo checking for _getb67cat > conftest.c <<EOF#include "confdefs.h"#include <ctype.h>int main() { exit(0); }int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub__getb67) || defined (__stub____getb67)choke me#else/* Override any gcc2 internal prototype to avoid an error. */extern char _getb67(); _getb67();#endif }EOFif eval $compile; then rm -rf conftest* {test -n "$verbose" && \echo " defining" CRAY_STACKSEG_END to be _getb67echo "#define" CRAY_STACKSEG_END _getb67 >> confdefs.hDEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"}else rm -rf conftest* echo checking for GETB67cat > conftest.c <<EOF#include "confdefs.h"#include <ctype.h>int main() { exit(0); }int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_GETB67) || defined (__stub___GETB67)choke me#else/* Override any gcc2 internal prototype to avoid an error. */extern char GETB67(); GETB67();#endif }EOFif eval $compile; then rm -rf conftest* {test -n "$verbose" && \echo " defining" CRAY_STACKSEG_END to be GETB67echo "#define" CRAY_STACKSEG_END GETB67 >> confdefs.hDEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"}else rm -rf conftest* echo checking for getb67cat > conftest.c <<EOF#include "confdefs.h"#include <ctype.h>int main() { exit(0); }int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_getb67) || defined (__stub___getb67)choke me#else/* Override any gcc2 internal prototype to avoid an error. */extern char getb67(); getb67();#endif }EOFif eval $compile; then rm -rf conftest* {test -n "$verbose" && \echo " defining" CRAY_STACKSEG_END to be getb67echo "#define" CRAY_STACKSEG_END getb67 >> confdefs.hDEFS="$DEFS -DCRAY_STACKSEG_END=getb67"}firm -f conftest*firm -f conftest*firm -f conftest*firm -f conftest*firm -f conftest*if test -n "$alloca_missing"; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.o {test -n "$verbose" && \echo " defining C_ALLOCA"echo "#define" C_ALLOCA 1 >> confdefs.hDEFS="$DEFS -DC_ALLOCA=1"} echo 'checking stack direction for C alloca' echo checking whether cross-compiling# If we cannot run a trivial program, we must be cross compiling.cat > conftest.c <<EOF#include "confdefs.h"main(){exit(0);}EOFeval $compileif test -s conftest && (./conftest; exit) 2>/dev/null; then :else cross_compiling=1firm -fr conftest*if test -n "$cross_compiling"then {test -n "$verbose" && \echo " defining" STACK_DIRECTION to be 0echo "#define" STACK_DIRECTION 0 >> confdefs.hDEFS="$DEFS -DSTACK_DIRECTION=0"}elsecat > conftest.c <<EOF#include "confdefs.h"find_stack_direction (){ static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1;}main (){ exit (find_stack_direction() < 0);}EOFeval $compileif test -s conftest && (./conftest; exit) 2>/dev/null; then {test -n "$verbose" && \echo " defining" STACK_DIRECTION to be 1echo "#define" STACK_DIRECTION 1 >> confdefs.hDEFS="$DEFS -DSTACK_DIRECTION=1"}else {test -n "$verbose" && \echo " defining" STACK_DIRECTION to be -1echo "#define" STACK_DIRECTION -1 >> confdefs.hDEFS="$DEFS -DSTACK_DIRECTION=-1"}fifirm -fr conftest*fi ;;esac# Set default prefixes.if test -n "$prefix"; then test -z "$exec_prefix" && exec_prefix='${prefix}' prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"fiif test -n "$exec_prefix"; then prsub="$prsubs%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"fi# Quote sed substitution magic chars in DEFS.cat >conftest.def <<EOF$DEFSEOFescape_ampersand_and_backslash='s%[&\\]%\\&%g'DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`rm -f conftest.def# Substitute for predefined variables.trap 'rm -f config.status; exit 1' 1 3 15echo creating config.statusrm -f config.statuscat > config.status <<EOF#!/bin/sh# Generated automatically by configure.# Run this file to recreate the current configuration.# This directory was configured as follows,# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:## $0 $configure_argsfor argdo case "\$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esacdonetrap 'rm -f Makefile; exit 1' 1 3 15LN_S='$LN_S'YACC='$YACC'CC='$CC'RANLIB='$RANLIB'INSTALL='$INSTALL'INSTALL_PROGRAM='$INSTALL_PROGRAM'INSTALL_DATA='$INSTALL_DATA'CPP='$CPP'ALLOCA='$ALLOCA'LIBS='$LIBS'srcdir='$srcdir'DEFS='$DEFS'prefix='$prefix'exec_prefix='$exec_prefix'prsub='$prsub'extrasub='$extrasub'EOFcat >> config.status <<\EOFtop_srcdir=$srcdirCONFIG_FILES=${CONFIG_FILES-"Makefile"}for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` if test "$dir" != "$file"; then test "$top_srcdir" != . && srcdir=$top_srcdir/$dir test ! -d "$dir" && mkdir "$dir" fi echo creating "$file" rm -f "$file" comment_str="Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." case "$file" in *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$file" ;; * ) echo "# $comment_str" > "$file" ;; esac sed -e "$prsub$extrasubs%@LN_S@%$LN_S%gs%@YACC@%$YACC%gs%@CC@%$CC%gs%@RANLIB@%$RANLIB%gs%@INSTALL@%$INSTALL%gs%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%gs%@INSTALL_DATA@%$INSTALL_DATA%gs%@CPP@%$CPP%gs%@ALLOCA@%$ALLOCA%gs%@LIBS@%$LIBS%gs%@srcdir@%$srcdir%gs%@DEFS@%$DEFS%" $top_srcdir/${file}.in >> $filefi; doneexit 0EOFchmod +x config.status${CONFIG_SHELL-/bin/sh} config.status
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -