build-scripts/ltmain.sh
changeset 1611 ec3466b08f17
parent 1570 a740bca2a1b1
child 1659 14717b52abc0
equal deleted inserted replaced
1610:a1ee5944412b 1611:ec3466b08f17
  1411 	  prev=
  1411 	  prev=
  1412 	  compile_command="$compile_command $qarg"
  1412 	  compile_command="$compile_command $qarg"
  1413 	  finalize_command="$finalize_command $qarg"
  1413 	  finalize_command="$finalize_command $qarg"
  1414 	  continue
  1414 	  continue
  1415 	  ;;
  1415 	  ;;
  1416 	framework)
       
  1417 	  case $host in
       
  1418 	    *-*-darwin*)
       
  1419 	      case "$deplibs " in
       
  1420 	        *" $qarg.framework "*) ;;
       
  1421 		*) deplibs="$deplibs $qarg.framework" # this is fixed later
       
  1422 		   ;;
       
  1423               esac
       
  1424               ;;
       
  1425    	  esac
       
  1426  	  prev=
       
  1427  	  continue
       
  1428  	  ;;
       
  1429 	shrext)
  1416 	shrext)
  1430   	  shrext_cmds="$arg"
  1417   	  shrext_cmds="$arg"
  1431 	  prev=
  1418 	  prev=
  1432 	  continue
  1419 	  continue
  1433 	  ;;
  1420 	  ;;
  1797 	continue
  1784 	continue
  1798 	;;
  1785 	;;
  1799 
  1786 
  1800       -XCClinker)
  1787       -XCClinker)
  1801 	prev=xcclinker
  1788 	prev=xcclinker
  1802 	continue
       
  1803 	;;
       
  1804 
       
  1805       -framework)
       
  1806         prev=framework
       
  1807 	continue
  1789 	continue
  1808 	;;
  1790 	;;
  1809 
  1791 
  1810       # Some other compiler flag.
  1792       # Some other compiler flag.
  1811       -* | +*)
  1793       -* | +*)
  2188 	      *) ;;
  2170 	      *) ;;
  2189 	      esac
  2171 	      esac
  2190 	    fi
  2172 	    fi
  2191 	  fi
  2173 	  fi
  2192 	  ;; # -l
  2174 	  ;; # -l
  2193 	*.framework)
       
  2194 	  if test "$linkmode,$pass" = "prog,link"; then
       
  2195 	    compile_deplibs="$deplib $compile_deplibs"
       
  2196 	    finalize_deplibs="$deplib $finalize_deplibs"
       
  2197 	  else
       
  2198 	    deplibs="$deplib $deplibs"
       
  2199 	    if test "$linkmode" = lib ; then
       
  2200 	      newdependency_libs="$deplib $newdependency_libs"
       
  2201 	    fi
       
  2202 	  fi
       
  2203 	  continue
       
  2204 	  ;;
       
  2205 	-L*)
  2175 	-L*)
  2206 	  case $linkmode in
  2176 	  case $linkmode in
  2207 	  lib)
  2177 	  lib)
  2208 	    deplibs="$deplib $deplibs"
  2178 	    deplibs="$deplib $deplibs"
  2209 	    test "$pass" = conv && continue
  2179 	    test "$pass" = conv && continue
  2343 
  2313 
  2344 	# Read the .la file
  2314 	# Read the .la file
  2345 	case $lib in
  2315 	case $lib in
  2346 	*/* | *\\*) . $lib ;;
  2316 	*/* | *\\*) . $lib ;;
  2347 	*) . ./$lib ;;
  2317 	*) . ./$lib ;;
  2348 	esac
       
  2349 
       
  2350 	case $host in
       
  2351 	*-*-darwin*)
       
  2352 	  # Convert "-framework foo" to "foo.framework" in dependency_libs
       
  2353 	  test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.framework/g'`
       
  2354 	  ;;
       
  2355 	esac
  2318 	esac
  2356 
  2319 
  2357 	if test "$linkmode,$pass" = "lib,link" ||
  2320 	if test "$linkmode,$pass" = "lib,link" ||
  2358 	   test "$linkmode,$pass" = "prog,scan" ||
  2321 	   test "$linkmode,$pass" = "prog,scan" ||
  2359 	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
  2322 	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
  2972 		      break
  2935 		      break
  2973 		    fi
  2936 		    fi
  2974 		  done
  2937 		  done
  2975 		  path=""
  2938 		  path=""
  2976 		  ;;
  2939 		  ;;
  2977 	      *.framework)
       
  2978 		case $host in
       
  2979 		  *-*-darwin*)
       
  2980 		    depdepl="$deplib"
       
  2981 		    ;;
       
  2982 		esac
       
  2983 		;;
       
  2984 		*) continue ;;
  2940 		*) continue ;;
  2985 		esac
  2941 		esac
  2986 		;;
  2942 		;;
  2987 	      *) continue ;;
  2943 	      *) continue ;;
  2988 	      esac
  2944 	      esac
  3846 		build_libtool_libs=no
  3802 		build_libtool_libs=no
  3847 	      fi
  3803 	      fi
  3848 	    fi
  3804 	    fi
  3849 	  fi
  3805 	  fi
  3850 	fi
  3806 	fi
  3851 	# Time to change all our "foo.framework" stuff back to "-framework foo"
       
  3852 	case $host in
       
  3853 	  *-*-darwin*)
       
  3854 	    newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
       
  3855 	    dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).framework%%g'`
       
  3856 	    ;;
       
  3857 	esac
       
  3858 	# Done checking deplibs!
  3807 	# Done checking deplibs!
  3859 	deplibs=$newdeplibs
  3808 	deplibs=$newdeplibs
  3860       fi
  3809       fi
  3861 
  3810 
  3862 
  3811 
  4392 	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  4341 	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  4393 	;;
  4342 	;;
  4394       esac
  4343       esac
  4395 
  4344 
  4396       case $host in
  4345       case $host in
  4397       *-*-darwin*)
  4346       *darwin*)
  4398         # Don't allow lazy linking, it breaks C++ global constructors
  4347         # Don't allow lazy linking, it breaks C++ global constructors
  4399         if test "$tagname" = CXX ; then
  4348         if test "$tagname" = CXX ; then
  4400         compile_command="$compile_command ${wl}-bind_at_load"
  4349         compile_command="$compile_command ${wl}-bind_at_load"
  4401         finalize_command="$finalize_command ${wl}-bind_at_load"
  4350         finalize_command="$finalize_command ${wl}-bind_at_load"
  4402         fi
  4351         fi
  4403 	# Time to change all our "foo.framework" stuff back to "-framework foo"
       
  4404 	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
       
  4405 	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
       
  4406         ;;
  4352         ;;
  4407       esac
  4353       esac
  4408 
  4354 
  4409 
  4355 
  4410       # move library search paths that coincide with paths to not yet
  4356       # move library search paths that coincide with paths to not yet