/*
  Copyright (C) 2008-2009, Parrot Foundation.
  $Id: opengl_c.in 37385 2009-03-13 19:25:41Z coke $
*/

#include <stdio.h>
#include <stdlib.h>

#ifdef __APPLE_CC__
#  include <GLUT/glut.h>
#else
#  include <GL/glut.h>
#endif

int
main(int argc, char *argv[])
{
    if (glutInit == NULL) {
        printf("glutInit is NULL\n");
        return EXIT_FAILURE;
    }

#ifdef OPENGLUT
    printf("%d OpenGLUT\n",    GLUT_API_VERSION);
#elif  FREEGLUT
    printf("%d freeglut\n",    GLUT_API_VERSION);
#elif  GLUT_MACOSX_IMPLEMENTATION
    printf("%d MacOSX_GLUT\n", GLUT_API_VERSION);
#else
    printf("%d GLUT\n",        GLUT_API_VERSION);
#endif

    return EXIT_SUCCESS;
}

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */
