Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/freealut-1.1.0/test_suite/test_version.c @ 47

Last change on this file since 47 was 14, checked in by landauf, 17 years ago

added freealut

File size: 1.1 KB
Line 
1#include <stdlib.h>
2#include <stdio.h>
3#include <AL/alut.h>
4
5/*
6  This program checks that the version of OpenAL in the
7  library agrees with the header file we're compiled against.
8*/
9
10int
11main (int argc, char **argv)
12{
13  ALboolean ok = AL_FALSE;
14
15  alutInit (&argc, argv);
16
17#ifdef ALUT_API_MAJOR_VERSION
18  if (alutGetMajorVersion () != ALUT_API_MAJOR_VERSION ||
19      alutGetMinorVersion () != ALUT_API_MINOR_VERSION)
20    {
21      fprintf (stderr,
22               "WARNING: The ALUT library is version %d.%d.x but <AL/alut.h> says it's %d.%d.x!\n",
23               alutGetMajorVersion (), alutGetMinorVersion (),
24               ALUT_API_MAJOR_VERSION, ALUT_API_MINOR_VERSION);
25    }
26  else
27    {
28      fprintf (stderr, "The ALUT library is at version %d.%d.x.\n",
29               alutGetMajorVersion (), alutGetMinorVersion ());
30      ok = AL_TRUE;
31    }
32#else
33  fprintf (stderr, "WARNING: Your copy of <AL/alut.h> is pre-1.0.0,\n");
34  fprintf (stderr, "but you are running the ALUT test suite from ALUT\n");
35  fprintf (stderr, "version 1.0.0 or later.\n");
36#endif
37
38  alutExit ();
39  return ok ? EXIT_SUCCESS : EXIT_FAILURE;
40}
Note: See TracBrowser for help on using the repository browser.