1
0
Fork 0

Additional build system tweaks.

This commit is contained in:
curt 2002-09-03 01:12:26 +00:00
parent 9de48125cc
commit 1dfb58783c
6 changed files with 40 additions and 23 deletions

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

@ -53,9 +53,13 @@ AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
# Determine version of automake ... important becuase of # Determine version of automake ... important becuase 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/\.//g'` AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\.\([0-9]*\).*/\1/'`
if test $AUTO_MAKE_VERSION -lt 15; then if test $AUTO_MAKE_VERSION -lt 15; then
echo "You need to upgrade your automake to version 1.5 or newer" 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 exit 1
fi fi
@ -354,8 +358,8 @@ AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
# Check for "plib" without which we cannot go on # 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 "the FGFS simulator!"
@ -366,15 +370,28 @@ if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
exit exit
fi fi
# needed for plib 1.3.x and later AC_MSG_CHECKING([for plib 1.6.0 or newer])
AC_CHECK_LIB(plibul, ulInit,,,) AC_TRY_RUN([
#include <plib/ul.h>
if test "x$ac_cv_lib_plibul_ulInit" != "xyes"; then #define MIN_PLIB_VERSION 160
echo
echo "You have an old version of plib, you need to upgrade to at least" int main() {
echo "plib-1.4.2" int major, minor, micro;
exit
fi 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)
)
# If we get here then plib is available, so force use of plib joystick lib # If we get here then plib is available, so force use of plib joystick lib
AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support]) AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support])
@ -402,7 +419,7 @@ if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
exit exit
fi fi
AC_MSG_CHECKING([for proper simgear version]) AC_MSG_CHECKING([for simgear 0.0.19 or newer])
AC_TRY_RUN([ AC_TRY_RUN([
#include <stdio.h> #include <stdio.h>
@ -456,8 +473,7 @@ if test "x$ac_cv_header_mk4_h" != "xyes"; then
exit exit
fi fi
AC_MSG_CHECKING([for proper metakit version]) AC_MSG_CHECKING([for metakit 2.4.3 or newer])
saved_LIBS="$LIBS" saved_LIBS="$LIBS"
LIBS="$saved_LIBS -lmk4" LIBS="$saved_LIBS -lmk4"
AC_TRY_RUN([ AC_TRY_RUN([

View file

@ -1,4 +1,6 @@
You *must* have plib version 1.4.x or later installed on your system [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 to build FlightGear!" Flight Gear is no longer compatible with the
earlier versions of the library. earlier versions of the library.
@ -11,6 +13,5 @@ Build notes:
You should be able to just run "./configure" to configure the package 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 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 install". By default, plib installs itself into /usr so if you don't
like this, be sure to specify an alternate prefix such as like this, be sure to specify an alternate prefix such as --prefix=/usr/local
--prefix=/usr/local

View file

@ -6,10 +6,10 @@ bin_PROGRAMS = js_demo fgjs
js_demo_SOURCES = js_demo.cxx js_demo_SOURCES = js_demo.cxx
js_demo_LDADD = $(audio_LIBS) js_demo_LDADD = $(audio_LIBS) -lplibul
fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h
fgjs_LDADD = $(audio_LIBS) fgjs_LDADD = $(audio_LIBS) -lplibul
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src

View file

@ -73,7 +73,7 @@ fgfs_LDADD = \
-lsgmath -lsgbucket -lsgdebug -lsgmagvar -lsgmisc -lsgxml \ -lsgmath -lsgbucket -lsgdebug -lsgmagvar -lsgmisc -lsgxml \
-lsgserial \ -lsgserial \
$(THREAD_LIBS) \ $(THREAD_LIBS) \
-lplibssgaux -lplibpu -lplibfnt -lplibnet -lplibssg -lplibsg \ -lplibpu -lplibfnt -lplibnet -lplibssg -lplibsg -lplibul \
-lmk4 -lz \ -lmk4 -lz \
$(opengl_LIBS) \ $(opengl_LIBS) \
$(audio_LIBS) $(audio_LIBS)

View file

@ -21,4 +21,4 @@ test_text_SOURCES = test-text.cxx
test_text_LDADD = $(base_LIBS) test_text_LDADD = $(base_LIBS)
test_up_SOURCES = test-up.cxx test_up_SOURCES = test-up.cxx
test_up_LDADD = -lsgmath -lsgdebug -lplibsg $(base_LIBS) test_up_LDADD = -lsgmath -lsgdebug -lplibsg -lplibul $(base_LIBS)