1 dnl Process this file with autoconf to produce a configure script.
3 dnl The basis for this file was generated by autoscan(1) [pere 1998-03-19]
5 AC_INIT(Simulator/Aircraft/aircraft.c)
7 dnl Initialize the automake stuff
8 AM_INIT_AUTOMAKE(FlightGear, 0.48)
10 dnl Checks for programs.
17 dnl Initialize libtool
20 dnl Initialize maintainer mode
23 dnl Check to see if this `configure' is being run in the `Cygwin32' environment
26 AC_CHECK_HEADER(windows.h)
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)
33 wi_EXTRA_DIRS(no, /store /usr/local /local /user/local /usr/share \
34 /usr/X11R6 /opt/X11R6)
37 dnl Check for X11 (fancy)
40 dnl Checks for libraries.
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)
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)
61 dnl if GLcore found, then also check for GL
62 AC_CHECK_LIB(GL, glXCreateContext)
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)
71 AC_CHECK_LIB(glut, glutGetModifiers)
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...
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"
85 echo " Cannot find glut.dll"
88 if [[ -f `pwd`/Win32/glu.dll ]]; then
91 echo " Can't find glu.dll, assuming it's someplace"
95 if [[ -f `pwd`/Win32/opengl.dll ]]; then
96 echo " found opengl.dll"
98 echo " Can't find opengl.dll, assuming it's somplace"
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"
107 dnl Checks for header files.
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 )
112 dnl Checks for typedefs, structures, and compiler characteristics.
118 dnl Checks for library functions.
121 AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \
122 setitimer getitimer signal GetLocalTime rint )
124 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
126 echo "Unable to find the necessary GL libraries."
130 AM_CONFIG_HEADER(Include/config.h)
136 Lib/Bucket/Makefile \
143 Simulator/Aircraft/Makefile \
144 Simulator/Astro/Makefile \
145 Simulator/Autopilot/Makefile \
146 Simulator/Cockpit/Makefile \
147 Simulator/Controls/Makefile \
148 Simulator/Flight/LaRCsim/Makefile \
149 Simulator/Flight/Slew/Makefile \
150 Simulator/Flight/Makefile \
151 Simulator/Joystick/Makefile \
152 Simulator/Main/Makefile \
153 Simulator/Main/runfg \
154 Simulator/Main/runfg.bat \
156 Simulator/Scenery/Makefile \
157 Simulator/Time/Makefile \
158 Simulator/Weather/Makefile \
160 Tools/AssemTris/Makefile \
161 Tools/Dem2node/Makefile \
162 Tools/DemRaw2ascii/Makefile \
163 Tools/FixNode/Makefile \
164 Tools/FixObj/Makefile \
165 Tools/SplitTris/Makefile \
166 Tools/Stripe_u/Makefile \
167 Tools/Tri2obj/Makefile \
168 Tools/Triangle/Makefile \