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.41)
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 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)
31 wi_EXTRA_DIRS(no, /store /usr/local /local /user/local /usr/share \
32 /usr/X11R6 /opt/X11R6)
35 dnl Check for X11 (fancy)
38 dnl Checks for libraries.
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(Xmu, XmuLookupStandardColormap)
47 AC_CHECK_LIB(GLcore, glNewList)
48 if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
49 dnl if no GLcore, check for GL
50 AC_CHECK_LIB(GL, glNewList)
51 if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
52 dnl if no GL, check for MesaGL
53 AC_CHECK_LIB(MesaGL, glNewList)
56 dnl if GLcore found, then also check for GL
57 AC_CHECK_LIB(GL, glXCreateContext)
60 AC_CHECK_LIB(GLU, gluLookAt)
61 if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
62 dnl if no GLU, check for MesaGLU
63 AC_CHECK_LIB(MesaGLU, gluLookAt)
66 AC_CHECK_LIB(glut, glutGetModifiers)
68 dnl cygwin32 is a little wierd because it has to try to handle the various
69 dnl winbloze-isms. We'll just do this manually for now.
70 if test "x$am_cv_cygwin32" = "xyes" ; then
71 echo Cygnus Win32 specific hacks...
74 dnl Note, the double square brackets are required becuase single brackets
75 dnl seem to get stripped out
76 if [[ -f `pwd`/Win32/glut.dll ]]; then
77 echo " found glut.dll, adding -lglut"
80 echo " Cannot find glut.dll"
83 if [[ -f `pwd`/Win32/glu.dll ]]; then
86 echo " Can't find glu.dll, assuming it's someplace"
90 if [[ -f `pwd`/Win32/opengl.dll ]]; then
91 echo " found opengl.dll"
93 echo " Can't find opengl.dll, assuming it's somplace"
95 echo " adding -lopengl"
97 echo " adding -luser32 -lgdi32"
98 LIBS="$LIBS -luser32 -lgdi32"
99 ac_cv_lib_glut_glutGetModifiers="yes"
102 dnl Checks for header files.
104 AC_CHECK_HEADERS( fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \
105 unistd.h windows.h winbase.h values.h )
107 dnl Checks for typedefs, structures, and compiler characteristics.
113 dnl Checks for library functions.
116 AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \
117 setitimer getitimer signal GetLocalTime )
119 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
121 echo "Unable to find the necessary GL libraries."
125 AM_CONFIG_HEADER(Simulator/Include/config.h)
130 Simulator/Aircraft/Makefile \
131 Simulator/Astro/Makefile \
132 Simulator/Cockpit/Makefile \
133 Simulator/Controls/Makefile \
134 Simulator/Flight/LaRCsim/Makefile \
135 Simulator/Flight/Slew/Makefile \
136 Simulator/Flight/Makefile \
137 Simulator/Include/Makefile \
138 Simulator/Joystick/Makefile \
139 Simulator/Main/Makefile \
140 Simulator/Main/runfg \
141 Simulator/Main/runfg.bat \
143 Simulator/Math/Makefile \
144 Simulator/Scenery/Bucket/Makefile \
145 Simulator/Scenery/Makefile \
146 Simulator/Time/Makefile \
147 Simulator/Weather/Makefile \
148 Simulator/XGL/Makefile \
150 Tools/AssemTris/Makefile \
152 Tools/Dem2node/Makefile \
153 Tools/FixNode/Makefile \
154 Tools/FixObj/Makefile \
155 Tools/SplitTris/Makefile \
156 Tools/Stripe_u/Makefile \
157 Tools/Tri2obj/Makefile \
158 Tools/Triangle/Makefile \