Merge branch 'msvc'
[platform/upstream/automake.git] / tests / compile4.test
index 4fc8d9e..bb9f671 100755 (executable)
@@ -79,8 +79,15 @@ if test -f sub/libfoo.a; then
   cp sub/libfoo.a sub/foo.lib
 fi
 
-./compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
+# POSIX mandates that the compiler accepts a space between the -I,
+# -l and -L options and their respective arguments.  Traditionally,
+# this should work also without a space.  Try both usages.
+for sp in '' ' '; do
+  rm -f main
 
-./main
+  ./compile cl $CFLAGS $LDFLAGS -L${sp}"$absfoodir" "$absmainobj" -o main -l${sp}foo
+
+  ./main
+done
 
 :