minimal fixes to visual test, so that it actually builds w/o warnings: - linux_process.c: add an SDLVisualTest_ScreenshotProcess() stub for linux builds succeed. - action_configparser.c: fixes -Wswitch warnings. - testharness.c: fixes 'is used uninitialized' warnings for userevents. - testharness.c: fixes format string argument to 'Force killing...' - testquit.c: fix type of options array in main(). - windows_screenshot.c: lowercase windows.h header name. - ran dos2unix on all sources and add missing newlines at files' ends. - minor adjustments to autotools build system (which actually seems to need more surgery for unnecessary stuff...)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798
diff --git a/visualtest/Makefile.in b/visualtest/Makefile.in
index 2efcdb1..3cf2f6d 100644
--- a/visualtest/Makefile.in
+++ b/visualtest/Makefile.in
@@ -1,15 +1,20 @@
# Makefile to build the SDL tests
+
srcdir = @srcdir@
CC = @CC@
EXE = @EXE@
CFLAGS = @CFLAGS@ -I../include -I./include
LIBS = @LIBS@
+
TARGETS = \
testharness$(EXE) \
testquit$(EXE)
+
all: Makefile $(TARGETS)
+
Makefile: $(srcdir)/Makefile.in
$(SHELL) config.status $@
+
testharness$(EXE): $(srcdir)/src/action_configparser.c \
$(srcdir)/src/harness_argparser.c \
$(srcdir)/src/rwhelper.c \
@@ -27,8 +32,10 @@ testharness$(EXE): $(srcdir)/src/action_configparser.c \
$(srcdir)/src/windows/windows_process.c \
$(srcdir)/src/windows/windows_screenshot.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
testquit$(EXE): $(srcdir)/unittest/testquit.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
clean:
rm -f $(TARGETS)
distclean: clean
diff --git a/visualtest/acinclude.m4 b/visualtest/acinclude.m4
index ead69e5..0fdf353 100644
--- a/visualtest/acinclude.m4
+++ b/visualtest/acinclude.m4
@@ -5,13 +5,13 @@
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
-# serial 1
+# serial 2
-dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL2],
-[dnl
+[dnl
dnl Get the cflags and libraries from the sdl2-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
@@ -21,7 +21,7 @@ AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
- min_sdl_version=ifelse([$1], ,0.9.0,$1)
+ min_sdl_version=ifelse([$1], ,2.0.0,$1)
if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],
@@ -31,42 +31,42 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
sdl_pc=no
if test x$sdl_exec_prefix != x ; then
sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config
+ if test x${SDL2_CONFIG+set} != xset ; then
+ SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_prefix/bin/sdl2-config
+ if test x${SDL2_CONFIG+set} != xset ; then
+ SDL2_CONFIG=$sdl_prefix/bin/sdl2-config
fi
fi
fi
if test "x$sdl_pc" = xyes ; then
no_sdl=""
- SDL_CONFIG="pkg-config sdl2"
+ SDL2_CONFIG="pkg-config sdl2"
else
as_save_PATH="$PATH"
if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
fi
- AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])
+ AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
PATH="$as_save_PATH"
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
- if test "$SDL_CONFIG" = "no" ; then
+ if test "$SDL2_CONFIG" = "no" ; then
no_sdl=yes
else
- SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
+ SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+ SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
- sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
@@ -80,41 +80,19 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl2-config to some extent
dnl
rm -f conf.sdltest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "SDL.h"
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
int main (int argc, char *argv[])
{
int major, minor, micro;
- char *tmp_version;
+ FILE *fp = fopen("conf.sdltest", "w");
- /* This hangs on some systems (?)
- system ("touch conf.sdltest");
- */
- { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+ if (fp) fclose(fp);
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup("$min_sdl_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ if (sscanf("$min_sdl_version", "%d.%d.%d", &major, &minor, µ) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
@@ -130,14 +108,14 @@ int main (int argc, char *argv[])
printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
- printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n");
+ printf("*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\n");
printf("*** to point to the correct copy of sdl2-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
-],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])], [], [no_sdl=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
@@ -152,10 +130,10 @@ int main (int argc, char *argv[])
if test "x$no_sdl" = x ; then
ifelse([$2], , :, [$2])
else
- if test "$SDL_CONFIG" = "no" ; then
+ if test "$SDL2_CONFIG" = "no" ; then
echo "*** The sdl2-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the SDL_CONFIG environment variable to the"
+ echo "*** your path, or set the SDL2_CONFIG environment variable to the"
echo "*** full path to sdl2-config."
else
if test -f conf.sdltest ; then
@@ -165,7 +143,7 @@ int main (int argc, char *argv[])
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include "SDL.h"
@@ -173,7 +151,7 @@ int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
-], [ return 0; ],
+]], [[ return 0; ]])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
@@ -186,7 +164,7 @@ int main(int argc, char *argv[])
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
- echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ])
+ echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
@@ -228,7 +206,7 @@ int main(int argc, char *argv[])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+m4_pattern_allow([^PKG_CONFIG(_PATH|_LIBDIR)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
@@ -309,7 +287,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -337,7 +315,7 @@ $$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-_PKG_TEXT])dnl
+_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
@@ -348,7 +326,7 @@ path to pkg-config.
_PKG_TEXT
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
diff --git a/visualtest/autogen.sh b/visualtest/autogen.sh
index 939f34c..988d417 100755
--- a/visualtest/autogen.sh
+++ b/visualtest/autogen.sh
@@ -1,12 +1,11 @@
#!/bin/sh
-#
-# Regenerate configuration files
+
cp acinclude.m4 aclocal.m4
-found=false
-for autoconf in autoconf autoconf259 autoconf-2.59
-do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
-done
-if test x$found = xfalse; then
- echo "Couldn't find autoconf, aborting"
- exit 1
+
+if test "$AUTOCONF"x = x; then
+ AUTOCONF=autoconf
fi
+
+$AUTOCONF || exit 1
+rm aclocal.m4
+rm -rf autom4te.cache
diff --git a/visualtest/compile b/visualtest/compile
deleted file mode 100755
index cf0edba..0000000
--- a/visualtest/compile
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/compile
\ No newline at end of file
diff --git a/visualtest/config.h.in b/visualtest/config.h.in
index 40b5b8a..eb89b0f 100644
--- a/visualtest/config.h.in
+++ b/visualtest/config.h.in
@@ -1,4 +1,4 @@
-/* config.h.in. Generated from configure.in by autoheader. */
+/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
diff --git a/visualtest/configure b/visualtest/configure
index 4d5c0a4..7198bb5 100755
--- a/visualtest/configure
+++ b/visualtest/configure
@@ -586,11 +586,13 @@ PACKAGE_URL=''
ac_subst_vars='LTLIBOBJS
LIBOBJS
+LIBUNWIND_LIBS
+LIBUNWIND_CFLAGS
SDL_TTF_LIB
GLLIB
CPP
XMKMF
-SDL_CONFIG
+SDL2_CONFIG
SDL_LIBS
SDL_CFLAGS
PKG_CONFIG_LIBDIR
@@ -678,7 +680,9 @@ PKG_CONFIG_LIBDIR
SDL_CFLAGS
SDL_LIBS
XMKMF
-CPP'
+CPP
+LIBUNWIND_CFLAGS
+LIBUNWIND_LIBS'
# Initialize some variables set by options.
@@ -1322,6 +1326,10 @@ Some influential environment variables:
SDL_LIBS linker flags for SDL, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
CPP C preprocessor
+ LIBUNWIND_CFLAGS
+ C compiler flags for LIBUNWIND, overriding pkg-config
+ LIBUNWIND_LIBS
+ linker flags for LIBUNWIND, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1919,7 +1927,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in $srcdir/../build-scripts; do
+for ac_dir in ../build-scripts "$srcdir"/../build-scripts; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1935,7 +1943,7 @@ for ac_dir in $srcdir/../build-scripts; do
fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in $srcdir/../build-scripts" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../build-scripts \"$srcdir\"/../build-scripts" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2019,7 +2027,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2811,7 +2818,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
@@ -2899,7 +2905,7 @@ ISWINDOWS="false"
ISMACOSX="false"
case "$host" in
- *-*-cygwin* | *-*-mingw32*)
+ *-*-cygwin* | *-*-mingw*)
ISWINDOWS="true"
EXE=".exe"
MATHLIB=""
@@ -2912,12 +2918,11 @@ case "$host" in
EXTRALIB=""
SYS_GL_LIBS="-lGL"
;;
- *-*-darwin* )
+ *-*-darwin*)
ISMACOSX="true"
EXE=""
MATHLIB=""
EXTRALIB=""
-
;;
*-*-aix*)
ISUNIX="true"
@@ -3153,8 +3158,8 @@ fi
if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5
-$as_echo_n "checking for SDL... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl2 >= $min_sdl_version" >&5
+$as_echo_n "checking for sdl2 >= $min_sdl_version... " >&6; }
if test -n "$SDL_CFLAGS"; then
pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
@@ -3224,21 +3229,21 @@ fi
sdl_pc=no
if test x$sdl_exec_prefix != x ; then
sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config
+ if test x${SDL2_CONFIG+set} != xset ; then
+ SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_prefix/bin/sdl2-config
+ if test x${SDL2_CONFIG+set} != xset ; then
+ SDL2_CONFIG=$sdl_prefix/bin/sdl2-config
fi
fi
fi
if test "x$sdl_pc" = xyes ; then
no_sdl=""
- SDL_CONFIG="pkg-config sdl2"
+ SDL2_CONFIG="pkg-config sdl2"
else
as_save_PATH="$PATH"
if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
@@ -3248,12 +3253,12 @@ fi
set dummy sdl2-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SDL_CONFIG+:} false; then :
+if ${ac_cv_path_SDL2_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
- case $SDL_CONFIG in
+ case $SDL2_CONFIG in
[\\/]* | ?:[\\/]*)
- ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+ ac_cv_path_SDL2_CONFIG="$SDL2_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3263,7 +3268,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ ac_cv_path_SDL2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3271,14 +3276,14 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+ test -z "$ac_cv_path_SDL2_CONFIG" && ac_cv_path_SDL2_CONFIG="no"
;;
esac
fi
-SDL_CONFIG=$ac_cv_path_SDL_CONFIG
-if test -n "$SDL_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG" >&5
-$as_echo "$SDL_CONFIG" >&6; }
+SDL2_CONFIG=$ac_cv_path_SDL2_CONFIG
+if test -n "$SDL2_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL2_CONFIG" >&5
+$as_echo "$SDL2_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -3290,17 +3295,17 @@ fi
$as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; }
no_sdl=""
- if test "$SDL_CONFIG" = "no" ; then
+ if test "$SDL2_CONFIG" = "no" ; then
no_sdl=yes
else
- SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
+ SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+ SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
- sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
- sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
- sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
@@ -3318,38 +3323,16 @@ else
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "SDL.h"
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
int main (int argc, char *argv[])
{
int major, minor, micro;
- char *tmp_version;
+ FILE *fp = fopen("conf.sdltest", "w");
- /* This hangs on some systems (?)
- system ("touch conf.sdltest");
- */
- { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+ if (fp) fclose(fp);
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup("$min_sdl_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ if (sscanf("$min_sdl_version", "%d.%d.%d", &major, &minor, µ) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
@@ -3365,7 +3348,7 @@ int main (int argc, char *argv[])
printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
- printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n");
+ printf("*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\n");
printf("*** to point to the correct copy of sdl2-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
@@ -3399,10 +3382,10 @@ $as_echo "no" >&6; }
if test "x$no_sdl" = x ; then
:
else
- if test "$SDL_CONFIG" = "no" ; then
+ if test "$SDL2_CONFIG" = "no" ; then
echo "*** The sdl2-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the SDL_CONFIG environment variable to the"
+ echo "*** your path, or set the SDL2_CONFIG environment variable to the"
echo "*** full path to sdl2-config."
else
if test -f conf.sdltest ; then
@@ -3445,7 +3428,7 @@ else
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
- echo "*** may want to edit the sdl2-config script: $SDL_CONFIG"
+ echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -3624,8 +3607,34 @@ else
$as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
+ac_x_includes=no
+ac_x_libraries=no
+# Do we need to do anything special at all?
+ac_save_LIBS=$LIBS
+LIBS="-lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ # We can compile and link X programs with no special options.
+ ac_x_includes=
+ ac_x_libraries=
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+# If that didn't work, only try xmkmf and filesystem searches
+# for native compilation.
+if test x"$ac_x_includes" = xno && test "$cross_compiling" = no; then :
+ rm -f -r conftest.dir
if mkdir conftest.dir; then
cd conftest.dir
cat >Imakefile <<'_ACEOF'
@@ -3664,7 +3673,7 @@ _ACEOF
rm -f -r conftest.dir
fi
-# Standard set of common directories for X headers.
+ # Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
@@ -3691,6 +3700,8 @@ ac_x_header_dirs='
/usr/local/include/X11R5
/usr/local/include/X11R4
+/opt/X11/include
+
/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11
@@ -3764,15 +3775,17 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
+fi
+# Record the results.
case $ac_x_includes,$ac_x_libraries in #(
- no,* | *,no | *\'*)
+ no,* | *,no | *\'*) :
# Didn't find X, or a directory has "'" in its name.
- ac_cv_have_x="have_x=no";; #(
- *)
+ ac_cv_have_x="have_x=no" ;; #(
+ *) :
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes\
ac_x_includes='$ac_x_includes'\
- ac_x_libraries='$ac_x_libraries'"
+ ac_x_libraries='$ac_x_libraries'" ;;
esac
fi
;; #(
@@ -3925,6 +3938,79 @@ if test x$have_SDL_ttf = xyes; then
fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
+$as_echo_n "checking for libunwind... " >&6; }
+
+if test -n "$LIBUNWIND_CFLAGS"; then
+ pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBUNWIND_LIBS"; then
+ pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libunwind" 2>&1`
+ else
+ LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "libunwind" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBUNWIND_PKG_ERRORS" >&5
+
+ have_libunwind=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_libunwind=no
+else
+ LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS
+ LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libunwind=yes
+fi
+if test x$have_libunwind = xyes ; then
+ LIBS="$LIBS $LIBUNWIND_LIBS"
+fi
+
ac_config_headers="$ac_config_headers config.h"
ac_config_files="$ac_config_files Makefile"
diff --git a/visualtest/configure.ac b/visualtest/configure.ac
new file mode 100644
index 0000000..384e913
--- /dev/null
+++ b/visualtest/configure.ac
@@ -0,0 +1,168 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([sdlvisualtest], [0.01], [apoorvupreti@gmail.com])
+
+dnl Detect the canonical build and host environments
+AC_CONFIG_AUX_DIR([../build-scripts])
+AC_CANONICAL_HOST
+
+dnl Check for tools
+AC_PROG_CC
+
+dnl Check for compiler environment
+AC_C_CONST
+
+dnl We only care about this for building testnative at the moment, so these
+dnl values shouldn't be considered absolute truth.
+dnl (Haiku, for example, sets none of these.)
+ISUNIX="false"
+ISWINDOWS="false"
+ISMACOSX="false"
+
+dnl Figure out which math or extra library to use
+case "$host" in
+ *-*-cygwin* | *-*-mingw*)
+ ISWINDOWS="true"
+ EXE=".exe"
+ MATHLIB=""
+ EXTRALIB="-lshlwapi"
+ SYS_GL_LIBS="-lopengl32"
+ ;;
+ *-*-haiku*)
+ EXE=""
+ MATHLIB=""
+ EXTRALIB=""
+ SYS_GL_LIBS="-lGL"
+ ;;
+ *-*-darwin*)
+ ISMACOSX="true"
+ EXE=""
+ MATHLIB=""
+ EXTRALIB=""
+ ;;
+ *-*-aix*)
+ ISUNIX="true"
+ EXE=""
+ if test x$ac_cv_c_compiler_gnu = xyes; then
+ CFLAGS="-mthreads"
+ fi
+ MATHLIB=""
+ EXTRALIB=""
+ SYS_GL_LIBS=""
+ ;;
+ *-*-mint*)
+ EXE=""
+ MATHLIB=""
+ EXTRALIB=""
+ AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
+ if test "x$OSMESA_CONFIG" = "xyes"; then
+ OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
+ OSMESA_LIBS=`$OSMESA_CONFIG --libs`
+ CFLAGS="$CFLAGS $OSMESA_CFLAGS"
+ SYS_GL_LIBS="$OSMESA_LIBS"
+ else
+ SYS_GL_LIBS="-lOSMesa"
+ fi
+ ;;
+ *-*-qnx*)
+ EXE=""
+ MATHLIB=""
+ EXTRALIB=""
+ SYS_GL_LIBS="-lGLES_CM"
+ ;;
+ *)
+ dnl Oh well, call it Unix...
+ ISUNIX="true"
+ EXE=""
+ MATHLIB="-lm"
+ EXTRALIB=""
+ SYS_GL_LIBS="-lGL"
+ ;;
+esac
+AC_SUBST(EXE)
+AC_SUBST(MATHLIB)
+AC_SUBST(EXTRALIB)
+AC_SUBST(ISMACOSX)
+AC_SUBST(ISWINDOWS)
+AC_SUBST(ISUNIX)
+
+dnl Check for SDL
+SDL_VERSION=2.0.0
+AM_PATH_SDL2($SDL_VERSION,
+ :,
+ AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+)
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB"
+
+dnl Check for X11 path, needed for OpenGL on some systems
+AC_PATH_X
+if test x$have_x = xyes; then
+ if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
+ :
+ else
+ CFLAGS="$CFLAGS -I$ac_x_includes"
+ fi
+ if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
+ :
+ else
+ XPATH="-L$ac_x_libraries"
+ fi
+fi
+
+dnl Check for OpenGL
+AC_MSG_CHECKING(for OpenGL support)
+have_opengl=no
+AC_TRY_COMPILE([
+ #include "SDL_opengl.h"
+],[
+],[
+have_opengl=yes
+])
+AC_MSG_RESULT($have_opengl)
+
+dnl Check for OpenGL ES
+AC_MSG_CHECKING(for OpenGL ES support)
+have_opengles=no
+AC_TRY_COMPILE([
+ #if defined (__IPHONEOS__)
+ #include <OpenGLES/ES1/gl.h>
+ #else
+ #include <GLES/gl.h>
+ #endif /* __QNXNTO__ */
+],[
+],[
+have_opengles=yes
+])
+AC_MSG_RESULT($have_opengles)
+
+GLLIB=""
+if test x$have_opengles = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+ GLLIB="$XPATH -lGLESv1_CM"
+elif test x$have_opengl = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_OPENGL"
+ GLLIB="$XPATH $SYS_GL_LIBS"
+else
+ GLLIB=""
+fi
+
+AC_SUBST(GLLIB)
+
+dnl Check for SDL_ttf
+AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
+if test x$have_SDL_ttf = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
+ SDL_TTF_LIB="-lSDL2_ttf"
+fi
+AC_SUBST(SDL_TTF_LIB)
+
+PKG_CHECK_MODULES(LIBUNWIND, libunwind, have_libunwind=yes, have_libunwind=no)
+if test x$have_libunwind = xyes ; then
+ LIBS="$LIBS $LIBUNWIND_LIBS"
+fi
+
+dnl Finally create all the generated files
+dnl AC_OUTPUT([Makefile])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/visualtest/configure.in b/visualtest/configure.in
deleted file mode 100644
index 724a0ee..0000000
--- a/visualtest/configure.in
+++ /dev/null
@@ -1,166 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT([sdlvisualtest], [0.01], [apoorvupreti@gmail.com])
-
-dnl Detect the canonical build and host environments
-AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
-AC_CANONICAL_HOST
-
-dnl Check for tools
-
-AC_PROG_CC
-
-dnl Check for compiler environment
-
-AC_C_CONST
-
-dnl We only care about this for building testnative at the moment, so these
-dnl values shouldn't be considered absolute truth.
-dnl (Haiku, for example, sets none of these.)
-ISUNIX="false"
-ISWINDOWS="false"
-ISMACOSX="false"
-
-dnl Figure out which math or extra library to use
-case "$host" in
- *-*-cygwin* | *-*-mingw32*)
- ISWINDOWS="true"
- EXE=".exe"
- MATHLIB=""
- EXTRALIB="-lshlwapi"
- SYS_GL_LIBS="-lopengl32"
- ;;
- *-*-haiku*)
- EXE=""
- MATHLIB=""
- EXTRALIB=""
- SYS_GL_LIBS="-lGL"
- ;;
- *-*-darwin* )
- ISMACOSX="true"
- EXE=""
- MATHLIB=""
- EXTRALIB=""
-
- ;;
- *-*-aix*)
- ISUNIX="true"
- EXE=""
- if test x$ac_cv_prog_gcc = xyes; then
- CFLAGS="-mthreads"
- fi
- MATHLIB=""
- EXTRALIB=""
- SYS_GL_LIBS=""
- ;;
- *-*-mint*)
- EXE=""
- MATHLIB=""
- EXTRALIB=""
- AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
- if test "x$OSMESA_CONFIG" = "xyes"; then
- OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
- OSMESA_LIBS=`$OSMESA_CONFIG --libs`
- CFLAGS="$CFLAGS $OSMESA_CFLAGS"
- SYS_GL_LIBS="$OSMESA_LIBS"
- else
- SYS_GL_LIBS="-lOSMesa"
- fi
- ;;
- *-*-qnx*)
- EXE=""
- MATHLIB=""
- EXTRALIB=""
- SYS_GL_LIBS="-lGLES_CM"
- ;;
- *)
- dnl Oh well, call it Unix...
- ISUNIX="true"
- EXE=""
- MATHLIB="-lm"
- EXTRALIB=""
- SYS_GL_LIBS="-lGL"
- ;;
-esac
-AC_SUBST(EXE)
-AC_SUBST(MATHLIB)
-AC_SUBST(EXTRALIB)
-AC_SUBST(ISMACOSX)
-AC_SUBST(ISWINDOWS)
-AC_SUBST(ISUNIX)
-
-dnl Check for SDL
-SDL_VERSION=2.0.0
-AM_PATH_SDL2($SDL_VERSION,
- :,
- AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
-)
-CFLAGS="$CFLAGS $SDL_CFLAGS"
-LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB"
-
-dnl Check for X11 path, needed for OpenGL on some systems
-AC_PATH_X
-if test x$have_x = xyes; then
- if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
- :
- else
- CFLAGS="$CFLAGS -I$ac_x_includes"
- fi
- if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
- :
- else
- XPATH="-L$ac_x_libraries"
- fi
-fi
-
-dnl Check for OpenGL
-AC_MSG_CHECKING(for OpenGL support)
-have_opengl=no
-AC_TRY_COMPILE([
- #include "SDL_opengl.h"
-],[
-],[
-have_opengl=yes
-])
-AC_MSG_RESULT($have_opengl)
-
-dnl Check for OpenGL ES
-AC_MSG_CHECKING(for OpenGL ES support)
-have_opengles=no
-AC_TRY_COMPILE([
- #if defined (__IPHONEOS__)
- #include <OpenGLES/ES1/gl.h>
- #else
- #include <GLES/gl.h>
- #endif /* __QNXNTO__ */
-],[
-],[
-have_opengles=yes
-])
-AC_MSG_RESULT($have_opengles)
-
-GLLIB=""
-if test x$have_opengles = xyes; then
- CFLAGS="$CFLAGS -DHAVE_OPENGLES"
- GLLIB="$XPATH -lGLESv1_CM"
-elif test x$have_opengl = xyes; then
- CFLAGS="$CFLAGS -DHAVE_OPENGL"
- GLLIB="$XPATH $SYS_GL_LIBS"
-else
- GLLIB=""
-fi
-
-AC_SUBST(GLLIB)
-
-dnl Check for SDL_ttf
-AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
-if test x$have_SDL_ttf = xyes; then
- CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
- SDL_TTF_LIB="-lSDL2_ttf"
-fi
-AC_SUBST(SDL_TTF_LIB)
-
-dnl Finally create all the generated files
-dnl AC_OUTPUT([Makefile])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT()
diff --git a/visualtest/depcomp b/visualtest/depcomp
deleted file mode 100755
index b0ad20c..0000000
--- a/visualtest/depcomp
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/depcomp
\ No newline at end of file
diff --git a/visualtest/install-sh b/visualtest/install-sh
deleted file mode 100755
index 205f21c..0000000
--- a/visualtest/install-sh
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/install-sh
\ No newline at end of file
diff --git a/visualtest/missing b/visualtest/missing
deleted file mode 100755
index 20bc5b0..0000000
--- a/visualtest/missing
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/missing
\ No newline at end of file
diff --git a/visualtest/src/action_configparser.c b/visualtest/src/action_configparser.c
index fc226bc..4580343 100644
--- a/visualtest/src/action_configparser.c
+++ b/visualtest/src/action_configparser.c
@@ -36,6 +36,9 @@ FreeAction(SDLVisualTest_Action* action)
action->extra.process.args = NULL;
}
break;
+
+ default:
+ break;
}
}
diff --git a/visualtest/src/linux/linux_process.c b/visualtest/src/linux/linux_process.c
index 2fef09c..d6e7f75 100644
--- a/visualtest/src/linux/linux_process.c
+++ b/visualtest/src/linux/linux_process.c
@@ -1,199 +1,208 @@
-/* See LICENSE.txt for the full license governing this code. */
-/**
- * \file linux_process.c
- *
- * Source file for the process API on linux.
- */
-
-
-#include <SDL.h>
-#include <SDL_test.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "SDL_visualtest_process.h"
-#include "SDL_visualtest_harness_argparser.h"
-#include "SDL_visualtest_parsehelper.h"
-
-#if defined(__LINUX__)
-
-static void
-LogLastError(char* str)
-{
- char* error = (char*)strerror(errno);
- if(!str || !error)
- return;
- SDLTest_LogError("%s: %s", str, error);
-}
-
-int
-SDL_LaunchProcess(char* file, char* args, SDL_ProcessInfo* pinfo)
-{
- pid_t pid;
- char** argv;
-
- if(!file)
- {
- SDLTest_LogError("file argument cannot be NULL");
- return 0;
- }
- if(!pinfo)
- {
- SDLTest_LogError("pinfo cannot be NULL");
- return 0;
- }
- pid = fork();
- if(pid == -1)
- {
- LogLastError("fork() failed");
- return 0;
- }
- else if(pid == 0)
- {
- /* parse the arguments string */
- argv = SDLVisualTest_ParseArgsToArgv(args);
- argv[0] = file;
- execv(file, argv);
- LogLastError("execv() failed");
- return 0;
- }
- else
- {
- pinfo->pid = pid;
- return 1;
- }
-
- /* never executed */
- return 0;
-}
-
-int
-SDL_GetProcessExitStatus(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
-{
- int success, status;
- if(!pinfo)
- {
- SDLTest_LogError("pinfo argument cannot be NULL");
- return 0;
- }
- if(!ps)
- {
- SDLTest_LogError("ps argument cannot be NULL");
- return 0;
- }
- success = waitpid(pinfo->pid, &status, WNOHANG);
- if(success == -1)
- {
- LogLastError("waitpid() failed");
- return 0;
- }
- else if(success == 0)
- {
- ps->exit_status = -1;
- ps->exit_success = 1;
- }
- else
- {
- ps->exit_success = WIFEXITED(status);
- ps->exit_status = WEXITSTATUS(status);
- }
- return 1;
-}
-
-int
-SDL_IsProcessRunning(SDL_ProcessInfo* pinfo)
-{
- int success;
-
- if(!pinfo)
- {
- SDLTest_LogError("pinfo cannot be NULL");
- return -1;
- }
-
- success = kill(pinfo->pid, 0);
- if(success == -1)
- {
- if(errno == ESRCH) /* process is not running */
- return 0;
- else
- {
- LogLastError("kill() failed");
- return -1;
- }
- }
- return 1;
-}
-
-int
-SDL_QuitProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
-{
- int success, status;
-
- if(!pinfo)
- {
- SDLTest_LogError("pinfo argument cannot be NULL");
- return 0;
- }
- if(!ps)
- {
- SDLTest_LogError("ps argument cannot be NULL");
- return 0;
- }
-
- success = kill(pinfo->pid, SIGQUIT);
- if(success == -1)
- {
- LogLastError("kill() failed");
- return 0;
- }
-
- success = waitpid(pinfo->pid, &status, 0);
- if(success == -1)
- {
- LogLastError("waitpid() failed");
- return 0;
- }
-
- ps->exit_success = WIFEXITED(status);
- ps->exit_status = WEXITSTATUS(status);
- return 1;
-}
-
-int
-SDL_KillProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
-{
- int success, status;
-
- if(!pinfo)
- {
- SDLTest_LogError("pinfo argument cannot be NULL");
- return 0;
- }
- if(!ps)
- {
- SDLTest_LogError("ps argument cannot be NULL");
- return 0;
- }
-
- success = kill(pinfo->pid, SIGKILL);
- if(success == -1)
- {
- LogLastError("kill() failed");
- return 0;
- }
- success = waitpid(pinfo->pid, &status, 0);
- if(success == -1)
- {
- LogLastError("waitpid() failed");
- return 0;
- }
-
- ps->exit_success = WIFEXITED(status);
- ps->exit_status = WEXITSTATUS(status);
- return 1;
-}
-
-#endif
+/* See LICENSE.txt for the full license governing this code. */
+/**
+ * \file linux_process.c
+ *
+ * Source file for the process API on linux.
+ */
+
+
+#include <SDL.h>
+#include <SDL_test.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "SDL_visualtest_process.h"
+#include "SDL_visualtest_harness_argparser.h"
+#include "SDL_visualtest_parsehelper.h"
+
+#if defined(__LINUX__)
+
+static void
+LogLastError(char* str)
+{
+ char* error = (char*)strerror(errno);
+ if(!str || !error)
+ return;
+ SDLTest_LogError("%s: %s", str, error);
+}
+
+int
+SDL_LaunchProcess(char* file, char* args, SDL_ProcessInfo* pinfo)
+{
+ pid_t pid;
+ char** argv;
+
+ if(!file)
+ {
+ SDLTest_LogError("file argument cannot be NULL");
+ return 0;
+ }
+ if(!pinfo)
+ {
+ SDLTest_LogError("pinfo cannot be NULL");
+ return 0;
+ }
+ pid = fork();
+ if(pid == -1)
+ {
+ LogLastError("fork() failed");
+ return 0;
+ }
+ else if(pid == 0)
+ {
+ /* parse the arguments string */
+ argv = SDLVisualTest_ParseArgsToArgv(args);
+ argv[0] = file;
+ execv(file, argv);
+ LogLastError("execv() failed");
+ return 0;
+ }
+ else
+ {
+ pinfo->pid = pid;
+ return 1;
+ }
+
+ /* never executed */
+ return 0;
+}
+
+int
+SDL_GetProcessExitStatus(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
+{
+ int success, status;
+ if(!pinfo)
+ {
+ SDLTest_LogError("pinfo argument cannot be NULL");
+ return 0;
+ }
+ if(!ps)
+ {
+ SDLTest_LogError("ps argument cannot be NULL");
+ return 0;
+ }
+ success = waitpid(pinfo->pid, &status, WNOHANG);
+ if(success == -1)
+ {
+ LogLastError("waitpid() failed");
+ return 0;
+ }
+ else if(success == 0)
+ {
+ ps->exit_status = -1;
+ ps->exit_success = 1;
+ }
+ else
+ {
+ ps->exit_success = WIFEXITED(status);
+ ps->exit_status = WEXITSTATUS(status);
+ }
+ return 1;
+}
+
+int
+SDL_IsProcessRunning(SDL_ProcessInfo* pinfo)
+{
+ int success;
+
+ if(!pinfo)
+ {
+ SDLTest_LogError("pinfo cannot be NULL");
+ return -1;
+ }
+
+ success = kill(pinfo->pid, 0);
+ if(success == -1)
+ {
+ if(errno == ESRCH) /* process is not running */
+ return 0;
+ else
+ {
+ LogLastError("kill() failed");
+ return -1;
+ }
+ }
+ return 1;
+}
+
+int
+SDL_QuitProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
+{
+ int success, status;
+
+ if(!pinfo)
+ {
+ SDLTest_LogError("pinfo argument cannot be NULL");
+ return 0;
+ }
+ if(!ps)
+ {
+ SDLTest_LogError("ps argument cannot be NULL");
+ return 0;
+ }
+
+ success = kill(pinfo->pid, SIGQUIT);
+ if(success == -1)
+ {
+ LogLastError("kill() failed");
+ return 0;
+ }
+
+ success = waitpid(pinfo->pid, &status, 0);
+ if(success == -1)
+ {
+ LogLastError("waitpid() failed");
+ return 0;
+ }
+
+ ps->exit_success = WIFEXITED(status);
+ ps->exit_status = WEXITSTATUS(status);
+ return 1;
+}
+
+int
+SDL_KillProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps)
+{
+ int success, status;
+
+ if(!pinfo)
+ {
+ SDLTest_LogError("pinfo argument cannot be NULL");
+ return 0;
+ }
+ if(!ps)
+ {
+ SDLTest_LogError("ps argument cannot be NULL");
+ return 0;
+ }
+
+ success = kill(pinfo->pid, SIGKILL);
+ if(success == -1)
+ {
+ LogLastError("kill() failed");
+ return 0;
+ }
+ success = waitpid(pinfo->pid, &status, 0);
+ if(success == -1)
+ {
+ LogLastError("waitpid() failed");
+ return 0;
+ }
+
+ ps->exit_success = WIFEXITED(status);
+ ps->exit_status = WEXITSTATUS(status);
+ return 1;
+}
+
+/* each window of the process will have a screenshot taken. The file name will be
+ prefix-i.png for the i'th window. */
+int
+SDLVisualTest_ScreenshotProcess(SDL_ProcessInfo* pinfo, char* prefix)
+{
+ SDLTest_LogError("Screenshot process not implemented");
+ return 0;
+}
+
+#endif
diff --git a/visualtest/src/mischelper.c b/visualtest/src/mischelper.c
index a61f0c8..9684af6 100644
--- a/visualtest/src/mischelper.c
+++ b/visualtest/src/mischelper.c
@@ -1,15 +1,15 @@
/**
- * \file mischelper.c
+ * \file mischelper.c
*
* Source file with miscellaneous helper functions.
*/
#include <SDL_test.h>
-void
-SDLVisualTest_HashString(char* str, char hash[33])
-{
- SDLTest_Md5Context md5c;
+void
+SDLVisualTest_HashString(char* str, char hash[33])
+{
+ SDLTest_Md5Context md5c;
int i;
if(!str)
@@ -20,9 +20,9 @@ SDLVisualTest_HashString(char* str, char hash[33])
SDLTest_Md5Init(&md5c);
SDLTest_Md5Update(&md5c, (unsigned char*)str, SDL_strlen(str));
- SDLTest_Md5Final(&md5c);
-
- /* convert the md5 hash to an array of hexadecimal digits */
+ SDLTest_Md5Final(&md5c);
+
+ /* convert the md5 hash to an array of hexadecimal digits */
for(i = 0; i < 16; i++)
- SDL_snprintf(hash + 2 * i, 33 - 2 * i, "%02x", (int)md5c.digest[i]);
-}
\ No newline at end of file
+ SDL_snprintf(hash + 2 * i, 33 - 2 * i, "%02x", (int)md5c.digest[i]);
+}
diff --git a/visualtest/src/parsehelper.c b/visualtest/src/parsehelper.c
index 566ad8a..9d38cb2 100644
--- a/visualtest/src/parsehelper.c
+++ b/visualtest/src/parsehelper.c
@@ -18,7 +18,7 @@ CountTokens(char* args)
int state; /* current state of the DFA */
if(!args)
- return -1;
+ return -1;
index = 0;
state = 0;
diff --git a/visualtest/src/rwhelper.c b/visualtest/src/rwhelper.c
index 1b7ac18..1ff9190 100644
--- a/visualtest/src/rwhelper.c
+++ b/visualtest/src/rwhelper.c
@@ -128,4 +128,4 @@ SDLVisualTest_RWHelperCountNonEmptyLines(SDL_RWops* rw,
buffer, comment_char))
num_lines++;
return num_lines;
-}
\ No newline at end of file
+}
diff --git a/visualtest/src/screenshot.c b/visualtest/src/screenshot.c
index 189774f..be5e4df 100644
--- a/visualtest/src/screenshot.c
+++ b/visualtest/src/screenshot.c
@@ -1,6 +1,6 @@
/* See LICENSE.txt for the full license governing this code. */
/**
- * \file screenshot.c
+ * \file screenshot.c
*
* Source file for the screenshot API.
*/
diff --git a/visualtest/src/testharness.c b/visualtest/src/testharness.c
index 56a0120..e93b095 100644
--- a/visualtest/src/testharness.c
+++ b/visualtest/src/testharness.c
@@ -1,6 +1,6 @@
/* See LICENSE.txt for the full license governing this code. */
/**
- * \file testharness.c
+ * \file testharness.c
*
* Source file for the test harness.
*/
@@ -82,10 +82,10 @@ ActionTimerCallback(Uint32 interval, void* param)
Uint32 next_action_time;
/* push an event to handle the action */
+ SDL_zero(userevent);
userevent.type = SDL_USEREVENT;
userevent.code = ACTION_TIMER_EVENT;
userevent.data1 = ¤t->action;
- userevent.data2 = NULL;
event.type = SDL_USEREVENT;
event.user = userevent;
@@ -110,10 +110,9 @@ KillTimerCallback(Uint32 interval, void* param)
SDL_Event event;
SDL_UserEvent userevent;
+ SDL_zero(userevent);
userevent.type = SDL_USEREVENT;
userevent.code = KILL_TIMER_EVENT;
- userevent.data1 = NULL;
- userevent.data2 = NULL;
event.type = SDL_USEREVENT;
event.user = userevent;
@@ -181,7 +180,7 @@ ProcessAction(SDLVisualTest_Action* action, int* sut_running, char* args)
if(SDL_IsProcessRunning(&action_process) > 0)
{
SDLTest_LogError("Process %s took too long too complete."
- " Force killing...", action->extra);
+ " Force killing...", action->extra.process.path);
if(!SDL_KillProcess(&action_process, &ps))
{
SDLTest_LogError("SDL_KillProcess() failed");
@@ -519,7 +518,7 @@ main(int argc, char* argv[])
}
goto cleanup_variator;
}
-
+
goto cleanup_sdl;
cleanup_variator:
diff --git a/visualtest/src/variator_exhaustive.c b/visualtest/src/variator_exhaustive.c
index 3e8f9c8..1e6a79e 100644
--- a/visualtest/src/variator_exhaustive.c
+++ b/visualtest/src/variator_exhaustive.c
@@ -39,6 +39,7 @@ NextVariation(SDLVisualTest_Variation* variation,
return 0;
if(carry == 0)
return 1;
+
SDLTest_LogError("NextVariation() failed");
return -1;
}
@@ -129,4 +130,4 @@ SDLVisualTest_FreeExhaustiveVariator(SDLVisualTest_ExhaustiveVariator* variator)
}
SDL_free(variator->variation.vars);
variator->variation.vars = NULL;
-}
\ No newline at end of file
+}
diff --git a/visualtest/src/variator_random.c b/visualtest/src/variator_random.c
index 2c4f058..4da4161 100644
--- a/visualtest/src/variator_random.c
+++ b/visualtest/src/variator_random.c
@@ -47,12 +47,13 @@ SDLVisualTest_GetNextRandomVariation(SDLVisualTest_RandomVariator* variator)
SDLVisualTest_SUTOptionValue* vars;
SDLVisualTest_SUTOption* options;
int i;
+
if(!variator)
{
SDLTest_LogError("variator argument cannot be NULL");
return NULL;
}
-
+
/* to save typing */
vars = variator->variation.vars;
options = variator->config.options;
@@ -106,6 +107,7 @@ void SDLVisualTest_FreeRandomVariator(SDLVisualTest_RandomVariator* variator)
SDLTest_LogError("variator argument cannot be NULL");
return;
}
+
SDL_free(variator->variation.vars);
variator->variation.vars = NULL;
-}
\ No newline at end of file
+}
diff --git a/visualtest/src/variators.c b/visualtest/src/variators.c
index 57767e5..e9485c6 100644
--- a/visualtest/src/variators.c
+++ b/visualtest/src/variators.c
@@ -53,6 +53,7 @@ SDLVisualTest_GetNextVariation(SDLVisualTest_Variator* variator)
SDLTest_LogError("variator argument cannot be NULL");
return NULL;
}
+
switch(variator->type)
{
case SDL_VARIATOR_EXHAUSTIVE:
@@ -77,6 +78,7 @@ void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator)
SDLTest_LogError("variator argument cannot be NULL");
return;
}
+
switch(variator->type)
{
case SDL_VARIATOR_EXHAUSTIVE:
@@ -90,4 +92,4 @@ void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator)
default:
SDLTest_LogError("Invalid value for variator type");
}
-}
\ No newline at end of file
+}
diff --git a/visualtest/src/windows/windows_process.c b/visualtest/src/windows/windows_process.c
index 36d0299..c13118d 100644
--- a/visualtest/src/windows/windows_process.c
+++ b/visualtest/src/windows/windows_process.c
@@ -1,11 +1,10 @@
/* See LICENSE.txt for the full license governing this code. */
/**
- * \file windows_process.c
+ * \file windows_process.c
*
* Source file for the process API on windows.
*/
-
#include <SDL.h>
#include <SDL_test.h>
#include <string.h>
diff --git a/visualtest/src/windows/windows_screenshot.c b/visualtest/src/windows/windows_screenshot.c
index e3e8ea4..c8fd1e4 100644
--- a/visualtest/src/windows/windows_screenshot.c
+++ b/visualtest/src/windows/windows_screenshot.c
@@ -1,6 +1,6 @@
/* See LICENSE.txt for the full license governing this code. */
/**
- * \file windows_screenshot.c
+ * \file windows_screenshot.c
*
* Source file for the screenshot API on windows.
*/
@@ -14,7 +14,7 @@
#endif
#if defined(__WIN32__)
-#include <Windows.h>
+#include <windows.h>
void LogLastError(char* str);
diff --git a/visualtest/stamp-h1 b/visualtest/stamp-h1
deleted file mode 100644
index 4547fe1..0000000
--- a/visualtest/stamp-h1
+++ /dev/null
@@ -1 +0,0 @@
-timestamp for config.h
diff --git a/visualtest/unittest/testquit.c b/visualtest/unittest/testquit.c
index 6cf4536..04e3c5c 100644
--- a/visualtest/unittest/testquit.c
+++ b/visualtest/unittest/testquit.c
@@ -64,7 +64,7 @@ main(int argc, char** argv)
if(consumed < 0)
{
- static const char *options = { "[--exit-code N]", "[--crash]", "[--hang]", NULL };
+ static const char *options[] = { "[--exit-code N]", "[--crash]", "[--hang]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
SDLTest_CommonQuit(state);
return 1;