Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/chris/configure.ac @ 2011

Last change on this file since 2011 was 1982, checked in by chris, 20 years ago

orxonox/branches/chris: merged trunk into my branch, moved new files into new folder

File size: 3.0 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
6AM_INIT_AUTOMAKE
7AC_CONFIG_SRCDIR([.])
8AC_CONFIG_HEADER([config.h])
9
10# Checks for programs.
11AC_PROG_CXX
12AC_PROG_CC
13
14# Checks for libraries.
15
16#  cheking for libGL
17AC_CHECK_HEADERS(GL/gl.h ,,
18      [AC_MSG_ERROR([cannot find opengl headers]) ])
19
20#   checking for Unix GL
21AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
22if test "$FOUND_GL" = "yes" ; then
23    LIBS="$LIBS -lGL"
24    #   checking for Windows openGl library
25else
26    echo "We did not find the Linux opengl Library. Checking for Windows Library"
27    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
28    if test "$FOUND_opengl32" = "yes" ; then
29        LIBS="$LIBS -lopengl32"
30       
31    else
32         echo "------------------"
33         echo "opengl not found."
34         echo "please install the opengl package which can be found at http://www.opengl.org"
35         echo "------------------"
36         exit -1
37    fi
38fi
39
40#  cheking for libGLU
41AC_CHECK_HEADERS(GL/glu.h ,,
42      [AC_MSG_ERROR([cannot find opengl headers]) ])
43
44AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
45if test "$FOUND_GLU" = "yes" ; then
46    LIBS="$LIBS -lGLU"
47    #   checking for Windows GLU32 library
48else
49    echo "We did not find the Linux GLU Library. Checking for Windows Library"
50    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
51    if test "$FOUND_glu32" = "yes" ; then
52        LIBS="$LIBS -lGLU32"
53       
54        else
55         echo "------------------"
56         echo "GLU library not found."
57         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
58         echo "------------------"
59         exit -1
60    fi
61fi
62
63# FIXME: Replace `main' with a function in `-lOSMesa':
64AC_CHECK_LIB([OSMesa], [main])
65# FIXME: Replace `main' with a function in `-lX11':
66AC_CHECK_LIB([X11], [main])
67# FIXME: Replace `main' with a function in `-lXt':
68AC_CHECK_LIB([Xt], [main])
69
70#  cheking for libglut32
71AC_CHECK_HEADERS(GL/glut.h ,,
72      [AC_MSG_ERROR([cannot find glut headers]) ])
73AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
74if test "$FOUND_glut" = "yes" ; then
75    LIBS="$LIBS -lglut"
76    #   checking for Windows glut32 library
77else
78    echo "We did not find the Linux glut Library. Checking for Windows Library"
79    AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes)
80    if test "$FOUND_glut32" = "yes" ; then
81        LIBS="$LIBS -lglut32"
82    else
83         echo "------------------"
84         echo "glut library not found."
85         echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
86         echo "------------------"
87         exit -1
88    fi
89fi
90
91# FIXME: Replace `main' with a function in `-lm':
92AC_CHECK_LIB([m], [main])
93
94# Checks for header files.
95AC_HEADER_STDC
96AC_CHECK_HEADERS([stdlib.h string.h])
97
98# Checks for typedefs, structures, and compiler characteristics.
99AC_HEADER_STDBOOL
100
101# Checks for library functions.
102AC_FUNC_MALLOC
103AC_CHECK_FUNCS([bzero sqrt])
104
105AC_CONFIG_FILES([Makefile
106                 console/Makefile
107                 gui/Makefile
108                 src/Makefile])
109AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.