summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-04-25 13:34:43 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-04-25 13:34:43 +0000
commitd3afe9c10a216843c5ad01be1c373251464c85c0 (patch)
treef1e6fe8ae2282305bf1f358c62bb7004aa3549d8
parent804317fd5e83e846507e975179db01f1ac70eca5 (diff)
Don't use GCC c++ or g++ compiler to build programs, use gcc instead.
Some more anti-warning stuff... Added --disable-gl option to disable OpenGL support + check. Added code to stop the configuration if X11 could not be found. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES5
-rw-r--r--README1
-rw-r--r--configure.in73
-rw-r--r--src/fl_call_main.c6
-rw-r--r--test/CubeView.cxx10
5 files changed, 63 insertions, 32 deletions
diff --git a/CHANGES b/CHANGES
index 35b7a459c..855bcebfc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,8 @@ CHANGES SINCE FLTK 1.0.10
DLL". You'll need to change your project settings to
use this as well or you'll get errors.
+ - Added new --disable-gl option to configure script.
+
- Added new const const pointer versions of pixmap
functions to eliminate an annoying pointer warning
message that was generated by the Sun and other C++
@@ -90,6 +92,9 @@ CHANGES SINCE FLTK 1.0.10
- Fl_Gl_Window leaked memory under WIN32.
+ - The colbrowser demo was missing an include file when
+ compiled under OS/2.
+
CHANGES SINCE FLTK 1.0.9
diff --git a/README b/README
index 9ddc6e3eb..6a77c026d 100644
--- a/README
+++ b/README
@@ -53,6 +53,7 @@ BUILDING AND INSTALLING FLTK UNDER UNIX
need. Type "./configure <options>". Options include:
--enable-debug - Enable debugging code & symbols
+ --disable-gl - Disable OpenGL support
--enable-shared - Enable generation of shared libraries
--bindir=/path - Set the location for executables
diff --git a/configure.in b/configure.in
index 95dfc831d..4548be8a6 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
-dnl "$Id: configure.in,v 1.33.2.26 2001/04/13 19:13:14 easysw Exp $"
+dnl "$Id: configure.in,v 1.33.2.27 2001/04/25 13:34:43 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@@ -57,6 +57,7 @@ CXXFLAGS="${CXXFLAGS:=}"
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],[if eval "test x$enable_debug = xyes"; then
DEBUGFLAG="-g "
fi])
+AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [default=yes]])
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[
if eval "test x$enable_shared = xyes"; then
PICFLAG=1
@@ -157,27 +158,42 @@ AC_CHECK_FUNCS(vsprintf)
AC_CHECK_HEADER(strings.h)
AC_CHECK_FUNCS(strcasecmp)
+dnl Check for X11...
AC_PATH_XTRA
-dnl# echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
+
+if test x$no_x = xyes; then
+ AC_MSG_ERROR(Configure could not find required X11 libraries, aborting.)
+fi
+
+if test "x$X_PRE_LIBS" != x; then
+ AC_MSG_WARN(Ignoring libraries \"$X_PRE_LIBS\" requested by configure.)
+fi
+
LIBS="$LIBS$X_LIBS"
CFLAGS="$CFLAGS$X_CFLAGS"
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
-dnl My test to see if OpenGL is on this machine:
+dnl Check for OpenGL unless disabled...
GLLIB=
-AC_CHECK_HEADER(GL/gl.h,
- AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \
- AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGLU -lMesaGL",,\
- -lX11 -lXext $X_EXTRA_LIBS -lm), \
- -lX11 -lXext $X_EXTRA_LIBS -lm)
-)
+
+if test x$enable_gl != xno; then
+ AC_CHECK_HEADER(GL/gl.h,
+ AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \
+ AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGLU -lMesaGL",,\
+ -lX11 -lXext $X_EXTRA_LIBS -lm), \
+ -lX11 -lXext $X_EXTRA_LIBS -lm)
+ )
+fi
+
AC_SUBST(GLLIB)
+dnl Check for the Xdbe extension...
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
if test "$uname" != "SunOS"; then
AC_DEFINE(HAVE_XDBE)
fi)
+dnl Check for overlay visuals...
AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
ac_cv_have_overlay=yes
@@ -234,14 +250,20 @@ dnl do this last so messing with switches does not break tests
MAKEDEPEND="\$(CXX) -M"
if test -n "$GXX"; then
+ # Use gcc instead of c++ or g++, since we don't need the C++
+ # library to depend on...
+ CXX="$CC"
CFLAGS="-Wall $CFLAGS"
CXXFLAGS="-Wall $CXXFLAGS"
if test -z "$DEBUGFLAG"; then
- # Note: Can't use -fomit-frame-pointer - prevents tools like
+ #
+ # Note: Can't use -fomit-frame-pointer - prevents tools like
# libsafe from working!
- # WAS: I removed the -fforce-mem, -fforce-addr, -fcaller-saves
- # They all seemed to make either no difference or enlarged
- # the code by a few hundred bytes.
+ #
+ # Don't use -fforce-mem, -fforce-addr, or -fcaller-saves.
+ # They all seem to make either no difference or enlarge
+ # the code by a few hundred bytes.
+ #
CFLAGS="-O2 $CFLAGS"
CXXFLAGS="-O2 $CXXFLAGS"
fi
@@ -251,26 +273,26 @@ if test -n "$GXX"; then
fi
# See if GCC supports -fno-exceptions...
- echo "Testing if GCC supports -fno-exceptions..."
+ AC_MSG_CHECKING(Testing if GCC supports -fno-exceptions...)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-exceptions"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fno-exceptions"
- echo "Congratulations - your GCC supports exceptions; disabling them for FLTK...",
+ AC_MSG_RESULT(yes; disabling them for FLTK...),
CFLAGS="$OLDCFLAGS"
- echo "GCC does not support exceptions...")
+ AC_MSG_RESULT(no))
# See if we are running Solaris; if so, try the -fpermissive option...
if test $uname = SunOS; then
- echo "Testing if GCC supports -fpermissive..."
+ AC_MSG_CHECKING(Testing if GCC supports -fpermissive...)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fpermissive"
AC_TRY_COMPILE(,,
CXXFLAGS="$CXXFLAGS -fpermissive"
- echo "Enabling -fpermissive to work around X header bugs...",
+ AC_MSG_RESULT(yes),
CFLAGS="$OLDCFLAGS"
- echo "The -fpermissive option is not required by your GCC...")
+ AC_MSG_RESULT(no))
fi
else
case `(uname) 2>/dev/null` in
@@ -281,12 +303,15 @@ else
# We are running IRIX 6.2 or higher; uncomment the following
# lines if you don't have IDO 7.2 or higher:
#
- # CXX="CC -n32"
- # CC="cc -n32"
- # LD="ld -n32"
+ # CXX="CC -n32 -mips3"
+ # CC="cc -n32 -mips3"
+ # LD="ld -n32 -mips3"
# MAKEDEPEND="CC -M"
- echo "FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI -n32"
+ if test "x`grep abi=n32 /etc/compiler.defaults`" = x; then
+ AC_MSG_WARN(FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI \"-n32 -mips3\")
+ fi
+
CFLAGS="-fullwarn $CFLAGS"
CXXFLAGS="-fullwarn $CXXFLAGS"
else
@@ -346,5 +371,5 @@ AC_CONFIG_HEADER(config.h:configh.in)
AC_OUTPUT(makeinclude)
dnl
-dnl End of "$Id: configure.in,v 1.33.2.26 2001/04/13 19:13:14 easysw Exp $".
+dnl End of "$Id: configure.in,v 1.33.2.27 2001/04/25 13:34:43 easysw Exp $".
dnl
diff --git a/src/fl_call_main.c b/src/fl_call_main.c
index 65fc61404..061b29d3e 100644
--- a/src/fl_call_main.c
+++ b/src/fl_call_main.c
@@ -1,5 +1,5 @@
/*
- * "$Id: fl_call_main.c,v 1.1.2.10 2001/04/13 19:07:40 easysw Exp $"
+ * "$Id: fl_call_main.c,v 1.1.2.11 2001/04/25 13:34:43 easysw Exp $"
*
* Copyright 1998-2001 by Bill Spitzak and others.
*
@@ -81,10 +81,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#else
/* This code to prevent "empty translation unit" or similar warnings... */
-static void dummy(void) {}
+static void dummy(void) {dummy();}
#endif
/*
- * End of "$Id: fl_call_main.c,v 1.1.2.10 2001/04/13 19:07:40 easysw Exp $".
+ * End of "$Id: fl_call_main.c,v 1.1.2.11 2001/04/25 13:34:43 easysw Exp $".
*/
diff --git a/test/CubeView.cxx b/test/CubeView.cxx
index b54fcfa9d..e45e27ddc 100644
--- a/test/CubeView.cxx
+++ b/test/CubeView.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: CubeView.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $"
+// "$Id: CubeView.cxx,v 1.4.2.4 2001/04/25 13:34:43 easysw Exp $"
//
// CubeView class implementation for the Fast Light Tool Kit (FLTK).
//
@@ -55,7 +55,7 @@ CubeView::CubeView(int x,int y,int w,int h,const char *l)
label("OpenGL is required for this demo to operate.");
align(FL_ALIGN_WRAP | FL_ALIGN_INSIDE);
#endif /* !HAVE_GL */
-};
+}
#if HAVE_GL
void CubeView::drawCube() {
@@ -139,7 +139,7 @@ void CubeView::drawCube() {
glVertex3fv(boxv3);
glVertex3fv(boxv7);
glEnd();
-};//drawCube
+}//drawCube
void CubeView::draw() {
if (!valid()) {
@@ -161,9 +161,9 @@ void CubeView::draw() {
drawCube();
glPopMatrix();
-};
+}
#endif /* HAVE_GL */
//
-// End of "$Id: CubeView.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $".
+// End of "$Id: CubeView.cxx,v 1.4.2.4 2001/04/25 13:34:43 easysw Exp $".
//