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
This commit is contained in:
parent
804317fd5e
commit
d3afe9c10a
5
CHANGES
5
CHANGES
@ -4,6 +4,8 @@ CHANGES SINCE FLTK 1.0.10
|
|||||||
DLL". You'll need to change your project settings to
|
DLL". You'll need to change your project settings to
|
||||||
use this as well or you'll get errors.
|
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
|
- Added new const const pointer versions of pixmap
|
||||||
functions to eliminate an annoying pointer warning
|
functions to eliminate an annoying pointer warning
|
||||||
message that was generated by the Sun and other C++
|
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.
|
- 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
|
CHANGES SINCE FLTK 1.0.9
|
||||||
|
|
||||||
|
|||||||
1
README
1
README
@ -53,6 +53,7 @@ BUILDING AND INSTALLING FLTK UNDER UNIX
|
|||||||
need. Type "./configure <options>". Options include:
|
need. Type "./configure <options>". Options include:
|
||||||
|
|
||||||
--enable-debug - Enable debugging code & symbols
|
--enable-debug - Enable debugging code & symbols
|
||||||
|
--disable-gl - Disable OpenGL support
|
||||||
--enable-shared - Enable generation of shared libraries
|
--enable-shared - Enable generation of shared libraries
|
||||||
|
|
||||||
--bindir=/path - Set the location for executables
|
--bindir=/path - Set the location for executables
|
||||||
|
|||||||
73
configure.in
73
configure.in
@ -1,7 +1,7 @@
|
|||||||
dnl -*- sh -*-
|
dnl -*- sh -*-
|
||||||
dnl the "configure" script is made from this by running GNU "autoconf"
|
dnl the "configure" script is made from this by running GNU "autoconf"
|
||||||
dnl
|
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
|
||||||
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
||||||
dnl
|
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
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],[if eval "test x$enable_debug = xyes"; then
|
||||||
DEBUGFLAG="-g "
|
DEBUGFLAG="-g "
|
||||||
fi])
|
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]],[
|
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[
|
||||||
if eval "test x$enable_shared = xyes"; then
|
if eval "test x$enable_shared = xyes"; then
|
||||||
PICFLAG=1
|
PICFLAG=1
|
||||||
@ -157,27 +158,42 @@ AC_CHECK_FUNCS(vsprintf)
|
|||||||
AC_CHECK_HEADER(strings.h)
|
AC_CHECK_HEADER(strings.h)
|
||||||
AC_CHECK_FUNCS(strcasecmp)
|
AC_CHECK_FUNCS(strcasecmp)
|
||||||
|
|
||||||
|
dnl Check for X11...
|
||||||
AC_PATH_XTRA
|
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"
|
LIBS="$LIBS$X_LIBS"
|
||||||
CFLAGS="$CFLAGS$X_CFLAGS"
|
CFLAGS="$CFLAGS$X_CFLAGS"
|
||||||
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
|
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
|
||||||
|
|
||||||
dnl My test to see if OpenGL is on this machine:
|
dnl Check for OpenGL unless disabled...
|
||||||
GLLIB=
|
GLLIB=
|
||||||
AC_CHECK_HEADER(GL/gl.h,
|
|
||||||
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \
|
if test x$enable_gl != xno; then
|
||||||
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGLU -lMesaGL",,\
|
AC_CHECK_HEADER(GL/gl.h,
|
||||||
-lX11 -lXext $X_EXTRA_LIBS -lm), \
|
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \
|
||||||
-lX11 -lXext $X_EXTRA_LIBS -lm)
|
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)
|
AC_SUBST(GLLIB)
|
||||||
|
|
||||||
|
dnl Check for the Xdbe extension...
|
||||||
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
|
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
|
||||||
if test "$uname" != "SunOS"; then
|
if test "$uname" != "SunOS"; then
|
||||||
AC_DEFINE(HAVE_XDBE)
|
AC_DEFINE(HAVE_XDBE)
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
dnl Check for overlay visuals...
|
||||||
AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
|
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
|
if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
|
||||||
ac_cv_have_overlay=yes
|
ac_cv_have_overlay=yes
|
||||||
@ -234,14 +250,20 @@ dnl do this last so messing with switches does not break tests
|
|||||||
MAKEDEPEND="\$(CXX) -M"
|
MAKEDEPEND="\$(CXX) -M"
|
||||||
|
|
||||||
if test -n "$GXX"; then
|
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"
|
CFLAGS="-Wall $CFLAGS"
|
||||||
CXXFLAGS="-Wall $CXXFLAGS"
|
CXXFLAGS="-Wall $CXXFLAGS"
|
||||||
if test -z "$DEBUGFLAG"; then
|
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!
|
# libsafe from working!
|
||||||
# WAS: I removed the -fforce-mem, -fforce-addr, -fcaller-saves
|
#
|
||||||
# They all seemed to make either no difference or enlarged
|
# Don't use -fforce-mem, -fforce-addr, or -fcaller-saves.
|
||||||
# the code by a few hundred bytes.
|
# They all seem to make either no difference or enlarge
|
||||||
|
# the code by a few hundred bytes.
|
||||||
|
#
|
||||||
CFLAGS="-O2 $CFLAGS"
|
CFLAGS="-O2 $CFLAGS"
|
||||||
CXXFLAGS="-O2 $CXXFLAGS"
|
CXXFLAGS="-O2 $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
@ -251,26 +273,26 @@ if test -n "$GXX"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# See if GCC supports -fno-exceptions...
|
# See if GCC supports -fno-exceptions...
|
||||||
echo "Testing if GCC supports -fno-exceptions..."
|
AC_MSG_CHECKING(Testing if GCC supports -fno-exceptions...)
|
||||||
OLDCFLAGS="$CFLAGS"
|
OLDCFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -fno-exceptions"
|
CFLAGS="$CFLAGS -fno-exceptions"
|
||||||
AC_TRY_COMPILE(,,
|
AC_TRY_COMPILE(,,
|
||||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||||
echo "Congratulations - your GCC supports exceptions; disabling them for FLTK...",
|
AC_MSG_RESULT(yes; disabling them for FLTK...),
|
||||||
CFLAGS="$OLDCFLAGS"
|
CFLAGS="$OLDCFLAGS"
|
||||||
echo "GCC does not support exceptions...")
|
AC_MSG_RESULT(no))
|
||||||
|
|
||||||
# See if we are running Solaris; if so, try the -fpermissive option...
|
# See if we are running Solaris; if so, try the -fpermissive option...
|
||||||
if test $uname = SunOS; then
|
if test $uname = SunOS; then
|
||||||
echo "Testing if GCC supports -fpermissive..."
|
AC_MSG_CHECKING(Testing if GCC supports -fpermissive...)
|
||||||
|
|
||||||
OLDCFLAGS="$CFLAGS"
|
OLDCFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -fpermissive"
|
CFLAGS="$CFLAGS -fpermissive"
|
||||||
AC_TRY_COMPILE(,,
|
AC_TRY_COMPILE(,,
|
||||||
CXXFLAGS="$CXXFLAGS -fpermissive"
|
CXXFLAGS="$CXXFLAGS -fpermissive"
|
||||||
echo "Enabling -fpermissive to work around X header bugs...",
|
AC_MSG_RESULT(yes),
|
||||||
CFLAGS="$OLDCFLAGS"
|
CFLAGS="$OLDCFLAGS"
|
||||||
echo "The -fpermissive option is not required by your GCC...")
|
AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
case `(uname) 2>/dev/null` in
|
case `(uname) 2>/dev/null` in
|
||||||
@ -281,12 +303,15 @@ else
|
|||||||
# We are running IRIX 6.2 or higher; uncomment the following
|
# We are running IRIX 6.2 or higher; uncomment the following
|
||||||
# lines if you don't have IDO 7.2 or higher:
|
# lines if you don't have IDO 7.2 or higher:
|
||||||
#
|
#
|
||||||
# CXX="CC -n32"
|
# CXX="CC -n32 -mips3"
|
||||||
# CC="cc -n32"
|
# CC="cc -n32 -mips3"
|
||||||
# LD="ld -n32"
|
# LD="ld -n32 -mips3"
|
||||||
# MAKEDEPEND="CC -M"
|
# 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"
|
CFLAGS="-fullwarn $CFLAGS"
|
||||||
CXXFLAGS="-fullwarn $CXXFLAGS"
|
CXXFLAGS="-fullwarn $CXXFLAGS"
|
||||||
else
|
else
|
||||||
@ -346,5 +371,5 @@ AC_CONFIG_HEADER(config.h:configh.in)
|
|||||||
AC_OUTPUT(makeinclude)
|
AC_OUTPUT(makeinclude)
|
||||||
|
|
||||||
dnl
|
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
|
dnl
|
||||||
|
|||||||
@ -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.
|
* Copyright 1998-2001 by Bill Spitzak and others.
|
||||||
*
|
*
|
||||||
@ -81,10 +81,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
/* This code to prevent "empty translation unit" or similar warnings... */
|
/* This code to prevent "empty translation unit" or similar warnings... */
|
||||||
static void dummy(void) {}
|
static void dummy(void) {dummy();}
|
||||||
#endif
|
#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 $".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -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).
|
// 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.");
|
label("OpenGL is required for this demo to operate.");
|
||||||
align(FL_ALIGN_WRAP | FL_ALIGN_INSIDE);
|
align(FL_ALIGN_WRAP | FL_ALIGN_INSIDE);
|
||||||
#endif /* !HAVE_GL */
|
#endif /* !HAVE_GL */
|
||||||
};
|
}
|
||||||
|
|
||||||
#if HAVE_GL
|
#if HAVE_GL
|
||||||
void CubeView::drawCube() {
|
void CubeView::drawCube() {
|
||||||
@ -139,7 +139,7 @@ void CubeView::drawCube() {
|
|||||||
glVertex3fv(boxv3);
|
glVertex3fv(boxv3);
|
||||||
glVertex3fv(boxv7);
|
glVertex3fv(boxv7);
|
||||||
glEnd();
|
glEnd();
|
||||||
};//drawCube
|
}//drawCube
|
||||||
|
|
||||||
void CubeView::draw() {
|
void CubeView::draw() {
|
||||||
if (!valid()) {
|
if (!valid()) {
|
||||||
@ -161,9 +161,9 @@ void CubeView::draw() {
|
|||||||
drawCube();
|
drawCube();
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
};
|
}
|
||||||
#endif /* HAVE_GL */
|
#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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user