+2008-08-02 Peter Rosin <peda@lysator.liu.se>
+
+ The MSVC linker doesn't have a -L option, and doesn't understand
+ posix paths. Move paths to an envvar with a prefix (-LIBPATH:).
+ * libltdl/m4/libtool.m4: Add new tag variables to specify
+ to what variable (dashL_envvar) -L options should be moved,
+ and what to prepend to the -L path (dashL_envvar_spec).
+ * libltdl/config/ltmain.m4sh (func_dashL_to_envvar): New
+ function that moves -L options to a variable.
+ * libltdl/config/ltmain.m4sh (func_mode_link): Prior to
+ linking, call above function if dashL_envvar is set.
+
2008-08-02 Peter Rosin <peda@lysator.liu.se>
On Windows, find potential libs regardless of file name case.
}
+# func_dashL_to_envvar deplibs_variable deplibs...
+func_dashL_to_envvar ()
+{
+ deplibs_variable=$1
+ shift
+ tmp_libs=
+ for deplib; do
+ case $deplib in
+ -L*)
+ func_stripname '-L' '' "$deplib"
+ env_path=$func_stripname_result
+ case $host_os in
+ mingw*)
+ env_path=`cmd \\\\/C echo "$env_path " | $SED -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin*)
+ env_path=`cygpath -w "$env_path"`
+ ;;
+ esac
+ eval $dashL_envvar="\"\$$dashL_envvar $dashL_envvar_spec$env_path\""
+ ;;
+ *)
+ tmp_libs="$tmp_libs $deplib"
+ ;;
+ esac
+ done
+ eval $deplibs_variable="\"$tmp_libs\""
+}
+
+
# func_write_libtool_object output_name pic_name nonpic_name
# Create a libtool object file (analogous to a ".la" file),
test "X$libobjs" = "X " && libobjs=
fi
+ case $pass/$dashL_envvar in
+ link/) ;;
+ link/*)
+ # Move all -L options to the environment variable
+ # specified by $dashL_envvar.
+ eval save_dashL_envvar="\"\$$dashL_envvar\""
+ eval cmds=\"\$cmds~$dashL_envvar="$save_dashL_envvar"\"
+
+ func_dashL_to_envvar deplibs $deplibs
+ export $dashL_envvar
+ ;;
+ esac
+
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
compile_deplibs="$new_libs"
+ case $pass/$dashL_envvar in
+ link/) ;;
+ link/*)
+ # Move all -L options to the environment variable
+ # specified by $dashL_envvar.
+ eval save_dashL_envvar="\"\$$dashL_envvar\""
+
+ func_dashL_to_envvar compile_deplibs $compile_deplibs
+ eval prepend_dashL_envvar="$dashL_envvar=\\\"\$$dashL_envvar\\\""
+ compile_command="$prepend_dashL_envvar $compile_command"
+ eval $dashL_envvar="\"$save_dashL_envvar\""
+
+ func_dashL_to_envvar finalize_deplibs $finalize_deplibs
+ eval prepend_dashL_envvar="$dashL_envvar=\\\"\$$dashL_envvar\\\""
+ finalize_command="$prepend_dashL_envvar $finalize_command"
+ eval $dashL_envvar="\"$save_dashL_envvar\""
+ ;;
+ esac
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
[Commands necessary for linking programs (against libraries) with templates])
_LT_TAGDECL([], [file_list_spec], [1],
[Specify filename containing input files])
+_LT_TAGDECL([], [dashL_envvar], [1],
+ [When linking, move all paths specified with -L options to this variable])
+_LT_TAGDECL([], [dashL_envvar_spec], [1],
+ [When moving paths with dashL_envvar, prepend this to each path])
dnl FIXME: Not yet implemented
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
dnl [Compiler flag to generate thread safe objects])