Improved missing package recognition in Unix configure

ver1_5_1
Deon Ramsey 2002-02-18 21:36:19 +00:00
parent c5c4dad167
commit 8f61f81ec2
6 changed files with 76 additions and 19 deletions

View File

@ -422,4 +422,5 @@ Code:
* Fixed specular lighting for 3DS meshes, but correcting the mapping of 3DS * Fixed specular lighting for 3DS meshes, but correcting the mapping of 3DS
shininess to OpenGL specular exponents. shininess to OpenGL specular exponents.
* Multi Resolution Texturing. (dramsey) * Multi Resolution Texturing. (dramsey)
* Unix: Much improved recognition of missing packages in configure. (dramsey)

13
INSTALL
View File

@ -2,9 +2,12 @@ Celestia Install instructions for UNIX
-------------------------------------- --------------------------------------
You need to have the following components installed before Celestia You need to have the following components installed before Celestia
will build: OpenGL (tested with Mesa 3.4), glut, libjpeg, and libpng. will build: OpenGL (tested with Mesa 3.4), glu, glut, libjpeg, and libpng.
Should you have a package based installation (most Linux distributions these
days are), you will also need to install the devel packages for your OpenGL,
glu, glut and glibc packages.
Then, assuming you've collected all the necessary libraries, here's OK, assuming you've collected all the necessary libraries, here's
what you need to do to build and run Celestia: what you need to do to build and run Celestia:
configure configure
@ -24,7 +27,7 @@ depending in your Installation Distributions you may also need other packages
containing various information needed by the build process, for instance, to containing various information needed by the build process, for instance, to
build under SUSE Linux, you will also need to have the gtk-devel package build under SUSE Linux, you will also need to have the gtk-devel package
installed, and having GNOME's devel packages present also is probably not installed, and having GNOME's devel packages present also is probably not
a bad idea. a bad idea (in fact, currently absolutely necessary for the GTK version).
Celestia will be installed into /usr/local by default, with data files landing Celestia will be installed into /usr/local by default, with data files landing
in /usr/local/share/Celestia , but you may specify a new location with the in /usr/local/share/Celestia , but you may specify a new location with the
@ -35,6 +38,6 @@ in /usr/local/share/Celestia , but you may specify a new location with the
All the other usual configure parameters apply; you may see which options All the other usual configure parameters apply; you may see which options
are available using 'configure --help' are available using 'configure --help'
Chris Laurel Chris Laurel & Deon Ramsey
claurel@.shatters.net claurel@.shatters.net dramsey@users.sourceforge.net

View File

@ -154,7 +154,9 @@ main ()
echo "*** full path to gtk-config. If you are running Linux or some-" echo "*** full path to gtk-config. If you are running Linux or some-"
echo "*** thing similar, you may need to install the gtk-devel package" echo "*** thing similar, you may need to install the gtk-devel package"
echo "*** (or some other package with a similar name) in order to get" echo "*** (or some other package with a similar name) in order to get"
echo "*** a working gtk-config." echo "*** a working gtk-config. If in fact you don't have or want GTK,"
echo "*** disregard this message. Note that configuring with"
echo "*** '--without-gtk' will turn off this check and message."
else else
if test -f conf.gtktest ; then if test -f conf.gtktest ; then
: :

View File

@ -110,25 +110,44 @@ GTK_LIBS=""
GTKGL_LIBS="" GTKGL_LIBS=""
GTK_CFLAGS="" GTK_CFLAGS=""
AM_PATH_GTK(1.2.0,enable_gtk_default="yes",enable_gtk_default="no") AC_MSG_CHECKING([whether to disable GTK.])
if test "$enable_gtk_default" == "yes" ; then
OLD_LIBS="$LIBS"
LIBS="$LIBS $GTK_LIBS -lGL"
AC_CHECK_LIB(gtkgl,gdk_gl_query,,enable_gtk_default="no")
LIBS="$OLD_LIBS"
fi
AC_MSG_CHECKING([whether to use GTK.])
AC_ARG_WITH(gtk, [ --with-gtk Use Gtk for an enhanced GUI], AC_ARG_WITH(gtk, [ --with-gtk Use Gtk for an enhanced GUI],
enable_gtk="$withval", enable_gtk="$enable_gtk_default") enable_gtk="$withval";enable_by_default="no", enable_gtk="yes";enable_by_default="yes")
AC_MSG_RESULT($enable_gtk)
if test "$enable_gtk" == "yes" ; then if test "$enable_gtk" == "yes" ; then
AC_MSG_RESULT(no, so try to find GTK)
AM_PATH_GTK(1.2.0,enable_gtk="yes",enable_gtk="no")
dnl Complain only if the user insisted we do GTK
if test "$enable_by_default" == "no" -a "$enable_gtk" == "no"; then
AC_MSG_ERROR(Unable to find GTK)
fi
else
AC_MSG_RESULT(yes)
fi
if test "$enable_gtk" == "yes" ; then
OLD_LIBS="$LIBS"
LIBS="$LIBS $GTK_LIBS -lGL"
AC_CHECK_LIB(gtkgl,gdk_gl_query,,enable_gtk="no")
dnl Complain only if the user insisted we do GTK
if test "$enable_by_default" == "no" -a "$enable_gtk" == "no"; then
AC_MSG_ERROR(Unable to find gtkglarea)
fi
fi
if test "$enable_gtk" == "yes" ; then
LIBS="$OLD_LIBS"
GNOME_INIT GNOME_INIT
GNOME_COMPILE_WARNINGS GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS GNOME_X_CHECKS
GTKGL_LIBS=-lgtkgl GTKGL_LIBS=-lgtkgl
else else
if test "$enable_by_default" == "yes" ; then
AC_MSG_WARN(Disabled GTK GUI because of missing necessary packages)
fi
dnl Check for X11. dnl Check for X11.
AC_PATH_XTRA AC_PATH_XTRA
@ -143,6 +162,16 @@ CXXFLAGS="$CXXFLAGS $CELESTIAFLAGS $CELESTIA_CXXFLAGS $GTK_CFLAGS $GNOME_CFLAGS
LIBS="$LIBS $CELESTIALIBS $GTK_LIBS $GNOME_LIBS $GNOMEUI_LIBS $GTKGL_LIBS" LIBS="$LIBS $CELESTIALIBS $GTK_LIBS $GNOME_LIBS $GNOMEUI_LIBS $GTKGL_LIBS"
LDFLAGS="$LDFLAGS $GNOME_LIBDIR" LDFLAGS="$LDFLAGS $GNOME_LIBDIR"
dnl Check for OpenGL headers first.
AC_CHECK_HEADERS(GL/gl.h,,AC_MSG_ERROR([[No gl.h found.\
Usually, this means that you either have no OpenGL library on your system,\
or if you are using a package based distribution, that you have failed to\
install the corresponding development package for your library. If for\
instance you have Mesa installed, you will also have to install the\
mesa-devel package (or something named similarly). Also, if in fact it *WAS*\
the devel package missing, make sure you have the devel packages for GLU and\
GLUT installed as they will also be needed.]]))
dnl Check for OpenGL. Taken partly from the plib sources. dnl Check for OpenGL. Taken partly from the plib sources.
AC_CHECK_LIB(GL,glNewList) AC_CHECK_LIB(GL,glNewList)
@ -152,6 +181,16 @@ if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
AC_MSG_ERROR(GL library was not found)) AC_MSG_ERROR(GL library was not found))
fi fi
dnl Check for GLU headers.
AC_CHECK_HEADERS(GL/glu.h,,AC_MSG_ERROR([[No glu.h found.\
Usually, this means that you either have no GLU library on your system,\
or if you are using a package based distribution, that you have failed to\
install the corresponding development package for your library. If for\
instance you have MesaGLU installed, you will also have to install the\
mesaglu-devel package (or something named similarly). It is also possible\
that you have the xf86glu package installed, in which case you'll need the\
xf86glu-devel package or similar.]]))
AC_CHECK_LIB(GLU,gluLookAt) AC_CHECK_LIB(GLU,gluLookAt)
if test "x$ac_cv_lib_GLU_gluLookAt" = "xno"; then if test "x$ac_cv_lib_GLU_gluLookAt" = "xno"; then
@ -161,6 +200,14 @@ if test "x$ac_cv_lib_GLU_gluLookAt" = "xno"; then
fi fi
dnl Check for GLUT headers first.
AC_CHECK_HEADERS(GL/glut.h,,AC_MSG_ERROR([[No glut.h found.\
Usually, this means that you either have no GLUT library on your system,\
or if you are using a package based distribution, that you have failed to\
install the corresponding development package for your library. If for\
instance you have Mesa installed, you will also have to install the\
mesaglut-devel package (or something named similarly).]]))
dnl Check for GLUT. dnl Check for GLUT.
AC_CHECK_LIB(glut, glutKeyboardUpFunc,, AC_CHECK_LIB(glut, glutKeyboardUpFunc,,
AC_MSG_ERROR(GLUT library version >= 3.7 not found)) AC_MSG_ERROR(GLUT library version >= 3.7 not found))
@ -178,7 +225,7 @@ dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(GL/gl.h GL/glut.h) #AC_CHECK_HEADERS(GL/gl.h GL/glut.h)
# AC_DEFINE(TEXTURE_DIR,"textures") # AC_DEFINE(TEXTURE_DIR,"textures")
# AC_DEFINE(FONT_DIR,"fonts") # AC_DEFINE(FONT_DIR,"fonts")

View File

@ -203,3 +203,7 @@ determining which stars from a StarDatabase are visible to an Observer. The
fairly simple trick used to help alleviate the problem involves only checking a fairly simple trick used to help alleviate the problem involves only checking a
portion of the database for visibility at each update. portion of the database for visibility at each update.
UNIX
----
To develop under Unix, you will probably need some of the following packages:
autoconf, automake, and of course the usual array of c++ compilers/linkers.

View File

@ -346,7 +346,7 @@ static void menuAbout()
{ {
const gchar* authors[] = { const gchar* authors[] = {
"Chris Laurel <claurel@shatters.net>", "Chris Laurel <claurel@shatters.net>",
"Deon Ramsey <miavir@furry.de>", "Deon Ramsey <dramsey@sourceforge.net>",
"Clint Weisbrod <cweisbrod@adelphia.net>", "Clint Weisbrod <cweisbrod@adelphia.net>",
NULL NULL
}; };