]> git.mxchange.org Git - flightgear.git/blob - configure.in
d4950d6d1ca585d37fa558dedf6b86287829d5e8
[flightgear.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl The basis for this file was generated by autoscan(1) [pere 1998-03-19]
4 dnl
5 AC_INIT(Simulator/Aircraft/aircraft.c)
6
7 dnl Initialize the automake stuff
8 AM_INIT_AUTOMAKE(FlightGear, 0.46)
9
10 dnl Checks for programs.
11
12 AC_PROG_MAKE_SET
13 AC_PROG_CC
14 AC_PROG_CXX
15 AC_PROG_INSTALL
16 AC_PROG_LN_S
17 dnl Initialize libtool
18 AM_PROG_LIBTOOL
19
20 dnl Initialize maintainer mode
21 AM_MAINTAINER_MODE
22
23 dnl Check to see if this `configure' is being run in the `Cygwin32' environment
24 AM_CYGWIN32
25
26 dnl extra library and include directories
27 if test "x$am_cv_cygwin32" = "xyes" ; then
28     wi_EXTRA_DIRS(no, /store /usr/local /local /user/local /usr/share \
29         /usr/X11R6 /opt/X11R6 `pwd`/Win32)
30 else
31     wi_EXTRA_DIRS(no, /store /usr/local /local /user/local /usr/share \
32         /usr/X11R6 /opt/X11R6)
33 fi
34
35 dnl Check for X11 (fancy)
36 AC_PATH_XTRA
37
38 dnl Checks for libraries.
39
40 AC_CHECK_LIB(m, cos)
41 AC_CHECK_LIB(socket, socket)
42 AC_CHECK_LIB(X11, XCreateWindow)
43 AC_CHECK_LIB(Xext, XShmCreateImage)
44 AC_CHECK_LIB(Xi, XGetExtensionVersion)
45 AC_CHECK_LIB(ICE, IceOpenConnection)
46 AC_CHECK_LIB(SM, SmcOpenConnection)
47 AC_CHECK_LIB(Xt, XtMalloc)
48 AC_CHECK_LIB(Xmu, XmuLookupStandardColormap)
49
50 AC_CHECK_LIB(GLcore, glNewList)
51 if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
52     dnl if no GLcore, check for GL
53     AC_CHECK_LIB(GL, glNewList)
54     if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
55         dnl if no GL, check for MesaGL
56         AC_CHECK_LIB(MesaGL, glNewList)
57     fi
58 else
59     dnl if GLcore found, then also check for GL
60     AC_CHECK_LIB(GL, glXCreateContext)
61 fi
62
63 AC_CHECK_LIB(GLU, gluLookAt)
64 if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
65     dnl if no GLU, check for MesaGLU
66     AC_CHECK_LIB(MesaGLU, gluLookAt)
67 fi
68
69 AC_CHECK_LIB(glut, glutGetModifiers)
70         
71 dnl cygwin32 is a little wierd because it has to try to handle the various
72 dnl winbloze-isms.  We'll just do this manually for now.
73 if test "x$am_cv_cygwin32" = "xyes" ; then
74     echo Cygnus Win32 specific hacks...
75     AC_DEFINE(WIN32)
76
77     dnl Note, the double square brackets are required becuase single brackets
78     dnl seem to get stripped out
79     if [[ -f `pwd`/Win32/glut.dll ]]; then
80         echo "    found glut.dll, adding -lglut"
81         LIBS="$LIBS -lglut"
82     else
83         echo "    Cannot find glut.dll"
84         exit 1
85     fi
86     if [[ -f `pwd`/Win32/glu.dll ]]; then
87         echo "    found glu.dll"
88     else
89         echo "    Can't find glu.dll, assuming it's someplace"
90     fi
91     echo "    adding -lglu"
92     LIBS="$LIBS -lglu"
93     if [[ -f `pwd`/Win32/opengl.dll ]]; then
94         echo "    found opengl.dll"
95     else
96         echo "    Can't find opengl.dll, assuming it's somplace"
97     fi
98     echo "    adding -lopengl"
99     LIBS="$LIBS -lopengl"
100     echo "    adding -luser32 -lgdi32"
101     LIBS="$LIBS -luser32 -lgdi32"
102     ac_cv_lib_glut_glutGetModifiers="yes"
103 fi
104
105 dnl Checks for header files.
106 AC_HEADER_STDC
107 AC_CHECK_HEADERS( fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \
108         unistd.h windows.h winbase.h values.h )
109
110 dnl Checks for typedefs, structures, and compiler characteristics.
111 AC_C_CONST
112 AC_TYPE_SIZE_T
113 AC_HEADER_TIME
114 AC_STRUCT_TM
115
116 dnl Checks for library functions.
117 AC_TYPE_SIGNAL
118 AC_FUNC_VPRINTF
119 AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \
120         setitimer getitimer signal GetLocalTime rint )
121
122 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
123     echo 
124     echo "Unable to find the necessary GL libraries."
125     exit 1
126 fi
127
128 AM_CONFIG_HEADER(Include/config.h)
129
130 AC_OUTPUT( \
131         Makefile \
132         Include/Makefile \
133         Lib/Makefile \
134         Lib/Bucket/Makefile \
135         Lib/Debug/Makefile \
136         Lib/DEM/Makefile \
137         Lib/Math/Makefile \
138         Lib/XGL/Makefile \
139         Lib/zlib/Makefile \
140         Simulator/Makefile \
141         Simulator/Aircraft/Makefile \
142         Simulator/Astro/Makefile \
143         Simulator/Autopilot/Makefile \
144         Simulator/Cockpit/Makefile \
145         Simulator/Controls/Makefile \
146         Simulator/Flight/LaRCsim/Makefile \
147         Simulator/Flight/Slew/Makefile \
148         Simulator/Flight/Makefile \
149         Simulator/Joystick/Makefile \
150         Simulator/Main/Makefile \
151         Simulator/Main/runfg \
152         Simulator/Main/runfg.bat \
153         Simulator/Makefile \
154         Simulator/Scenery/Makefile \
155         Simulator/Time/Makefile \
156         Simulator/Weather/Makefile \
157         Tools/Makefile \
158         Tools/AssemTris/Makefile \
159         Tools/Dem2node/Makefile \
160         Tools/DemRaw2ascii/Makefile \
161         Tools/FixNode/Makefile \
162         Tools/FixObj/Makefile \
163         Tools/SplitTris/Makefile \
164         Tools/Stripe_u/Makefile \
165         Tools/Tri2obj/Makefile \
166         Tools/Triangle/Makefile \
167         Tests/Makefile \
168         )