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.43)
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(ICE, IceOpenConnection)
46 AC_CHECK_LIB(SM, SmcOpenConnection)
47 AC_CHECK_LIB(Xt, XtMalloc)
48 AC_CHECK_LIB(Xmu, XmuLookupStandardColormap)
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)
59 dnl if GLcore found, then also check for GL
60 AC_CHECK_LIB(GL, glXCreateContext)
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)
69 AC_CHECK_LIB(glut, glutGetModifiers)
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...
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"
83 echo " Cannot find glut.dll"
86 if [[ -f `pwd`/Win32/glu.dll ]]; then
89 echo " Can't find glu.dll, assuming it's someplace"
93 if [[ -f `pwd`/Win32/opengl.dll ]]; then
94 echo " found opengl.dll"
96 echo " Can't find opengl.dll, assuming it's somplace"
98 echo " adding -lopengl"
100 echo " adding -luser32 -lgdi32"
101 LIBS="$LIBS -luser32 -lgdi32"
102 ac_cv_lib_glut_glutGetModifiers="yes"
105 dnl Checks for header files.
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 )
110 dnl Checks for typedefs, structures, and compiler characteristics.
116 dnl Checks for library functions.
119 AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \
120 setitimer getitimer signal GetLocalTime )
122 if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
124 echo "Unable to find the necessary GL libraries."
128 AM_CONFIG_HEADER(Include/config.h)
134 Lib/Bucket/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 \
154 Simulator/Scenery/Makefile \
155 Simulator/Time/Makefile \
156 Simulator/Weather/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 \