📄 configure
字号:
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`echo "$ac_t""$build" 1>&6# Extract the first word of "ranlib", so it can be a program name with args.set dummy ranlib; ac_word=$2echo $ac_n "checking for $ac_word""... $ac_c" 1>&6echo "configure:1276: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"fifiRANLIB="$ac_cv_prog_RANLIB"if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6else echo "$ac_t""no" 1>&6fi# Check whether --with-gnu-ld or --without-gnu-ld was given.if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yeselse with_gnu_ld=nofiac_prog=ldif test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6echo "configure:1315: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. /* | [A-Za-z]:/*) # Canonicalize the path of ld re_direlt='/[^/][^/]*/\.\./' sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%' while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done case "$host_os" in cygwin*) # Convert to a UNC path for cygwin test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"` ;; *) test -z "$LD" && LD="$ac_prog" ;; esac ;; ## ## FIXME: The code fails later on if we try to use an $LD with ## '\\' path separators. ## [A-Za-z]:[\\]*) # Canonicalize the path of ld re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)' sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%' sub_uncdir='s%\\%/%g' while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"` done case "$host_os" in cygwin*) # Convert to a UNC path for cygwin test -z "$LD" && LD=`echo X$ac_prog | sed -e 's%^X%%' -e "$sub_uncdrive" -e "$sub_uncdir"` ;; *) test -z "$LD" && LD="$ac_prog" ;; esac ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esacelif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6echo "configure:1369: checking for GNU ld" >&5else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6echo "configure:1372: checking for non-GNU ld" >&5fiif eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -z "$LD"; then 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_prog"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs"else ac_cv_path_LD="$LD" # Let the user override the test with a path.fifiLD="$ac_cv_path_LD"if test -n "$LD"; then echo "$ac_t""$LD" 1>&6else echo "$ac_t""no" 1>&6fitest -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6echo "configure:1408: checking if the linker ($LD) is GNU ld" >&5if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else # I'd rather use --version here, but apparently some GNU ld's only accept -v.if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then ac_cv_prog_gnu_ld=yeselse ac_cv_prog_gnu_ld=nofifiecho "$ac_t""$ac_cv_prog_gnu_ld" 1>&6echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6echo "configure:1424: checking for BSD-compatible nm" >&5if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM"else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" else ac_cv_path_NM="$ac_dir/nm" fi break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nmfifiNM="$ac_cv_path_NM"echo "$ac_t""$NM" 1>&6# Check for command to grab the raw symbol name followed by C symbol from nm.echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6echo "configure:1460: checking command to parse $NM output" >&5if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else # These are sane defaults that work on at least a few old systems.# {They come from Ultrix. What could be older than Ultrix?!! ;)}# Character class describing NM global symbol codes.ac_symcode='[BCDEGRSTU]'# Regexp to match symbols that can be accessed directly from C.ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'# Transform the above into a raw symbol and a C symbol.ac_symxfrm='\1 \1'# Define system-specific variables.case "$host_os" inaix*) ac_symcode='[BCDTU]' ;;sunos* | cygwin32* | mingw32*) ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)' ac_symxfrm='_\1 \1' ;;irix*) # Cannot use undefined symbols on IRIX because inlined functions mess us up. ac_symcode='[BCDEGRST]' ;;solaris*) ac_symcode='[BDTU]' ;;esac# If we're using GNU nm, then use its standard symbol codes.if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ac_symcode='[ABCDGISTUW]'ficase "$host_os" incygwin32* | mingw32*) # We do not want undefined symbols on cygwin32. The user must # arrange to define them via -l arguments. ac_symcode='[ABCDGISTW]' ;;esac# Write the raw and C identifiers.ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"# Check to see that the pipe works correctly.ac_pipe_works=nocat > conftest.$ac_ext <<EOF#ifdef __cplusplusextern "C" {#endifchar nm_test_var;void nm_test_func(){}#ifdef __cplusplus}#endifint main(){nm_test_var='a';nm_test_func;return 0;}EOFif { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { (eval echo configure:1526: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then mv -f "$ac_nlist"T "$ac_nlist" ac_wcout=`wc "$ac_nlist" 2>/dev/null` ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` (test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1 else rm -f "$ac_nlist"T ac_count=-1 fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then cat <<EOF > conftest.c#ifdef __cplusplusextern "C" {#endifEOF # Now generate the symbol file. sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c cat <<EOF >> conftest.c#if defined (__STDC__) && __STDC__# define __ptr_t void *#else# define __ptr_t char *#endif/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */int dld_preloaded_symbol_count = $ac_count;/* The mapping between symbol names and symbols. */struct { char *name; __ptr_t address;}dld_preloaded_symbols[] ={EOF sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c cat <<\EOF >> conftest.c {0, (__ptr_t) 0}};#ifdef __cplusplus}#endifEOF # Now try linking the two files. mv conftest.$ac_objext conftestm.$ac_objext ac_save_LIBS="$LIBS" ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 cat conftest.c >&5 fi LIBS="$ac_save_LIBS" CFLAGS="$ac_save_CFLAGS" else echo "cannot find nm_test_func in $ac_nlist" >&5 fi else echo "cannot find nm_test_var in $ac_nlist" >&5 fi else echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5 fielse echo "$progname: failed program was:" >&5 cat conftest.c >&5firm -rf conftest*# Do not use the global_symbol_pipe unless it works.test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=fiac_result=yesif test -z "$ac_cv_sys_global_symbol_pipe"; then ac_result=nofiecho "$ac_t""$ac_result" 1>&6echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6echo "configure:1620: checking for _ prefix in compiled symbols" >&5if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_cv_sys_symbol_underscore=nocat > conftest.$ac_ext <<EOFvoid nm_test_func(){}int main(){nm_test_func;return 0;}EOFif { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { (eval echo configure:1632: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes else if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5 fielse echo "configure: failed program was:" >&5 cat conftest.c >&5firm -rf conftest*fiecho "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6if test x$ac_cv_sys_symbol_underscore = xyes; then cat >> confdefs.h <<\EOF#define WITH_SYMBOL_UNDERSCORE 1EOFfiecho $ac_n "checking whether ln -s works""... $ac_c" 1>&6echo "configure:1663: checking whether ln -s works" >&5if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else rm -f conftestdataif ln -s X conftestdata 2>/dev/nullthen rm -f conftestdata ac_cv_prog_LN_S="ln -s"else ac_cv_prog_LN_S=lnfifiLN_S="$ac_cv_prog_LN_S"if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6else echo "$ac_t""no" 1>&6fiif test $host != $build; then ac_tool_prefix=${host_alias}-else ac_tool_prefix=fi# Always use our own libtool.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -