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