- # Create symbolic link.
- catch "exec ln -fs dll.dll $tmpdir/libsymlinked_dll.dll.a" ln_catch
-
- # Compile and link the client program.
- if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/client.c $tmpdir/client.o ] {
- fail "compiling client"
- } else {
- # Check linking with import library.
- set msg "linking auto-import client using a standard import library"
- if [ld_special_link $ld $tmpdir/client.exe "--enable-auto-import /lib/crt0.o $tmpdir/client.o -L$tmpdir -lstandard $MYLIBS" ] {
- pass $msg
- } else {
- fail $msg
- }
-
- # Check linking directly with dll.
- set msg "linking auto-import client using the dll"
- if [ld_special_link $ld $tmpdir/client.exe "--enable-auto-import /lib/crt0.o $tmpdir/client.o -L$tmpdir -ldll $MYLIBS" ] {
- pass $msg
- } else {
- fail $msg
- }
-
- # Check linking with symlinked dll.
- set msg "linking auto-import client using symbolic linked dll"
- if [ld_special_link $ld $tmpdir/clientimport.exe "--enable-auto-import /lib/crt0.o $tmpdir/client.o -L$tmpdir -lsymlinked_dll $MYLIBS" ] {
- pass $msg
- } else {
- fail $msg
- }
-
- # Check linking with disabled auto-import, this must produce linking error.
- set msg "linking with disabled auto-import"
- if ![ld_special_link $ld $tmpdir/clientimport.exe "--disable-auto-import /lib/crt0.o $tmpdir/client.o -L$tmpdir -ldll $MYLIBS" ] {
- pass $msg
- } else {
- fail $msg
- }
- }