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