mirror of https://github.com/fltk/fltk
Dropped use of -fomit-frame-pointer, as I've just discovered that it
prevents the use of libsafe. Also, the code size savings are negligable (96 bytes for FLUID) Added I18N docos to FLUID chapter. We probably need to expand discussion a lot more in the 2.0 docos. The EPM list installed the static FLTK library with execute permission, which caused EPM to strip the library, making it impossible to link against... :( git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
0ef73e50d6
commit
5d7d40fd35
94
configure.in
94
configure.in
|
@ -1,29 +1,29 @@
|
|||
dnl# -*- sh -*-
|
||||
dnl# the "configure" script is made from this by running GNU "autoconf"
|
||||
dnl#
|
||||
dnl# "$Id: configure.in,v 1.33.2.11 2000/04/26 14:14:41 mike Exp $"
|
||||
dnl#
|
||||
dnl# Configuration script for the Fast Light Tool Kit (FLTK).
|
||||
dnl#
|
||||
dnl# Copyright 1998-2000 by Bill Spitzak and others.
|
||||
dnl#
|
||||
dnl# This library is free software; you can redistribute it and/or
|
||||
dnl# modify it under the terms of the GNU Library General Public
|
||||
dnl# License as published by the Free Software Foundation; either
|
||||
dnl# version 2 of the License, or (at your option) any later version.
|
||||
dnl#
|
||||
dnl# This library is distributed in the hope that it will be useful,
|
||||
dnl# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl# Library General Public License for more details.
|
||||
dnl#
|
||||
dnl# You should have received a copy of the GNU Library General Public
|
||||
dnl# License along with this library; if not, write to the Free Software
|
||||
dnl# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
dnl# USA.
|
||||
dnl#
|
||||
dnl# Please report all bugs and problems to "fltk-bugs@easysw.com".
|
||||
dnl#
|
||||
dnl -*- sh -*-
|
||||
dnl the "configure" script is made from this by running GNU "autoconf"
|
||||
dnl
|
||||
dnl "$Id: configure.in,v 1.33.2.12 2000/04/27 00:17:51 mike Exp $"
|
||||
dnl
|
||||
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
||||
dnl
|
||||
dnl Copyright 1998-2000 by Bill Spitzak and others.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Library General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Library General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Library General Public
|
||||
dnl License along with this library; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
dnl USA.
|
||||
dnl
|
||||
dnl Please report all bugs and problems to "fltk-bugs@easysw.com".
|
||||
dnl
|
||||
|
||||
AC_INIT(src/Fl.cxx)
|
||||
|
||||
|
@ -38,7 +38,7 @@ fi
|
|||
DSOCOMMAND="echo"
|
||||
DSONAME=""
|
||||
|
||||
dnl# Get the operating system and version number...
|
||||
dnl Get the operating system and version number...
|
||||
|
||||
uname=`uname`
|
||||
uversion=`uname -r | sed -e 's/-.*$//g;s/[\.]//g'`
|
||||
|
@ -46,8 +46,8 @@ if test "$uname" = "IRIX64"; then
|
|||
uname="IRIX"
|
||||
fi
|
||||
|
||||
dnl# Clear debugging flags and only enable debugging if the user asks for
|
||||
dnl# it.
|
||||
dnl Clear debugging flags and only enable debugging if the user asks for
|
||||
dnl it.
|
||||
|
||||
DEBUGFLAG=""
|
||||
PICFLAG=0
|
||||
|
@ -92,7 +92,7 @@ fi])
|
|||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
dnl# AC_PROG_INSTALL
|
||||
dnl AC_PROG_INSTALL
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
@ -141,12 +141,12 @@ AC_CHECK_FUNCS(vsprintf)
|
|||
|
||||
AC_PATH_XTRA
|
||||
echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
|
||||
dnl# LIBS="$LIBS$X_LIBS$X_PRE_LIBS"
|
||||
dnl LIBS="$LIBS$X_LIBS$X_PRE_LIBS"
|
||||
LIBS="$LIBS$X_LIBS"
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
dnl# My test to see if OpenGL is on this machine:
|
||||
dnl My test to see if OpenGL is on this machine:
|
||||
GLLIB=
|
||||
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lGLU -lGL", \
|
||||
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGLU -lMesaGL",,\
|
||||
|
@ -166,30 +166,30 @@ AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
|
|||
ac_cv_have_overlay=no
|
||||
fi)
|
||||
|
||||
dnl# Note: Overlay support seems to be broken for menus; disable...
|
||||
dnl#
|
||||
dnl# if test "$ac_cv_have_overlay" = yes; then
|
||||
dnl# AC_DEFINE(HAVE_OVERLAY)
|
||||
dnl# fi
|
||||
dnl Note: Overlay support seems to be broken for menus; disable...
|
||||
dnl
|
||||
dnl if test "$ac_cv_have_overlay" = yes; then
|
||||
dnl AC_DEFINE(HAVE_OVERLAY)
|
||||
dnl fi
|
||||
|
||||
MAKEDEPEND="\$(CXX) -M"
|
||||
|
||||
dnl# add warnings to compiler switches:
|
||||
dnl# do this last so messing with switches does not break tests
|
||||
dnl add warnings to compiler switches:
|
||||
dnl do this last so messing with switches does not break tests
|
||||
if test -n "$GXX"; then
|
||||
CFLAGS="-Wall $CFLAGS"
|
||||
CXXFLAGS="-Wall -Wno-return-type $CXXFLAGS"
|
||||
if test -z "$DEBUGFLAG"; then
|
||||
CFLAGS="-O2 $CFLAGS"
|
||||
CXXFLAGS="-O2 $CXXFLAGS"
|
||||
CFLAGS="-O2 -fforce-mem -fforce-addr -fcaller-saves $CFLAGS"
|
||||
CXXFLAGS="-O2 -fforce-mem -fforce-addr -fcaller-saves $CXXFLAGS"
|
||||
fi
|
||||
if test $PICFLAG = 1; then
|
||||
CFLAGS="-fPIC $CFLAGS"
|
||||
CXXFLAGS="-fPIC $CXXFLAGS"
|
||||
fi
|
||||
|
||||
CFLAGS="-fno-rtti -fomit-frame-pointer $CFLAGS"
|
||||
CXXFLAGS="-fno-rtti -fomit-frame-pointer $CXXFLAGS"
|
||||
CFLAGS="-fno-rtti $CFLAGS"
|
||||
CXXFLAGS="-fno-rtti $CXXFLAGS"
|
||||
|
||||
# See if GCC supports -fno-exceptions...
|
||||
echo "Testing if GCC supports -fno-exceptions..."
|
||||
|
@ -197,7 +197,7 @@ if test -n "$GXX"; then
|
|||
CFLAGS="$CFLAGS -fno-exceptions"
|
||||
AC_TRY_COMPILE(,,
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
echo "Congratulations - your GCC supports exceptions; disabling them...",
|
||||
echo "Congratulations - your GCC supports exceptions; disabling them for FLTK...",
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
echo "GCC does not support exceptions...")
|
||||
|
||||
|
@ -279,6 +279,6 @@ AC_SUBST(MAKEDEPEND)
|
|||
AC_CONFIG_HEADER(config.h:configh.in)
|
||||
AC_OUTPUT(makeinclude)
|
||||
|
||||
dnl#
|
||||
dnl# End of "$Id: configure.in,v 1.33.2.11 2000/04/26 14:14:41 mike Exp $".
|
||||
dnl#
|
||||
dnl
|
||||
dnl End of "$Id: configure.in,v 1.33.2.12 2000/04/27 00:17:51 mike Exp $".
|
||||
dnl
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
|
@ -473,6 +473,12 @@ FLUID with the <tt>-c</tt> switch.
|
|||
<P>The output file names are the same as the <TT>.fl</TT> file, with
|
||||
the leading directory and trailing ".fl" stripped, and
|
||||
".h" or ".cxx" appended. </P>
|
||||
<H4>File/Write Messages (Alt+Shift+W)</H4>
|
||||
Writes a message file for all of the text labels defined in the current file.
|
||||
<P>The output file name is the same as the <TT>.fl</TT> file, with
|
||||
the leading directory and trailing ".fl" stripped, and
|
||||
".txt", ".po", or ".msg" appended depending
|
||||
on the <A HREF="#I18N">Internationalization Mode</A>. </P>
|
||||
<H4>File/Quit (Alt+q)</H4>
|
||||
Exits FLUID. You are asked for confirmation if you have changed the
|
||||
current data.
|
||||
|
@ -546,6 +552,9 @@ to actually change.
|
|||
generated by FLUID. If you check the "Include .h from .cxx" button the code
|
||||
file will include the header file automatically.
|
||||
|
||||
<P>The internationalization options are described <A HREF="#I18N">later in
|
||||
this chapter</A>.
|
||||
|
||||
<H4>New/Code/Function</H4>
|
||||
Creates a new C function. You will be asked for a name for the
|
||||
function. This name should be a legal C++ function template, without
|
||||
|
@ -871,4 +880,54 @@ as for xpm files. Notice that the conversion removes the compression,
|
|||
so the code may be much bigger than the .gif file. Only the first
|
||||
image of an animated gif file is used. </P>
|
||||
<P>Behavior and performance with large .gif files is not guaranteed! </P>
|
||||
<H2><A NAME="I18N">Internationalization with FLUID</A></H2>
|
||||
<P>FLUID supports internationalization (I18N for short) of label strings
|
||||
used by widgets. The preferences window (<TT>Alt+p</TT>) provides access
|
||||
to the I18N options.
|
||||
<H3>I18N Methods</H3>
|
||||
<P>FLUID supports three methods of I18N: use none, use GNU gettext, and
|
||||
use POSIX catgets. The "use none" method is the default and just passes the
|
||||
label strings as-is to the widget constructors.
|
||||
<P>The "GNU gettext" method uses GNU gettext (or a similar text-based I18N
|
||||
library) to retrieve a localized string before calling the widget
|
||||
constructor.
|
||||
<P>The "POSIX catgets" method uses the POSIX catgets function to retrieve a
|
||||
numbered message from a message catalog before calling the widget
|
||||
constructor.
|
||||
<H3>Using GNU gettext for I18N</H3>
|
||||
<P>FLUID's code support for GNU gettext is limited to calling a function or
|
||||
macro to retrieve the localized label; you still need to call
|
||||
<TT>setlocale()</TT> and <TT>textdomain()</TT> or <TT>bindtextdomain()</TT>
|
||||
to select the appropriate language and message file.
|
||||
<P>To use GNU gettext for I18N, open the preferences window and choose
|
||||
"GNU gettext" from the "Use" chooser. Two new input fields will then
|
||||
appear to control the include file and function/macro name to use when
|
||||
retrieving the localized label strings.
|
||||
<P ALIGN="CENTER"><IMG SRC="fluid-gettext.gif"></P>
|
||||
<P>The "#include" field controls the header file to include for I18N; by
|
||||
default this is <TT><libintl.h></TT>, the standard I18N file for
|
||||
GNU gettext.
|
||||
<P>The "Function" field controls the function (or macro) that will
|
||||
retrieve the localized message; by default the <TT>gettext</TT>
|
||||
function will be called.
|
||||
|
||||
<H3>Using POSIX catgets for I18N</H3>
|
||||
<P>FLUID's code support for POSIX catgets allows you to use a global message
|
||||
file for all interfaces or a file specific to each <TT>.fl</TT> file; you still
|
||||
need to call <TT>setlocale()</TT> to select the appropriate language.
|
||||
<P>To use POSIX catgets for I18N, open the preferences window and choose
|
||||
"POSIX catgets" from the "Use" chooser. Three new input fields will then
|
||||
appear to control the include file, catalog file, and set number for
|
||||
retrieving the localized label strings.
|
||||
<P ALIGN="CENTER"><IMG SRC="fluid-catgets.gif"></P>
|
||||
<P>The "#include" field controls the header file to include for I18N; by
|
||||
default this is <TT><nl_types.h></TT>, the standard I18N file for
|
||||
POSIX catgets.
|
||||
<P>The "File" field controls the name of the catalog file variable to
|
||||
use when retrieving localized messages; by default the file field is
|
||||
empty which forces a local (static) catalog file to be used for all
|
||||
of the windows defined in your <TT>.fl</TT> file.
|
||||
<P>The "Set" field controls the set number in the catalog file. The default
|
||||
set is 1 and rarely needs to be changed.
|
||||
|
||||
</BODY></HTML>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# "$Id: fltk.list,v 1.1.2.1 2000/04/25 22:15:41 mike Exp $"
|
||||
# "$Id: fltk.list,v 1.1.2.2 2000/04/27 00:17:51 mike Exp $"
|
||||
#
|
||||
# EPM product list file for the Fast Light Tool Kit (FLTK).
|
||||
#
|
||||
|
@ -45,11 +45,11 @@ f 0444 root sys /usr/man/man1/fluid.1 documentation/fluid.man
|
|||
|
||||
# Library files
|
||||
%system irix-6.5
|
||||
f 0555 root sys /usr/lib32/libfltk.a lib/libfltk.a
|
||||
f 0444 root sys /usr/lib32/libfltk.a lib/libfltk.a
|
||||
f 0555 root sys /usr/lib32/libfltk.so.1 src/libfltk.so.1
|
||||
l 0000 root sys /usr/lib32/libfltk.so libfltk.so.1
|
||||
%system !irix-6.5
|
||||
f 0555 root sys /usr/lib/libfltk.a lib/libfltk.a
|
||||
f 0444 root sys /usr/lib/libfltk.a lib/libfltk.a
|
||||
f 0555 root sys /usr/lib/libfltk.so.1 src/libfltk.so.1
|
||||
l 0000 root sys /usr/lib/libfltk.so libfltk.so.1
|
||||
%system all
|
||||
|
@ -377,5 +377,5 @@ f 0444 root sys /usr/share/doc/fltk/value_slider.gif documentation/value_slider.
|
|||
f 0444 root sys /usr/share/doc/fltk/widgets.html documentation/widgets.html
|
||||
|
||||
#
|
||||
# End of "$Id: fltk.list,v 1.1.2.1 2000/04/25 22:15:41 mike Exp $".
|
||||
# End of "$Id: fltk.list,v 1.1.2.2 2000/04/27 00:17:51 mike Exp $".
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# "$Id: Makefile,v 1.19.2.2 2000/04/25 22:16:49 mike Exp $"
|
||||
# "$Id: Makefile,v 1.19.2.3 2000/04/27 00:17:54 mike Exp $"
|
||||
#
|
||||
# Test/example program makefile for the Fast Light Tool Kit (FLTK).
|
||||
#
|
||||
|
@ -52,33 +52,44 @@ $(ALL): ../lib/$(LIBNAME)
|
|||
|
||||
# Other programs needing special "help"...
|
||||
CubeView: CubeMain.o CubeView.o CubeViewUI.o
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) CubeMain.o CubeView.o CubeViewUI.o \
|
||||
-L../lib -lfltk $(GLDLIBS) -o $@
|
||||
CubeMain.o: CubeViewUI.h CubeView.h
|
||||
CubeView.o: CubeView.h
|
||||
|
||||
cube: cube.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) cube.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
fractals: fractals.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) fractals.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
fullscreen: fullscreen.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) fullscreen.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
glpuzzle: glpuzzle.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) glpuzzle.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
gl_overlay: gl_overlay.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) gl_overlay.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
shiny: shiny.cxx shiny_panel.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) shiny.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
keyboard: keyboard.cxx keyboard_ui.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) keyboard.cxx -L../lib -lfltk $(LDLIBS) -o $@
|
||||
mandelbrot: mandelbrot.cxx mandelbrot_ui.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) mandelbrot.cxx -L../lib -lfltk $(LDLIBS) -o $@
|
||||
shape: shape.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) shape.cxx -L../lib -lfltk $(GLDLIBS) -o $@
|
||||
|
||||
# If you have libjpeg installed, you might want to try this test program:
|
||||
|
||||
jpeg_image: jpeg_image.cxx
|
||||
echo Compiling and linking $@...
|
||||
$(CXX) -I.. $(CXXFLAGS) -I../../../local/jpeg-6b -L../../../local/jpeg-6b jpeg_image.cxx -L../lib -lfltk $(LDLIBS) -ljpeg -lXext -o $@
|
||||
|
||||
depend:
|
||||
|
@ -91,5 +102,5 @@ install:
|
|||
@echo Nothing to install in test directory.
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile,v 1.19.2.2 2000/04/25 22:16:49 mike Exp $".
|
||||
# End of "$Id: Makefile,v 1.19.2.3 2000/04/27 00:17:54 mike Exp $".
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue