1998-04-03 22:35:10 +00:00
|
|
|
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
|
1998-07-30 23:40:42 +00:00
|
|
|
|
1998-10-17 01:32:35 +00:00
|
|
|
AC_INIT(Simulator/Aircraft/aircraft.cxx)
|
1998-04-03 22:35:10 +00:00
|
|
|
|
|
|
|
dnl Initialize the automake stuff
|
1998-10-25 10:54:30 +00:00
|
|
|
AM_INIT_AUTOMAKE(FlightGear, 0.56)
|
1998-04-03 22:35:10 +00:00
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
1998-07-30 23:40:42 +00:00
|
|
|
AC_PROG_RANLIB
|
1998-04-03 22:35:10 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
1998-07-30 23:40:42 +00:00
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
dnl Initialize libtool
|
1998-07-30 23:40:42 +00:00
|
|
|
dnl AM_PROG_LIBTOOL
|
1998-04-03 22:35:10 +00:00
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
dnl Initialize maintainer mode
|
1998-07-24 21:33:41 +00:00
|
|
|
dnl AM_MAINTAINER_MODE
|
1998-04-03 22:35:10 +00:00
|
|
|
|
1998-06-17 21:31:04 +00:00
|
|
|
dnl This is needed for AC_TRY_COMPILE later
|
1998-07-30 23:40:42 +00:00
|
|
|
dnl AC_ISC_POSIX
|
1998-06-17 21:31:04 +00:00
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
dnl Check to see if this `configure' is being run in the `Cygwin32' environment
|
1998-06-17 21:31:04 +00:00
|
|
|
dnl AM_CYGWIN32
|
|
|
|
|
1998-11-07 19:06:59 +00:00
|
|
|
dnl Specify if we want logging (testing build) or not (release build)
|
|
|
|
# set logging default value
|
|
|
|
# with_logging=yes
|
|
|
|
AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
|
|
|
|
if test "x$with_logging" = "xno" ; then
|
|
|
|
AC_DEFINE(FG_NDEBUG)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1998-08-22 01:16:40 +00:00
|
|
|
dnl specify if we are building with "checker"
|
|
|
|
AC_ARG_WITH(efence, [ --with-efence Specify if we are building with "electric-fence"])
|
|
|
|
|
|
|
|
if test "x$with_efence" = "xyes" ; then
|
|
|
|
echo "Building with efence"
|
|
|
|
LIBS= "$LIBS -lefence"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl specify the compiled flight model
|
|
|
|
AC_ARG_WITH(flight-model, [ --with-flight-model=xxx Specify the flight model (navion, cherokee)])
|
|
|
|
|
|
|
|
if test "x$with_flight_model" = "xcherokee" ; then
|
|
|
|
echo "Building with cherokee flight model"
|
|
|
|
else
|
|
|
|
echo "Building with navion flight model"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_CHEROKEE, test "x$with_flight_model" = "xcherokee")
|
|
|
|
|
|
|
|
dnl Let the Win32 user specify if they want to build with the SGI
|
|
|
|
dnl opengl.dll as opposed to the more standard openg32.dll
|
|
|
|
AC_ARG_WITH(sgi-opengl, [ --with-sgi-opengl Build against SGI's opengl.dll glu.dll and glut.dll])
|
|
|
|
|
1998-06-17 21:31:04 +00:00
|
|
|
dnl Check for MS Windows environment
|
|
|
|
AC_CHECK_HEADER(windows.h)
|
1998-04-03 22:35:10 +00:00
|
|
|
|
1998-06-05 18:14:01 +00:00
|
|
|
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.
|
|
|
|
|
1998-06-17 21:31:04 +00:00
|
|
|
dnl Check for external variables daylight and timezone.
|
|
|
|
AC_EXT_DAYLIGHT
|
|
|
|
AM_CONDITIONAL(HAVE_DAYLIGHT, test "$have_daylight" = yes )
|
1998-06-05 18:14:01 +00:00
|
|
|
|
1998-06-17 21:31:04 +00:00
|
|
|
AC_EXT_TIMEZONE
|
|
|
|
AM_CONDITIONAL(HAVE_TIMEZONE, test "$have_timezone" = yes )
|
1998-06-05 18:14:01 +00:00
|
|
|
|
1998-06-17 21:31:04 +00:00
|
|
|
dnl Check for Linux style audio support
|
1998-07-16 17:28:42 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_AUDIO_SUPPORT, \
|
1998-06-17 21:31:04 +00:00
|
|
|
test -r /usr/include/soundcard.h \
|
|
|
|
-o -r /usr/include/linux/soundcard.h \
|
|
|
|
-o -r /usr/include/machine/soundcard.h \
|
1998-07-30 23:40:42 +00:00
|
|
|
-o -r /usr/include/audio.h \
|
1998-06-17 21:31:04 +00:00
|
|
|
-o "x$ac_cv_header_windows_h" = "xyes" )
|
1998-06-03 00:41:53 +00:00
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_IRIX_AUDIO, test -r /usr/include/audio.h)
|
|
|
|
|
1998-07-16 17:28:42 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_WIN32_AUDIO, test "x$ac_cv_header_windows_h" = "xyes")
|
1998-05-29 20:29:32 +00:00
|
|
|
|
1998-10-25 10:54:30 +00:00
|
|
|
dnl Check for (currently Linux only style) joystick support
|
1998-10-27 02:13:59 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_LINUX_JOYSTICK, test -r /usr/include/linux/joystick.h )
|
|
|
|
|
1998-11-16 13:55:52 +00:00
|
|
|
dnl Enable serial support on Unix type systems
|
|
|
|
AM_CONDITIONAL(ENABLE_UNIX_SERIAL, test "x$ac_cv_header_windows_h" != "xyes")
|
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
dnl extra library and include directories
|
1998-06-05 18:14:01 +00:00
|
|
|
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"
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
1998-06-05 18:14:01 +00:00
|
|
|
wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
|
1998-04-03 22:35:10 +00:00
|
|
|
|
|
|
|
dnl Check for X11 (fancy)
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
1998-11-04 23:01:04 +00:00
|
|
|
null_LIBS="$LIBS"
|
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
AC_CHECK_LIB(m, cos)
|
1998-11-04 23:01:04 +00:00
|
|
|
|
|
|
|
base_LIBS="$LIBS"
|
|
|
|
LIBS="$null_LIBS"
|
|
|
|
|
|
|
|
# AC_CHECK_LIB(socket, socket)
|
1998-04-03 22:35:10 +00:00
|
|
|
AC_CHECK_LIB(X11, XCreateWindow)
|
|
|
|
AC_CHECK_LIB(Xext, XShmCreateImage)
|
|
|
|
AC_CHECK_LIB(Xi, XGetExtensionVersion)
|
1998-04-14 02:45:53 +00:00
|
|
|
AC_CHECK_LIB(ICE, IceOpenConnection)
|
|
|
|
AC_CHECK_LIB(SM, SmcOpenConnection)
|
|
|
|
AC_CHECK_LIB(Xt, XtMalloc)
|
1998-04-03 22:35:10 +00:00
|
|
|
AC_CHECK_LIB(Xmu, XmuLookupStandardColormap)
|
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
dnl check for OpenGL related libraries
|
|
|
|
|
|
|
|
if test "x$ac_cv_header_windows_h" != "xyes" ; then
|
|
|
|
dnl Reasonable stuff non-windoze variants ... :-)
|
1998-06-05 18:14:01 +00:00
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
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)
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
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
|
1998-07-16 17:28:42 +00:00
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
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
|
|
|
|
|
1998-08-20 15:09:09 +00:00
|
|
|
dnl check for glut
|
1998-07-30 23:40:42 +00:00
|
|
|
AC_CHECK_LIB(glut, glutGetModifiers)
|
1998-08-20 15:09:09 +00:00
|
|
|
|
1998-11-04 23:01:04 +00:00
|
|
|
dnl test for glutGameModeString, but avoid adding glut a second time into
|
|
|
|
dnl the list of libraries
|
|
|
|
save_LIBS="$LIBS"
|
1998-08-20 15:09:09 +00:00
|
|
|
AC_CHECK_LIB(glut, glutGameModeString)
|
1998-11-04 23:01:04 +00:00
|
|
|
LIBS="$save_LIBS"
|
1998-07-30 23:40:42 +00:00
|
|
|
else
|
|
|
|
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.
|
1998-04-03 22:35:10 +00:00
|
|
|
|
1998-05-29 20:29:32 +00:00
|
|
|
echo Win32 specific hacks...
|
1998-04-03 22:35:10 +00:00
|
|
|
AC_DEFINE(WIN32)
|
|
|
|
|
1998-07-30 23:40:42 +00:00
|
|
|
dnl force a failed check since we will be building under windoze
|
|
|
|
AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes")
|
|
|
|
|
1998-08-24 20:02:15 +00:00
|
|
|
if test "x$with_sgi_opengl" = "xyes" ; then
|
1998-07-30 23:40:42 +00:00
|
|
|
echo "Building with glut.dll, glu.dll, and opengl.dll"
|
|
|
|
WIN32_GLUT=glut
|
|
|
|
WIN32_GLU=glu
|
|
|
|
WIN32_OPENGL=opengl
|
|
|
|
else
|
|
|
|
echo "Building with glut32.dll, glu32.dll, and opengl32.dll"
|
|
|
|
WIN32_GLUT=glut32
|
|
|
|
WIN32_GLU=glu32
|
|
|
|
WIN32_OPENGL=opengl32
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f `pwd`/Win32/${WIN32_GLUT}.dll; then
|
|
|
|
echo " found ${WIN32_GLUT}.dll, adding -l${WIN32_GLUT}"
|
|
|
|
LIBS="$LIBS -l${WIN32_GLUT}"
|
1998-04-03 22:35:10 +00:00
|
|
|
else
|
1998-07-30 23:40:42 +00:00
|
|
|
echo " Cannot find ${WIN32_GLUT}.dll"
|
|
|
|
exit 1
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
1998-07-30 23:40:42 +00:00
|
|
|
|
|
|
|
if test -f `pwd`/Win32/${WIN32_GLU}.dll; then
|
|
|
|
echo " found ${WIN32_GLU}.dll"
|
1998-04-03 22:35:10 +00:00
|
|
|
else
|
1998-07-30 23:40:42 +00:00
|
|
|
echo " Can't find ${WIN32_GLU}.dll, assuming it's someplace"
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
1998-07-30 23:40:42 +00:00
|
|
|
echo " adding -l${WIN32_GLU}"
|
|
|
|
LIBS="$LIBS -l${WIN32_GLU}"
|
|
|
|
|
|
|
|
if test -f `pwd`/Win32/${WIN32_OPENGL}.dll; then
|
|
|
|
echo " found ${WIN32_OPENGL}.dll"
|
1998-04-03 22:35:10 +00:00
|
|
|
else
|
1998-07-30 23:40:42 +00:00
|
|
|
echo " Can't find ${WIN32_OPENGL}.dll, assuming it's somplace"
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
1998-07-30 23:40:42 +00:00
|
|
|
echo " adding -l${WIN32_OPENGL}"
|
|
|
|
LIBS="$LIBS -l${WIN32_OPENGL}"
|
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
echo " adding -luser32 -lgdi32"
|
|
|
|
LIBS="$LIBS -luser32 -lgdi32"
|
|
|
|
ac_cv_lib_glut_glutGetModifiers="yes"
|
1998-08-20 15:09:09 +00:00
|
|
|
ac_cv_lib_glut_glutGameModeString="yes"
|
1998-04-03 22:35:10 +00:00
|
|
|
fi
|
|
|
|
|
1998-11-04 23:01:04 +00:00
|
|
|
opengl_LIBS="$LIBS"
|
|
|
|
LIBS="$null_LIBS"
|
|
|
|
|
|
|
|
AC_SUBST(base_LIBS)
|
|
|
|
AC_SUBST(opengl_LIBS)
|
|
|
|
|
|
|
|
|
1998-04-03 22:35:10 +00:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
1998-07-06 02:37:17 +00:00
|
|
|
AC_CHECK_HEADERS( \
|
|
|
|
fcntl.h getopt.h malloc.h stdlib.h sys/time.h sys/timeb.h \
|
1998-04-03 22:35:10 +00:00
|
|
|
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 \
|
1998-08-19 17:24:21 +00:00
|
|
|
setitimer getitimer signal GetLocalTime rint getrusage )
|
1998-04-03 22:35:10 +00:00
|
|
|
|
|
|
|
if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
|
|
|
|
echo
|
1998-08-05 00:18:49 +00:00
|
|
|
echo "Unable to find the necessary OpenGL or GLUT libraries."
|
|
|
|
echo "See config.log for automated test details and results ..."
|
1998-04-03 22:35:10 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
1998-08-20 15:09:09 +00:00
|
|
|
if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
|
|
|
|
echo
|
|
|
|
echo "Your version of glut doesn't support game mode."
|
|
|
|
echo "You need to fetch and install the latest version of glut from:"
|
|
|
|
echo
|
|
|
|
echo " http://reality.sgi.com/opengl/glut3/glut3.html"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
1998-04-14 02:45:53 +00:00
|
|
|
AM_CONFIG_HEADER(Include/config.h)
|
1998-04-03 22:35:10 +00:00
|
|
|
|
|
|
|
AC_OUTPUT( \
|
|
|
|
Makefile \
|
1998-04-14 02:45:53 +00:00
|
|
|
Include/Makefile \
|
|
|
|
Lib/Makefile \
|
1998-06-01 17:48:47 +00:00
|
|
|
Lib/Audio/Makefile \
|
1998-06-17 21:31:04 +00:00
|
|
|
Lib/Audio/src/Makefile \
|
|
|
|
Lib/Audio/example/Makefile \
|
1998-04-14 02:45:53 +00:00
|
|
|
Lib/Bucket/Makefile \
|
1998-04-18 03:57:08 +00:00
|
|
|
Lib/Debug/Makefile \
|
1998-04-14 02:45:53 +00:00
|
|
|
Lib/DEM/Makefile \
|
1998-08-22 01:16:40 +00:00
|
|
|
Lib/gpc/Makefile \
|
1998-04-18 03:57:08 +00:00
|
|
|
Lib/Math/Makefile \
|
1998-09-01 18:58:56 +00:00
|
|
|
Lib/Misc/Makefile \
|
1998-06-12 14:25:26 +00:00
|
|
|
Lib/PUI/Makefile \
|
1998-04-14 02:45:53 +00:00
|
|
|
Lib/XGL/Makefile \
|
1998-04-18 03:57:08 +00:00
|
|
|
Lib/zlib/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Simulator/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Aircraft/Makefile \
|
1998-08-25 16:53:41 +00:00
|
|
|
Simulator/Airports/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Astro/Makefile \
|
1998-04-14 02:45:53 +00:00
|
|
|
Simulator/Autopilot/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Cockpit/Makefile \
|
|
|
|
Simulator/Controls/Makefile \
|
|
|
|
Simulator/Flight/LaRCsim/Makefile \
|
|
|
|
Simulator/Flight/Slew/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Simulator/Flight/Makefile \
|
1998-06-12 14:25:26 +00:00
|
|
|
Simulator/GUI/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Joystick/Makefile \
|
|
|
|
Simulator/Main/Makefile \
|
1998-08-24 20:47:24 +00:00
|
|
|
Simulator/Main/runfgfs \
|
|
|
|
Simulator/Main/runfgfs.bat \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Makefile \
|
1998-08-25 16:53:41 +00:00
|
|
|
Simulator/Objects/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Scenery/Makefile \
|
1998-11-16 13:55:52 +00:00
|
|
|
Simulator/Serial/Makefile \
|
1998-04-06 15:56:04 +00:00
|
|
|
Simulator/Time/Makefile \
|
|
|
|
Simulator/Weather/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Tools/Makefile \
|
1998-07-03 14:34:39 +00:00
|
|
|
Tools/Areas/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Tools/AssemTris/Makefile \
|
|
|
|
Tools/Dem2node/Makefile \
|
1998-06-05 18:14:01 +00:00
|
|
|
Tools/DemInfo/Makefile \
|
1998-04-18 03:57:08 +00:00
|
|
|
Tools/DemRaw2ascii/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Tools/FixNode/Makefile \
|
|
|
|
Tools/FixObj/Makefile \
|
1998-08-29 13:06:39 +00:00
|
|
|
Tools/GenAirports/Makefile \
|
1998-10-02 21:41:23 +00:00
|
|
|
Tools/Makedir/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Tools/SplitTris/Makefile \
|
1998-06-12 00:53:21 +00:00
|
|
|
Tools/Stripe_w/Makefile \
|
1998-04-09 01:43:36 +00:00
|
|
|
Tools/Tri2obj/Makefile \
|
|
|
|
Tools/Triangle/Makefile \
|
1998-04-25 14:59:29 +00:00
|
|
|
Tests/Makefile \
|
1998-06-05 18:14:01 +00:00
|
|
|
)
|
1998-08-03 22:16:18 +00:00
|
|
|
|
1998-08-24 20:47:24 +00:00
|
|
|
AC_OUTPUT_COMMANDS([chmod 755 Simulator/Main/runfgfs])
|
1998-11-04 23:01:04 +00:00
|
|
|
|