Ticket #37878: library_path_test_2.diff
File library_path_test_2.diff, 1.5 KB (added by michaelld (Michael Dickens), 12 years ago) |
---|
-
config.tests/mac/library_path/library_path.test
old new 5 5 VERBOSE=$2 6 6 WORKDIR=$3 7 7 8 done=no 8 9 cd $3 9 10 10 11 # (1) make the library 11 12 if "$COMPILER" -dynamiclib -o library_path_lib.dylib library_path_lib.c; then 12 13 # (2) do the test, without LIBRARY_PATH; should fail 13 if "$COMPILER" -nostdlib -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib; then 14 true 14 unset LIBRARY_PATH 15 if "$COMPILER" -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib; then 16 echo "Compile seems to work even with LIBRARY_PATH not set; assuming LIBRARY_PATH works" 17 done=yes 15 18 else 16 # (3) do the test, with LIBRARY_PATH set; should pass19 # (3) do the test, with LIBRARY_PATH now set; should pass 17 20 export LIBRARY_PATH=. 18 if "$COMPILER" -nostd lib -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib; then21 if "$COMPILER" -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib; then 19 22 LIBRARY_PATH_SUPPORT=yes 20 23 fi 21 24 fi 22 25 rm -f library_path_test.o library_path_test 23 26 else 24 27 echo "Unable to compile library; assuming LIBRARY_PATH works" 25 exit 128 done=yes 26 29 fi 27 30 rm -f library_path_lib.dylib library_path_lib.o 28 31 32 # if done above, assume it works and exit 33 [ "$done" = "yes" ] && exit 1 34 29 35 if [ "$LIBRARY_PATH_SUPPORT" != "yes" ]; then 30 36 [ "$VERBOSE" = "yes" ] && echo "LIBRARY_PATH support not detected" 31 37 exit 0