📄 ltconfig
字号:
# e.g. LANG=C (notably SCO).if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fiif test "X${LANG+set}" = Xset; then LANG=C; export LANG; fiif test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" . $cache_filefiif (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=fiif test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=.fitrap "$rm conftest*; exit 1" 1 2 15if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/config.guess; then ac_aux_dir=$ac_dir break fi done if test -z "$ac_aux_dir"; then echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 echo "$help" 1>&2 exit 1 fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 exit 1 fi echo $ac_n "checking host system type""... $ac_c" 1>&6 host_alias=$host case "$host_alias" in "") if host_alias=`$SHELL $ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac host=`$SHELL $ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. test -z "$host" && exit 1 # Check for the build system type echo $ac_n "checking build system type... $ac_c" 1>&6 build_alias=$build case "$build_alias" in NONE) case $nonopt in NONE) build_alias=$host_alias ;; *) build_alias=$nonopt ;; esac ;; esac build=`$SHELL $ac_config_sub $build_alias` 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>&6elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 echo "$help" 1>&2 exit 1else host_alias=$host build_alias=$host_alias build=$hostfiif test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}-else ac_tool_prefix=fihost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`# Transform linux* to *-*-linux-gnu*, to support old configure scripts.case "$host_os" inlinux-gnu*) ;;linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`esaccase "$host_os" inaix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;;esac# Determine commands to create old-style static archives.old_archive_cmds='$AR cru $oldlib$oldobjs$old_deplibs'old_postinstall_cmds='chmod 644 $oldlib'old_postuninstall_cmds=# Set sane defaults for various variablestest -z "$AR" && AR=artest -z "$AS" && AS=astest -z "$CC" && CC=cctest -z "$DLLTOOL" && DLLTOOL=dlltooltest -z "$MAGIC" && MAGIC=filetest -z "$LD" && LD=ldtest -z "$LN_S" && LN_S="ln -s"test -z "$NM" && NM=nmtest -z "$OBJDUMP" && OBJDUMP=objdumptest -z "$RANLIB" && RANLIB=:test -z "$STRIP" && STRIP=:test -z "$objext" && objext=oecho $ac_n "checking for objdir... $ac_c" 1>&6rm -f .libs 2>/dev/nullmkdir .libs 2>/dev/nullif test -d .libs; then objdir=.libselse # MS-DOS does not allow filenames that begin with a dot. objdir=_libsfirmdir .libs 2>/dev/nullecho "$ac_t$objdir" 1>&6# Allow CC to be a program name with arguments.set dummy $CCcompiler="$2"# We assume here that the value for ac_cv_prog_cc_pic will not be cached# in isolation, and that seeing it set (from the cache) indicates that# the associated values are set (in the cache) correctly too.echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6echo "$progname:563:checking for $compiler option to produce PIC" 1>&5if test "X${ac_cv_prog_cc_pic+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else ac_cv_prog_cc_pic= ac_cv_prog_cc_shlib= ac_cv_prog_cc_wl= ac_cv_prog_cc_static= ac_cv_prog_cc_no_builtin= ac_cv_prog_cc_can_build_shared=$can_build_shared if test "$with_gcc" = yes; then ac_cv_prog_cc_wl='-Wl,' ac_cv_prog_cc_static='-static' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" ;; cygwin* | mingw* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ac_cv_prog_cc_pic='-DDLL_EXPORT' ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; sysv4*MP*) if test -d /usr/nec; then ac_cv_prog_cc_pic=-Kconform_pic fi ;; *) ac_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # All AIX code is PIC. ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10* | hpux11*) # Is there a better ac_cv_prog_cc_static that works with the bundled CC? ac_cv_prog_cc_wl='-Wl,' ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" ac_cv_prog_cc_pic='+Z' ;; irix5* | irix6*) ac_cv_prog_cc_wl='-Wl,' ac_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ac_cv_prog_cc_pic='-DDLL_EXPORT' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. ac_cv_prog_cc_wl='-Wl,' ac_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) ac_cv_prog_cc_pic='-Kpic' ac_cv_prog_cc_static='-dn' ac_cv_prog_cc_shlib='-belf' ;; solaris*) ac_cv_prog_cc_pic='-KPIC' ac_cv_prog_cc_static='-Bstatic' ac_cv_prog_cc_wl='-Wl,' ;; sunos4*) ac_cv_prog_cc_pic='-PIC' ac_cv_prog_cc_static='-Bstatic' ac_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ac_cv_prog_cc_pic='-KPIC' ac_cv_prog_cc_static='-Bstatic' ac_cv_prog_cc_wl='-Wl,' ;; uts4*) ac_cv_prog_cc_pic='-pic' ac_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then ac_cv_prog_cc_pic='-Kconform_pic' ac_cv_prog_cc_static='-Bstatic' fi ;; *) ac_cv_prog_cc_can_build_shared=no ;; esac fifiif test -z "$ac_cv_prog_cc_pic"; then echo "$ac_t"none 1>&6else echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 echo "$progname:693:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 if test "X${ac_cv_prog_cc_pic_works+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_prog_cc_pic_works=yes $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" if { (eval echo $progname:702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 case "$host_os" in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then ac_cv_prog_cc_pic_works=no ac_cv_prog_cc_can_build_shared=no ac_cv_prog_cc_pic= else ac_cv_prog_cc_pic_works=yes ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" fi ;; *) ac_cv_prog_cc_pic_works=yes ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" ;; esac else # Append any errors to the config.log. cat conftest.err 1>&5 ac_cv_prog_cc_pic_works=no ac_cv_prog_cc_can_build_shared=no ac_cv_prog_cc_pic= fi CFLAGS="$save_CFLAGS" $rm conftest* fi # Belt *and* braces to stop my trousers falling down: if test "X$ac_cv_prog_cc_pic_works" = Xno; then ac_cv_prog_cc_pic= ac_cv_prog_cc_can_build_shared=no fi echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6fi# Check for any special shared library compilation flags.if test -n "$ac_cv_prog_cc_shlib"; then echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then : else echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 ac_cv_prog_cc_can_build_shared=no fifiecho $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6echo "$progname:754: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5if test "X${ac_cv_prog_cc_static_works+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" if { (eval echo $progname:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_static_works=yes else ac_cv_prog_cc_static_works=no ac_cv_prog_cc_static= fi LDFLAGS="$save_LDFLAGS" $rm conftest*fi# Belt *and* braces to stop my trousers falling down:if test "X$ac_cv_prog_cc_static_works" = Xno; then ac_cv_prog_cc_static=fiecho "$ac_t""$ac_cv_prog_cc_static_works" 1>&6pic_flag="$ac_cv_prog_cc_pic"special_shlib_compile_flags="$ac_cv_prog_cc_shlib"wl="$ac_cv_prog_cc_wl"link_static_flag="$ac_cv_prog_cc_static"no_builtin_flag="$ac_cv_prog_cc_no_builtin"can_build_shared="$ac_cv_prog_cc_can_build_shared"# Check to see if options -o and -c are simultaneously supported by compilerecho $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6$rm -r conftest 2>/dev/nullmkdir conftestcd conftest$rm conftest*echo "int some_variable = 0;" > conftest.cmkdir out# According to Tom Tromey, Ian Lance Taylor reported there are C compilers# that will create temporary files in the current directory regardless of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -