dnl Process this file with autoconf to produce a configure script. dnl dnl The basis for this file was generated by autoscan(1) [pere 1998-03-19] dnl AC_INIT(Simulator/Aircraft/aircraft.c) dnl Initialize the automake stuff AM_INIT_AUTOMAKE(FlightGear, 0.52) dnl Checks for programs. AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S dnl Initialize libtool AM_PROG_LIBTOOL dnl Initialize maintainer mode (I'm not sure what this does) dnl AM_MAINTAINER_MODE dnl This is needed for AC_TRY_COMPILE later AC_ISC_POSIX dnl Check to see if this `configure' is being run in the `Cygwin32' environment dnl AM_CYGWIN32 dnl Check for MS Windows environment AC_CHECK_HEADER(windows.h) dnl Using AM_CONDITIONAL is a step out of the protected little dnl automake fold so it is potentially dangerous. But, we are dnl beginning to run into cases where the standard checks are not dnl enough. AM_CONDITIONALS are then referenced to conditionally dnl build a Makefile.in from a Makefile.am which lets us define custom dnl includes, compile alternative source files, etc. dnl Check for external variables daylight and timezone. AC_EXT_DAYLIGHT AM_CONDITIONAL(HAVE_DAYLIGHT, test "$have_daylight" = yes ) AC_EXT_TIMEZONE AM_CONDITIONAL(HAVE_TIMEZONE, test "$have_timezone" = yes ) dnl Check for Linux style audio support AM_CONDITIONAL(ENABLE_AUDIO_SUPPORT, \ test -r /usr/include/soundcard.h \ -o -r /usr/include/linux/soundcard.h \ -o -r /usr/include/machine/soundcard.h \ -o "x$ac_cv_header_windows_h" = "xyes" ) AM_CONDITIONAL(ENABLE_WIN32_AUDIO, test "x$ac_cv_header_windows_h" = "xyes") dnl extra library and include directories EXTRA_DIRS="/usr/local /usr/X11R6 /opt/X11R6" if test "x$ac_cv_header_windows_h" = "xyes" ; then EXTRA_DIRS="${EXTRA_DIRS} `pwd`/Win32" # elif test `uname -s` = "SunOS" ; then # EXTRA_DIRS="${EXTRA_DIRS} `pwd`/SunOS" fi wi_EXTRA_DIRS(no, ${EXTRA_DIRS}) dnl Check for X11 (fancy) AC_PATH_XTRA dnl Checks for libraries. AC_CHECK_LIB(m, cos) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(X11, XCreateWindow) AC_CHECK_LIB(Xext, XShmCreateImage) AC_CHECK_LIB(Xi, XGetExtensionVersion) AC_CHECK_LIB(ICE, IceOpenConnection) AC_CHECK_LIB(SM, SmcOpenConnection) AC_CHECK_LIB(Xt, XtMalloc) AC_CHECK_LIB(Xmu, XmuLookupStandardColormap) # dnl Solaris OpenGL pain # AC_CHECK_LIB(eprintf, __eprintf) AC_CHECK_LIB(GLcore, glNewList) if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then dnl if no GLcore, check for GL AC_CHECK_LIB(GL, glNewList) if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then dnl if no GL, check for MesaGL AC_CHECK_LIB(MesaGL, glNewList) fi else dnl if GLcore found, then also check for GL AC_CHECK_LIB(GL, glXCreateContext) fi dnl if using mesa, check for xmesa.h if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then AC_CHECK_HEADER(GL/xmesa.h) AM_CONDITIONAL(ENABLE_XMESA_FX, test "x$ac_cv_header_GL_xmesa_h" = "xyes") else dnl force a failed check AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") fi AC_CHECK_LIB(GLU, gluLookAt) if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then dnl if no GLU, check for MesaGLU AC_CHECK_LIB(MesaGLU, gluLookAt) fi AC_CHECK_LIB(glut, glutGetModifiers) dnl Win32 is a little wierd because it has to try to handle the various dnl winbloze-isms. We'll just do this manually for now. if test "x$ac_cv_header_windows_h" = "xyes" ; then echo Win32 specific hacks... AC_DEFINE(WIN32) dnl Note, the double square brackets are required becuase single brackets dnl seem to get stripped out if [[ -f `pwd`/Win32/glut.dll ]]; then echo " found glut.dll, adding -lglut" LIBS="$LIBS -lglut" else echo " Cannot find glut.dll" exit 1 fi if [[ -f `pwd`/Win32/glu.dll ]]; then echo " found glu.dll" else echo " Can't find glu.dll, assuming it's someplace" fi echo " adding -lglu" LIBS="$LIBS -lglu" if [[ -f `pwd`/Win32/opengl.dll ]]; then echo " found opengl.dll" else echo " Can't find opengl.dll, assuming it's somplace" fi echo " adding -lopengl" LIBS="$LIBS -lopengl" echo " adding -luser32 -lgdi32" LIBS="$LIBS -luser32 -lgdi32" ac_cv_lib_glut_glutGetModifiers="yes" fi dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS( \ fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \ unistd.h windows.h winbase.h values.h ) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS( ftime gettimeofday mktime strstr rand random \ setitimer getitimer signal GetLocalTime rint ) if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then echo echo "Unable to find the necessary GL libraries." exit 1 fi AM_CONFIG_HEADER(Include/config.h) AC_OUTPUT( \ Makefile \ Include/Makefile \ Lib/Makefile \ Lib/Audio/Makefile \ Lib/Audio/src/Makefile \ Lib/Audio/example/Makefile \ Lib/Bucket/Makefile \ Lib/Debug/Makefile \ Lib/DEM/Makefile \ Lib/Math/Makefile \ Lib/PUI/Makefile \ Lib/XGL/Makefile \ Lib/zlib/Makefile \ Simulator/Makefile \ Simulator/Aircraft/Makefile \ Simulator/Astro/Makefile \ Simulator/Autopilot/Makefile \ Simulator/Cockpit/Makefile \ Simulator/Controls/Makefile \ Simulator/Flight/LaRCsim/Makefile \ Simulator/Flight/Slew/Makefile \ Simulator/Flight/Makefile \ Simulator/GUI/Makefile \ Simulator/Joystick/Makefile \ Simulator/Main/Makefile \ Simulator/Main/runfg \ Simulator/Main/runfg.bat \ Simulator/Makefile \ Simulator/Scenery/Makefile \ Simulator/Time/Makefile \ Simulator/Weather/Makefile \ Tools/Makefile \ Tools/Areas/Makefile \ Tools/AssemTris/Makefile \ Tools/Dem2node/Makefile \ Tools/DemInfo/Makefile \ Tools/DemRaw2ascii/Makefile \ Tools/FixNode/Makefile \ Tools/FixObj/Makefile \ Tools/SplitTris/Makefile \ Tools/Stripe_w/Makefile \ Tools/Tri2obj/Makefile \ Tools/Triangle/Makefile \ Tests/Makefile \ )