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

📄 ltmain.sh

📁 PPP协议的实现演示
💻 SH
📖 第 1 页 / 共 5 页
字号:
	  done	  tmp_libs=	  for deplib in $new_libs; do	    case "$deplib" in	    -L*)	      case " $tmp_libs " in	      *" $deplib "*) ;;	      *) tmp_libs="$tmp_libs $deplib" ;;	      esac	      ;;	    *) tmp_libs="$tmp_libs $deplib" ;;	    esac	  done	  eval $var=\"$tmp_libs\"	done      fi    done    if test $linkmode = prog; then      dlfiles="$newdlfiles"      dlprefiles="$newdlprefiles"    fi    case $linkmode in    oldlib)      if test -n "$deplibs"; then	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2      fi      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2      fi      if test -n "$rpath"; then	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2      fi      if test -n "$xrpath"; then	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2      fi      if test -n "$vinfo"; then	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2      fi      if test -n "$release"; then	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2      fi      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2      fi      # Now set the variables for building old libraries.      build_libtool_libs=no      oldlibs="$output"      objs="$objs$old_deplibs"      ;;    lib)      # Make sure we only generate libraries of the form `libNAME.la'.      case "$outputname" in      lib*)	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`	eval libname=\"$libname_spec\"	;;      *)	if test "$module" = no; then	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2	  $echo "$help" 1>&2	  exit 1	fi	if test "$need_lib_prefix" != no; then	  # Add the "lib" prefix for modules if required	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`	  eval libname=\"$libname_spec\"	else	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`	fi	;;      esac      if test -n "$objs"; then	if test "$deplibs_check_method" != pass_all; then	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1	  exit 1	else	  echo	  echo "*** Warning: Linking the shared library $output against the non-libtool"	  echo "*** objects $objs is not portable!"	  libobjs="$libobjs $objs"	fi      fi      if test "$dlself" != no; then	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2      fi      set dummy $rpath      if test $# -gt 2; then	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2      fi      install_libdir="$2"      oldlibs=      if test -z "$rpath"; then	if test "$build_libtool_libs" = yes; then	  # Building a libtool convenience library.	  libext=al	  oldlibs="$output_objdir/$libname.$libext $oldlibs"	  build_libtool_libs=convenience	  build_old_libs=yes	fi	if test -n "$vinfo"; then	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2	fi	if test -n "$release"; then	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2	fi      else	# Parse the version information argument.	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'	set dummy $vinfo 0 0 0	IFS="$save_ifs"	if test -n "$8"; then	  $echo "$modename: too many parameters to \`-version-info'" 1>&2	  $echo "$help" 1>&2	  exit 1	fi	current="$2"	revision="$3"	age="$4"	# Check that each of the things are valid numbers.	case "$current" in	0 | [1-9] | [1-9][0-9]*) ;;	*)	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2	  exit 1	  ;;	esac	case "$revision" in	0 | [1-9] | [1-9][0-9]*) ;;	*)	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2	  exit 1	  ;;	esac	case "$age" in	0 | [1-9] | [1-9][0-9]*) ;;	*)	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2	  exit 1	  ;;	esac	if test $age -gt $current; then	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2	  exit 1	fi	# Calculate the version variables.	major=	versuffix=	verstring=	case "$version_type" in	none) ;;	irix)	  major=`expr $current - $age + 1`	  versuffix="$major.$revision"	  verstring="sgi$major.$revision"	  # Add in all the interfaces that we are compatible with.	  loop=$revision	  while test $loop != 0; do	    iface=`expr $revision - $loop`	    loop=`expr $loop - 1`	    verstring="sgi$major.$iface:$verstring"	  done	  ;;	linux)	  major=.`expr $current - $age`	  versuffix="$major.$age.$revision"	  ;;	osf)	  major=`expr $current - $age`	  versuffix=".$current.$age.$revision"	  verstring="$current.$age.$revision"	  # Add in all the interfaces that we are compatible with.	  loop=$age	  while test $loop != 0; do	    iface=`expr $current - $loop`	    loop=`expr $loop - 1`	    verstring="$verstring:${iface}.0"	  done	  # Make executables depend on our current version.	  verstring="$verstring:${current}.0"	  ;;	sunos)	  major=".$current"	  versuffix=".$current.$revision"	  ;;	freebsd-aout)	  major=".$current"	  versuffix=".$current.$revision";	  ;;	freebsd-elf)	  major=".$current"	  versuffix=".$current";	  ;;	windows)	  # Like Linux, but with '-' rather than '.', since we only	  # want one extension on Windows 95.	  major=`expr $current - $age`	  versuffix="-$major-$age-$revision"	  ;;	*)	  $echo "$modename: unknown library version type \`$version_type'" 1>&2	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2	  exit 1	  ;;	esac	# Clear the version info if we defaulted, and they specified a release.	if test -z "$vinfo" && test -n "$release"; then	  major=	  verstring="0.0"	  if test "$need_version" = no; then	    versuffix=	  else	    versuffix=".0.0"	  fi	fi	# Remove version info from name if versioning should be avoided	if test "$avoid_version" = yes && test "$need_version" = no; then	  major=	  versuffix=	  verstring=""	fi	# Check to see if the archive will have undefined symbols.	if test "$allow_undefined" = yes; then	  if test "$allow_undefined_flag" = unsupported; then	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2	    build_libtool_libs=no	    build_old_libs=yes	  fi	else	  # Don't allow undefined symbols.	  allow_undefined_flag="$no_undefined_flag"	fi      fi      if test "$mode" != relink; then	# Remove our outputs.	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*      fi      # Now set the variables for building old libraries.      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then	oldlibs="$oldlibs $output_objdir/$libname.$libext"	# Transform .lo files to .o files.	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`      fi      # Eliminate all temporary directories.      for path in $uninst_path; do	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`      done      if test -n "$xrpath"; then	# If the user specified any rpath flags, then add them.	temp_xrpath=	for libdir in $xrpath; do	  temp_xrpath="$temp_xrpath -R$libdir"	  case "$finalize_rpath " in	  *" $libdir "*) ;;	  *) finalize_rpath="$finalize_rpath $libdir" ;;	  esac	done	if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then	  dependency_libs="$temp_xrpath $dependency_libs"	fi      fi      # Make sure dlfiles contains only unique files that won't be dlpreopened      old_dlfiles="$dlfiles"      dlfiles=      for lib in $old_dlfiles; do	case " $dlprefiles $dlfiles " in	*" $lib "*) ;;	*) dlfiles="$dlfiles $lib" ;;	esac      done      # Make sure dlprefiles contains only unique files      old_dlprefiles="$dlprefiles"      dlprefiles=      for lib in $old_dlprefiles; do	case "$dlprefiles " in	*" $lib "*) ;;	*) dlprefiles="$dlprefiles $lib" ;;	esac      done      if test "$build_libtool_libs" = yes; then	if test -n "$rpath"; then	  case "$host" in	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)	    # these systems don't actually have a c library (as such)!	    ;;	  *)	    # Add libc to deplibs on all other systems.	    deplibs="$deplibs -lc"	    ;;	  esac	fi	# Transform deplibs into only deplibs that can be linked in shared.	name_save=$name	libname_save=$libname	release_save=$release	versuffix_save=$versuffix	major_save=$major	# I'm not sure if I'm treating the release correctly.  I think	# release should show up in the -l (ie -lgmp5) so we don't want to	# add it in twice.  Is that correct?	release=""	versuffix=""	major=""	newdeplibs=	droppeddeps=no	case "$deplibs_check_method" in	pass_all)	  # Don't check for shared/static.  Everything works.	  # This might be a little naive.  We might want to check	  # whether the library exists or not.  But this is on	  # osf3 & osf4 and I'm not really sure... Just	  # implementing what was already the behaviour.	  newdeplibs=$deplibs	  ;;	test_compile)	  # This code stresses the "libraries are programs" paradigm to its	  # limits. Maybe even breaks it.  We compile a program, linking it	  # against the deplibs as a proxy for the library.  Then we can check	  # whether they linked in statically or dynamically with ldd.	  $rm conftest.c	  cat > conftest.c <<EOF	  int main() { return 0; }EOF	  $rm conftest	  $CC -o conftest conftest.c $deplibs	  if test $? -eq 0 ; then	    ldd_output=`ldd conftest`	    for i in $deplibs; do	      name="`expr $i : '-l\(.*\)'`"	      # If $name is empty we are operating on a -L argument.	      if test "$name" != "" ; then		libname=`eval \\$echo \"$libname_spec\"`		deplib_matches=`eval \\$echo \"$library_names_spec\"`		set dummy $deplib_matches		deplib_match=$2		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then		  newdeplibs="$newdeplibs $i"		else		  droppeddeps=yes		  echo		  echo "*** Warning: This library needs some functionality provided by $i."		  echo "*** I have the capability to make that library automatically link in when"		  echo "*** you link to this library.  But I can only do this if you have a"		  echo "*** shared version of the library, which you do not appear to have."		fi	      else		newdeplibs="$newdeplibs $i"	      fi	    done	  else	    # Error occured in the first compile.  Let's try to salvage the situation:	    # Compile a seperate program for each library.	    for i in $deplibs; do	      name="`expr $i : '-l\(.*\)'`"	     # If $name is empty we are operating on a -L argument.	      if test "$name" != "" ; then		$rm conftest		$CC -o conftest conftest.c $i		# Did it work?		if test $? -eq 0 ; then		  ldd_output=`ldd conftest`		  libname=`eval \\$echo \"$libname_spec\"`		  deplib_matches=`eval \\$echo \"$library_names_spec\"`		  set dummy $deplib_matches		  deplib_match=$2		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then		    newdeplibs="$newdeplibs $i"		  else		    droppeddeps=yes		    echo		    echo "*** Warning: This library needs some functionality provided by $i."		    echo "*** I have the capability to make that library automatically link in when"		    echo "*** you link to this library.  But I can only do this if you have a"		    echo "*** shared version of the library, which you do not appear to have."		  fi		else		  droppeddeps=yes		  echo		  echo "*** Warning!  Library $i is needed by this library but I was not able to"		  echo "***  make it link in!  You will probably need to install it or some"		  echo "*** library that it depends on before this library will be fully"		  echo "*** functional.  Installing it before continuing would be even better."		fi	      else		newdeplibs="$newdeplibs $i"	      fi	    done	  fi	  ;;	file_magic*)	  set dummy $deplibs_check_method	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`	  for a_deplib in $deplibs; do	    name="`expr $a_deplib : '-l\(.*\)'`"	    # If $name is empty we are operating on a -L argument.	    if test "$name" != "" ; then	      libname=`eval \\$echo \"$libname_spec\"`	      for i in $lib_search_path; do		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`		    for potent_lib in $potential_libs; do		      # Follow soft links.		      if ls -lLd "$potent_lib" 2>/dev/null \			 | grep " -> " >/dev/null; then			continue		      fi		      # The statement above tries to avoid entering an		      # endless loop below, in case of cyclic links.		      # We might still enter an endless loop, since a link		      # loop can be closed while we follow links,		      # but so what?		      potlib="$potent_lib"		      while test -h "$potlib" 2>/dev/null; do			potliblink=`ls -ld $potlib | sed 's/.* -> //'`			case "$potliblink" in			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;			esac		      done		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \			 | sed 10q \			 | egrep "$file_magic_regex" > /dev/null; then			newdeplibs="$newdeplibs $a_deplib"			a_deplib=""			break 2		      fi		    done	      done	      if test -n "$a_deplib" ; then		droppeddeps=yes		echo		echo "*** Warning: This library needs some functionality provided by $a_deplib."		echo "*** I have the capability to make that library automatically link in when"		echo "*** you link to this library.  But I can only do this if you have a"		echo "*** shared version of the library, which you do not appear to have."	      fi	    else	      # Add a -L argument.	      newdeplibs="$newdeplibs $a_deplib"	    fi	  done # Gone through all deplibs.	  ;;	none | unknown | *)	  newdeplibs=""	  if $echo "X $deplibs" | $Xsed -e

⌨️ 快捷键说明

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