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