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 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
18 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
19 | |
---|
20 | # checking for Unix GL |
---|
21 | AC_CHECK_LIB([GL], [main], FOUND_GL=yes) |
---|
22 | if test "$FOUND_GL" = "yes" ; then |
---|
23 | LIBS="$LIBS -lGL" |
---|
24 | # checking for Windows openGl library |
---|
25 | else |
---|
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 |
---|
38 | fi |
---|
39 | |
---|
40 | # cheking for libGLU |
---|
41 | AC_CHECK_HEADERS(GL/glu.h ,, |
---|
42 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
43 | |
---|
44 | AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) |
---|
45 | if test "$FOUND_GLU" = "yes" ; then |
---|
46 | LIBS="$LIBS -lGLU" |
---|
47 | # checking for Windows GLU32 library |
---|
48 | else |
---|
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 |
---|
61 | fi |
---|
62 | |
---|
63 | # FIXME: Replace `main' with a function in `-lOSMesa': |
---|
64 | AC_CHECK_LIB([OSMesa], [main]) |
---|
65 | # FIXME: Replace `main' with a function in `-lX11': |
---|
66 | AC_CHECK_LIB([X11], [main]) |
---|
67 | # FIXME: Replace `main' with a function in `-lXt': |
---|
68 | AC_CHECK_LIB([Xt], [main]) |
---|
69 | |
---|
70 | # cheking for libglut32 |
---|
71 | AC_CHECK_HEADERS(GL/glut.h ,, |
---|
72 | [AC_MSG_ERROR([cannot find glut headers]) ]) |
---|
73 | AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes) |
---|
74 | if test "$FOUND_glut" = "yes" ; then |
---|
75 | LIBS="$LIBS -lglut" |
---|
76 | # checking for Windows glut32 library |
---|
77 | else |
---|
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 |
---|
89 | fi |
---|
90 | |
---|
91 | # FIXME: Replace `main' with a function in `-lm': |
---|
92 | AC_CHECK_LIB([m], [main]) |
---|
93 | |
---|
94 | # Checks for header files. |
---|
95 | AC_HEADER_STDC |
---|
96 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
97 | |
---|
98 | # Checks for typedefs, structures, and compiler characteristics. |
---|
99 | AC_HEADER_STDBOOL |
---|
100 | |
---|
101 | # Checks for library functions. |
---|
102 | AC_FUNC_MALLOC |
---|
103 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
104 | |
---|
105 | AC_CONFIG_FILES([Makefile |
---|
106 | console/Makefile |
---|
107 | gui/Makefile |
---|
108 | src/Makefile]) |
---|
109 | AC_OUTPUT |
---|