Additional configure changes.

This commit is contained in:
curt 2002-09-02 22:18:31 +00:00
parent c44ef2126c
commit e809eee896
4 changed files with 57 additions and 19 deletions

16
README.plib Normal file
View File

@ -0,0 +1,16 @@
[This file is mirrored in both the FlightGear and SimGear packages.]
You *must* have plib version 1.6.0 or later installed on your system
to build FlightGear!" Flight Gear is no longer compatible with the
earlier versions of the library.
You can get the latest version of plib from:
http://plib.sourceforge.net
Build notes:
You should be able to just run "./configure" to configure the package
and use all of plib's defaults. Then run "make" followed by "make
install". By default, plib installs itself into /usr so if you don't
like this, be sure to specify an alternate prefix such as --prefix=/usr/local

View File

@ -2,7 +2,7 @@
OSTYPE=`uname -s` OSTYPE=`uname -s`
MACHINE=`uname -m` MACHINE=`uname -m`
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[0-9]$//' | sed -e 's/\.//'` AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\.\([0-9]*\).*/\1/'`
echo "Host info: $OSTYPE $MACHINE" echo "Host info: $OSTYPE $MACHINE"
echo -n " automake: `automake --version | head -1 | awk '{print $4}'`" echo -n " automake: `automake --version | head -1 | awk '{print $4}'`"

View File

@ -56,9 +56,15 @@ fi
# Determine version of automake ... important because of # Determine version of automake ... important because of
# incompatibilities between versions # incompatibilities between versions
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[[0-9]]$//' | sed -e 's/\.//'` AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\.\([0-9]*\).*/\1/'`
AM_CONDITIONAL(ANCIENT_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 14) if test $AUTO_MAKE_VERSION -lt 15; then\
AM_CONDITIONAL(OLD_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 15) echo ""
echo "You need to upgrade to automake version 1.5 or greater."
echo "Most distributions have packages available to install or you can"
echo "find the source for the most recent version at"
echo "ftp://ftp.gnu.org/gnu/automake"
exit 1
fi
# set logging default value # set logging default value
# with_logging=yes # with_logging=yes
@ -113,7 +119,7 @@ AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
if test "x$HOSTTYPE" != "xmacintosh" -a "x$is_mingw" != "xyes"; then if test "x$HOSTTYPE" != "xmacintosh" -a "x$is_mingw" != "xyes"; then
dnl extra library and include directories dnl extra library and include directories
EXTRA_DIRS="/usr/local /usr/local/plib /usr/X11R6" EXTRA_DIRS="/usr/local /usr/X11R6"
if test -d /opt/X11R6 ; then if test -d /opt/X11R6 ; then
EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6" EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
@ -271,11 +277,11 @@ AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
dnl Check for "plib" without which we cannot go on dnl Check for "plib" without which we cannot go on
AC_CHECK_HEADER(plib/pu.h) AC_CHECK_HEADER(plib/ul.h)
if test "x$ac_cv_header_plib_pu_h" != "xyes"; then if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
echo echo
echo "You *must* have the plib library installed on your system to build" echo "You *must* have the plib library installed on your system to build"
echo "the FGFS simulator!" echo "SimGear!"
echo echo
echo "Please see README.plib for more details." echo "Please see README.plib for more details."
echo echo
@ -283,10 +289,28 @@ if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
exit exit
fi fi
AC_CHECK_HEADER(plib/ssgaLensFlare.h) AC_MSG_CHECKING([for plib 1.6.0 or newer])
if test "x$ac_cv_header_plib_ssgaLensFlare_h" = "xyes"; then AC_TRY_RUN([
AC_DEFINE([FG_CHEESY_LENS_FLARE], 1, [Define for cheesy lens flare effect]) #include <plib/ul.h>
fi
#define MIN_PLIB_VERSION 160
int main() {
int major, minor, micro;
if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
return -1;
}
return 0;
}
],
AC_MSG_RESULT(yes),
[AC_MSG_RESULT(wrong version);
AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
AC_MSG_RESULT(yes)
)
dnl Check for system installed metakit dnl Check for system installed metakit
AC_CHECK_HEADER(mk4.h) AC_CHECK_HEADER(mk4.h)

View File

@ -37,7 +37,10 @@
#include <plib/sg.h> #include <plib/sg.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#ifdef FG_PLIB_SUPPORTS_LENS_FLARE // define the following to enable a cheesy lens flare effect for the sun
// #define FG_TEST_CHEESY_LENS_FLARE
#ifdef FG_TEST_CHEESY_LENS_FLARE
# include <plib/ssgaLensFlare.h> # include <plib/ssgaLensFlare.h>
#endif #endif
@ -314,14 +317,9 @@ ssgBranch * SGSun::build( SGPath path, double sun_size ) {
sun_transform->addKid( halo ); sun_transform->addKid( halo );
sun_transform->addKid( orb ); sun_transform->addKid( orb );
#if 0 #ifdef FG_TEST_CHEESY_LENS_FLARE
// enable this code to add a super cheesy lens flare effect to the sun.
# ifdef FG_PLIB_SUPPORTS_LENS_FLARE
// cheesy lens flair // cheesy lens flair
sun_transform->addKid( new ssgaLensFlare ); sun_transform->addKid( new ssgaLensFlare );
# endif
#endif #endif
return sun_transform; return sun_transform;