@@ -1162,7 +1162,7 @@ compiler."
11621162
11631163 * .o | * .obj | * .a | * .lib)
11641164 # A standard object.
1165- objs =" $objs $arg "
1165+ libobjs =" $libobjs $arg "
11661166 ;;
11671167
11681168 * .lo)
@@ -1796,6 +1796,94 @@ compiler."
17961796 esac
17971797 fi
17981798
1799+ if test -n " $rpath$xrpath " ; then
1800+ # If the user specified any rpath flags, then add them.
1801+ for libdir in $rpath $xrpath ; do
1802+ # This is the magic to use -rpath.
1803+ case " $compile_rpath " in
1804+ * " $libdir " * ) ;;
1805+ * ) compile_rpath=" $compile_rpath $libdir " ;;
1806+ esac
1807+ case " $finalize_rpath " in
1808+ * " $libdir " * ) ;;
1809+ * ) finalize_rpath=" $finalize_rpath $libdir " ;;
1810+ esac
1811+ done
1812+ fi
1813+
1814+ # Now hardcode the library paths
1815+ rpath=
1816+ hardcode_libdirs=
1817+ for libdir in $compile_rpath ; do
1818+ if test -n " $hardcode_libdir_flag_spec " ; then
1819+ if test -n " $hardcode_libdir_separator " ; then
1820+ if test -z " $hardcode_libdirs " ; then
1821+ hardcode_libdirs=" $libdir "
1822+ else
1823+ # Just accumulate the unique libdirs.
1824+ case " $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator " in
1825+ * " $hardcode_libdir_separator$libdir$hardcode_libdir_separator " * )
1826+ ;;
1827+ * )
1828+ hardcode_libdirs=" $hardcode_libdirs$hardcode_libdir_separator$libdir "
1829+ ;;
1830+ esac
1831+ fi
1832+ else
1833+ eval flag=\" $hardcode_libdir_flag_spec \"
1834+ rpath=" $rpath $flag "
1835+ fi
1836+ elif test -n " $runpath_var " ; then
1837+ case " $perm_rpath " in
1838+ * " $libdir " * ) ;;
1839+ * ) perm_rpath=" $perm_rpath $libdir " ;;
1840+ esac
1841+ fi
1842+ done
1843+ # Substitute the hardcoded libdirs into the rpath.
1844+ if test -n " $hardcode_libdir_separator " &&
1845+ test -n " $hardcode_libdirs " ; then
1846+ libdir=" $hardcode_libdirs "
1847+ eval rpath=\" $hardcode_libdir_flag_spec \"
1848+ fi
1849+ compile_rpath=" $rpath "
1850+
1851+ rpath=
1852+ hardcode_libdirs=
1853+ for libdir in $finalize_rpath ; do
1854+ if test -n " $hardcode_libdir_flag_spec " ; then
1855+ if test -n " $hardcode_libdir_separator " ; then
1856+ if test -z " $hardcode_libdirs " ; then
1857+ hardcode_libdirs=" $libdir "
1858+ else
1859+ # Just accumulate the unique libdirs.
1860+ case " $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator " in
1861+ * " $hardcode_libdir_separator$libdir$hardcode_libdir_separator " * )
1862+ ;;
1863+ * )
1864+ hardcode_libdirs=" $hardcode_libdirs$hardcode_libdir_separator$libdir "
1865+ ;;
1866+ esac
1867+ fi
1868+ else
1869+ eval flag=\" $hardcode_libdir_flag_spec \"
1870+ rpath=" $rpath $flag "
1871+ fi
1872+ elif test -n " $runpath_var " ; then
1873+ case " $finalize_perm_rpath " in
1874+ * " $libdir " * ) ;;
1875+ * ) finalize_perm_rpath=" $finalize_perm_rpath $libdir " ;;
1876+ esac
1877+ fi
1878+ done
1879+ # Substitute the hardcoded libdirs into the rpath.
1880+ if test -n " $hardcode_libdir_separator " &&
1881+ test -n " $hardcode_libdirs " ; then
1882+ libdir=" $hardcode_libdirs "
1883+ eval rpath=\" $hardcode_libdir_flag_spec \"
1884+ fi
1885+ finalize_rpath=" $rpath "
1886+
17991887 # Create the output directory, or remove our outputs if we need to.
18001888 if test -d $output_objdir ; then
18011889 $show " ${rm} r $output_objdir /$outputname $output_objdir /$libname .* $output_objdir /${libname}${release} .*"
@@ -1955,6 +2043,7 @@ EOF
19552043 done
19562044 done
19572045 if test -n " $a_deplib " ; then
2046+ newdeplibs=" $newdeplibs $a_deplib "
19582047 droppeddeps=yes
19592048 echo
19602049 echo " *** Warning: This library needs some functionality provided by $a_deplib ."
0 commit comments