From c33c7ff0b85c02633890a9548a18402247cf6e82 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 22 Feb 1999 20:53:35 +0000 Subject: Now don't enable XDBE under SunOS or IRIX 6.3 or earlier. Added HP C++ compiler warning options. Added HP-UX check with (v)snprintf() - HP-UX has them, but doesn't have prototypes... git-svn-id: file:///fltk/svn/fltk/trunk@311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- configure.in | 40 ++++++++++++++++++++++++++++++---------- documentation/functions.html | 21 ++++++++++----------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/configure.in b/configure.in index 54b65b258..f24c10169 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.23 1999/02/18 15:05:50 mike Exp $" +dnl# "$Id: configure.in,v 1.24 1999/02/22 20:53:33 mike Exp $" dnl# dnl# Configuration script for the Fast Light Tool Kit (FLTK). dnl# @@ -36,6 +36,14 @@ else LIBCOMMAND="ar crs" fi +dnl# Get the operating system and version number... + +uname=`uname` +uversion=`uname -r | sed -e '1,$s/\.//g'` +if test "$uname" = "IRIX64"; then + uname="IRIX" +fi + dnl# Clear debugging flags and only enable debugging if the user asks for dnl# it. @@ -49,7 +57,7 @@ fi]) AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[ if eval "test x$enable_shared = xyes"; then RANLIB=":" - case `uname` in + case $uname in SunOS* | UNIX_S*) LIBNAME="libfltk.so.1" LIBCOMMAND="\$(CXX) -G $DEBUGFLAG -o" @@ -105,11 +113,17 @@ fi AC_HEADER_DIRENT AC_CHECK_HEADER(sys/select.h) AC_CHECK_FUNCS(scandir, - if test "`(uname) 2>/dev/null`" != "SunOS"; then + if test "$uname" != "SunOS"; then AC_DEFINE(HAVE_SCANDIR) fi) -AC_CHECK_FUNCS(vsnprintf) -AC_CHECK_FUNCS(snprintf) +AC_CHECK_FUNCS(vsnprintf, + if test "$uname" != "HP-UX"; then + AC_DEFINE(HAVE_VSNPRINTF) + fi) +AC_CHECK_FUNCS(snprintf, + if test "$uname" != "HP-UX"; then + AC_DEFINE(HAVE_SNPRINTF) + fi) AC_CHECK_FUNCS(vsprintf) AC_PATH_XTRA @@ -127,7 +141,13 @@ AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \ -lX11 -lXext $X_EXTRA_LIBS -lm) AC_SUBST(GLLIB) -AC_CHECK_HEADER(X11/extensions/Xdbe.h, AC_DEFINE(HAVE_XDBE)) +AC_CHECK_HEADER(X11/extensions/Xdbe.h, \ + if test "$uname" != "SunOS" -a "$uname" != "IRIX"; then + AC_DEFINE(HAVE_XDBE) + fi + if test "$uname" == "IRIX" -a "$uversion" -gt 63; then + AC_DEFINE(HAVE_XDBE) + fi) 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 @@ -155,7 +175,7 @@ else IRIX*) # Running some flavor of IRIX; see which version and # set things up according... - if expr "`(uname -r)`" \>= 6.2; then + if test "$uversion" -ge 62; then # We are running IRIX 6.2 or higher; uncomment the following # lines if you don't have IDO 7.2 or higher: # @@ -175,11 +195,11 @@ else CXXFLAGS="-O2 $CXXFLAGS" fi ;; - HP-UX) + HP-UX*) # Running HP-UX; these options should work for the HP compilers. if test -z "$DEBUGFLAG"; then CFLAGS="+O2 $CFLAGS" - CXXFLAGS="+O2 $CXXFLAGS" + CXXFLAGS="+O2 +W336,501,736,740,749,829 $CXXFLAGS" fi ;; *) @@ -203,5 +223,5 @@ AC_CONFIG_HEADER(config.h:configh.in) AC_OUTPUT(makeinclude) dnl# -dnl# End of "$Id: configure.in,v 1.23 1999/02/18 15:05:50 mike Exp $". +dnl# End of "$Id: configure.in,v 1.24 1999/02/22 20:53:33 mike Exp $". dnl# diff --git a/documentation/functions.html b/documentation/functions.html index 257aae1db..e0996deed 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -185,8 +185,8 @@ subexpressions literally.
static void Fl::add_fd(int fd, int when, void (*cb)(int, void *), void * = 0)
static void Fl::remove_fd(int) - Add file descriptor fd to listen to. When the fd - becomes ready for reading the callback is done. The callback is +Add file descriptor fd to listen to. When the fd +becomes ready for reading the callback is done. The callback is passed the fd and the arbitrary void * argument. Fl::wait() will return immediately after calling the callback.

The second version takes a when bitfield, with the bits @@ -214,23 +214,22 @@ zero from its handle() method. Exactly which ones may change in future versions, however.

static Fl::add_idle(void (*cb)(void *), void *)

- Adds a callback function that is called by Fl::wait() when +Adds a callback function that is called by Fl::wait() when there is nothing to do. This can be used for background processing.

Warning: this can absorb all your machine's time!

You can have multiple idle callbacks. To remove an idle callback use Fl::remove_idle().

-

Only Fl::wait() calls the idle callbacks. Fl::wait(time) -, Fl::check(), and Fl::ready() ignore them so that -these functions may be called by the idle callbacks themselves without -having to worry about recursion.

+

Fl::wait() and Fl::check() call idle callbacks, +but Fl::ready() does not.

The idle callback can call any FLTK functions. However if you call -something that calls Fl::wait() (such as a message pop-up) you -should first remove the idle callback so that it does not recurse.

+something that calls Fl::wait() or Fl::check() (such +as a message pop-up) you should first remove the idle callback so that +it does not recurse.

static void Fl::add_timeout(float t, void (*cb)(void *),void *v=0)

- Add a one-shot timeout callback. The timeout will happen as soon as +Add a one-shot timeout callback. The timeout will happen as soon as possible after t seconds after the last time wait() - was called. The optional void * argument is passed to the +was called. The optional void * argument is passed to the callback.

This code will print "TICK" each second on stdout, no matter what else the user or program does:

-- cgit v1.2.3