Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/tags/0.1-pre-alpha-2/configure.ac

Last change on this file was 2018, checked in by bensch, 20 years ago

orxonox/trunk: merged guicc and the new Configure.ac to the Trunk. Now I have to Check if everything compiles on windows.

File size: 3.3 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
10AC_MSG_CHECKING([for mingw])
11case `uname` in
12  *MINGW*)
13    mingw=yes
14    MSBITFIELDS="-mms-bitfields"
15    ;;
16  *)
17    mingw=no
18    ;;
19esac
20AC_MSG_RESULT([$mingw])
21AC_SUBST(MSBITFIELDS)
22
23
24# Checks for programs.
25AC_PROG_CXX
26AC_PROG_CC
27
28# Checks for libraries.
29
30#  cheking for libGL
31AC_CHECK_HEADERS(GL/gl.h ,,
32      [AC_MSG_ERROR([cannot find opengl headers]) ])
33
34#   checking for Unix GL
35AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
36if test "$FOUND_GL" = "yes" ; then
37    LIBS="$LIBS -lGL"
38    #   checking for Windows openGl library
39else
40    echo "We did not find the Linux opengl Library. Checking for Windows Library"
41    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
42    if test "$FOUND_opengl32" = "yes" ; then
43        LIBS="$LIBS -lopengl32"
44       
45    else
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
52fi
53
54#  cheking for libGLU
55AC_CHECK_HEADERS(GL/glu.h ,,
56      [AC_MSG_ERROR([cannot find opengl headers]) ])
57
58AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
59if test "$FOUND_GLU" = "yes" ; then
60    LIBS="$LIBS -lGLU"
61    #   checking for Windows GLU32 library
62else
63    echo "We did not find the Linux GLU Library. Checking for Windows Library"
64    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
65    if test "$FOUND_glu32" = "yes" ; then
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
75fi
76
77# FIXME: Replace `main' with a function in `-lOSMesa':
78AC_CHECK_LIB([OSMesa], [main])
79# FIXME: Replace `main' with a function in `-lX11':
80AC_CHECK_LIB([X11], [main])
81# FIXME: Replace `main' with a function in `-lXt':
82AC_CHECK_LIB([Xt], [main])
83
84#  cheking for libglut32
85AC_CHECK_HEADERS(GL/glut.h ,,
86      [AC_MSG_ERROR([cannot find glut headers]) ])
87AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
88if test "$FOUND_glut" = "yes" ; then
89    LIBS="$LIBS -lglut"
90    #   checking for Windows glut32 library
91else
92    echo "We did not find the Linux glut Library. Checking for Windows Library"
93    AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes)
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
103fi
104
105# FIXME: Replace `main' with a function in `-lm':
106AC_CHECK_LIB([m], [main])
107
108LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
109
110
111# Checks for header files.
112AC_HEADER_STDC
113AC_CHECK_HEADERS([stdlib.h string.h])
114
115# Checks for typedefs, structures, and compiler characteristics.
116AC_HEADER_STDBOOL
117
118# Checks for library functions.
119AC_FUNC_MALLOC
120AC_CHECK_FUNCS([bzero sqrt])
121
122AC_CONFIG_FILES([Makefile
123                 console/Makefile
124                 gui/Makefile
125                 src/Makefile])
126AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.