Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/configure.ac @ 2644

Last change on this file since 2644 was 2627, checked in by bensch, 20 years ago

orxonox/trunk: deleted obsolete glut includings

File size: 3.5 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.56)
5AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
6AM_INIT_AUTOMAKE
7
8AC_CONFIG_SRCDIR([.])
9AC_CONFIG_HEADER([config.h])
10
11AC_MSG_CHECKING([for mingw])
12case `uname` in
13  *MINGW*)
14    mingw="yes"
15    MSBITFIELDS="-mms-bitfields"
16    MWINDOWS="-mwindows"
17    ;;
18  *)
19    mingw="no"
20    ;;
21esac
22AC_MSG_RESULT([$mingw])
23AC_SUBST(MSBITFIELDS)
24
25
26# Checks for programs.
27AC_PROG_CXX
28AC_PROG_CC
29
30# Checks for libraries.
31
32#  cheking for libGL
33AC_CHECK_HEADERS(GL/gl.h ,,
34      [AC_MSG_ERROR([cannot find opengl headers]) ])
35
36#   checking for Unix GL
37AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
38if test "$FOUND_GL" = "yes" ; then
39    LIBS="$LIBS -lGL"
40    #   checking for Windows openGl library
41else
42    echo "We did not find the Linux opengl Library. Checking for Windows Library"
43    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
44    if test "$FOUND_opengl32" = "yes" ; then
45        LIBS="$LIBS -lopengl32"
46       
47    else
48         echo "------------------"
49         echo "opengl not found."
50         echo "please install the opengl package which can be found at http://www.opengl.org"
51         echo "------------------"
52         exit -1
53    fi
54fi
55
56#  cheking for libGLU
57AC_CHECK_HEADERS(GL/glu.h ,,
58      [AC_MSG_ERROR([cannot find opengl headers]) ])
59
60AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
61if test "$FOUND_GLU" = "yes" ; then
62    LIBS="$LIBS -lGLU"
63    #   checking for Windows GLU32 library
64else
65    echo "We did not find the Linux GLU Library. Checking for Windows Library"
66    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
67    if test "$FOUND_glu32" = "yes" ; then
68        LIBS="$LIBS -lGLU32"
69       
70        else
71         echo "------------------"
72         echo "GLU library not found."
73         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
74         echo "------------------"
75         exit -1
76    fi
77fi
78
79# FIXME: Replace `main' with a function in `-lOSMesa':
80AC_CHECK_LIB([OSMesa], [main])
81# FIXME: Replace `main' with a function in `-lX11':
82AC_CHECK_LIB([X11], [main])
83# FIXME: Replace `main' with a function in `-lXt':
84AC_CHECK_LIB([Xt], [main])
85
86## mingw CHECK
87if test $mingw = yes ; then
88        AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
89        if test $FOUND_mingw32 = "yes"; then
90                LIBS="$LIBS -lmingw32"
91        fi
92fi
93
94## SDL CHECK
95
96#checking for SDL libs
97AC_CHECK_HEADERS(SDL/SDL.h ,,
98      [AC_MSG_ERROR([cannot find SDL headers]) ])
99if test $mingw = no ; then
100        AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
101        if test "$FOUND_SDL" = "yes" ; then
102                LIBS="$LIBS -lSDL"
103        fi
104#   checking for Windows sdl library
105else
106    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
107    if test "$FOUND_sdlmain" = "yes" ; then
108        LIBS="$LIBS -lsdlmain"
109    fi
110        AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
111        if test "$FOUND_sdl" = "yes" ; then
112                LIBS="$LIBS -lsdl"
113        fi
114fi
115
116#checking for pthread libs
117AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
118if test "$FOUND_pthread" = "yes" ; then
119    LIBS="$LIBS -lpthread"
120fi
121
122
123
124
125# FIXME: Replace `main' with a function in `-lm':
126AC_CHECK_LIB([m], [main])
127
128LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
129
130
131# Checks for header files.
132AC_HEADER_STDC
133AC_CHECK_HEADERS([stdlib.h string.h])
134
135# Checks for typedefs, structures, and compiler characteristics.
136AC_HEADER_STDBOOL
137
138# Checks for library functions.
139AC_FUNC_MALLOC
140AC_CHECK_FUNCS([bzero sqrt])
141
142AC_CONFIG_FILES([Makefile
143                 console/Makefile
144                 gui/Makefile
145                 src/Makefile])
146AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.