|
From: Thomas F. <tf...@no...> - 2004-02-07 17:45:37
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Dan Aloni + colinux-hackers,
thanks a lot for this patch. Meanwhile I was just on the same way, but you
saved a lot of time with it. With this patch I could build fltk and that
was the final step for the colinux-system (without DDK ;-))!
The only thing that didn't work was the installation of the fltk
header-files I copied them by hand in my cross-building directory and that
was it.
But what a brummer! I don't have a windows-box here this weekend to test
this builds :-(. Hmmm but maybe it's better to wait for the next
release... (today? tomorrow?)
One other thing: I'm thinking about to write a shell script to automate
this building proccess. Is already someone working on this issue?
Thanks and kind regards,
Thomas
> On Sat, Feb 07, 2004 at 01:52:59PM -0000, Thomas Fritzsche wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi colinux-hackers,
>>
>> I build cygwin tools as described in cygwin-cross-build without
>> problems.
>> I also compiled mxlm with this cygwin-tools, but now I have some
>> problems
>> with building fltk. This is because fltk has a lot of depends on other
>> libs for example jpeglib or stdc++ and it looks like the system would
>> like
>> to build a version for X11.
>>
>> I can disable a few libs in the configuration but I could still not
>> build
>> fltk.
>>
>> What parameters do you use to cross build fltk?
>
> You need to use the mingw makefiles with a bit of modifications.
> Applying the patch below does the trick.
>
> diff -urN fltk-1.1.4/Makefile fltk-1.1.4-patched/Makefile
> --- fltk-1.1.4/Makefile 2003-06-15 08:39:12.000000000 +0300
> +++ fltk-1.1.4-patched/Makefile 2001-01-22 17:13:39.000000000 +0200
> @@ -1,9 +1,9 @@
> #
> -# "$Id: Makefile,v 1.12.2.6.2.16 2003/06/15 05:39:12 easysw Exp $"
> +# "$Id: Makefile.mingw,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp $"
> #
> # Top-level makefile for the Fast Light Tool Kit (FLTK).
> #
> -# Copyright 1998-2003 by Bill Spitzak and others.
> +# Copyright 1998-2001 by Bill Spitzak and others.
> #
> # This library is free software; you can redistribute it and/or
> # modify it under the terms of the GNU Library General Public
> @@ -23,79 +23,74 @@
> # Please report all bugs and problems to "flt...@fl...".
> #
>
> -include makeinclude
> -
> -DIRS = src fluid test documentation
> -
> -all: makeinclude
> - for dir in $(DIRS); do\
> - echo "=== making $$dir ===";\
> - (cd $$dir; $(MAKE) $(MFLAGS)) || break;\
> - done
> -
> -install: makeinclude
> - -mkdir -p $(bindir)
> - $(RM) $(bindir)/fltk-config
> - -cp fltk-config $(bindir)
> - -chmod 755 $(bindir)/fltk-config
> - for dir in FL $(DIRS); do\
> - echo "=== installing $$dir ===";\
> - (cd $$dir; $(MAKE) $(MFLAGS) install) || break;\
> - done
> -
> -uninstall: makeinclude
> - $(RM) $(bindir)/fltk-config
> - for dir in FL $(DIRS); do\
> - echo "=== uninstalling $$dir ===";\
> - (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || break;\
> - done
> -
> -depend: makeinclude
> - for dir in $(DIRS); do\
> - echo "=== making dependencies in $$dir ===";\
> - (cd $$dir; $(MAKE) $(MFLAGS) depend) || break;\
> - done
> +# By default use a Un*x-style shell
> +#
> +# uncomment next line to use NT command shell
> +# SHELL=cmd.exe
> +#
> +# or uncomment next line to explicitly use a unix-compatible shell
> +# SHELL=sh.exe
> +#
> +# If we are using a Un*x-based make, make sure the environmental var is
> set
> +# set MAKE_MODE=unix
> +#
> +# By default, a Un*x style make is assumed, so towards the bottom of this
> +# file filenames are copied with 'cp' and use forward slashes throughout
> +# in filepaths.
> +#
> +# Changing to a Windows-based command line would require 'cp' replaced
> with
> +# a local equivalent ('copy' is OK) and potentially for forward-slashes
> in
> +# filepaths to be replaced by back-slashes.
> +
> +
> +all: makeinclude config.h
> + echo "=== making src ==="
> + touch src/makedepend
> + cd src ; $(MAKE)
> + echo "=== making fluid ==="
> + touch fluid/makedepend
> + cd fluid ; $(MAKE)
> + echo "=== making test ==="
> + touch test/makedepend
> + cd test ; $(MAKE)
> +
> +install:
> + echo "=== installing src ==="
> + touch src/makedepend
> + cd src ; $(MAKE) install
> + echo "=== installing fluid ==="
> + touch fluid/makedepend
> + cd fluid ; $(MAKE) install
> +
> +depend:
> + echo "=== making src dependencies ==="
> + touch src/makedepend
> + cd src ; $(MAKE) depend
> + echo "=== making fluid dependencies ==="
> + touch fluid/makedepend
> + cd fluid ; $(MAKE) depend
> + echo "=== making test dependencies ==="
> + touch test/makedepend
> + cd test ; $(MAKE) depend
>
> clean:
> - -$(RM) core *.o
> - for dir in $(DIRS); do\
> - echo "=== cleaning $$dir ===";\
> - (cd $$dir; $(MAKE) $(MFLAGS) clean) || break;\
> - done
> -
> -distclean: clean
> - $(RM) config.*
> - $(RM) fltk-config fltk.list makeinclude
> - $(RM) FL/Makefile
> - $(RM) documentation/*.$(CAT1EXT)
> - $(RM) documentation/*.$(CAT3EXT)
> - $(RM) documentation/fltk.pdf
> - $(RM) documentation/fltk.ps
> - $(RM) -r documentation/fltk.d
> - for file in test/*.fl; do\
> - $(RM) test/`basename $file .fl`.cxx; \
> - $(RM) test/`basename $file .fl`.h; \
> - done
> -
> -makeinclude: configure configh.in makeinclude.in
> - if test -f config.status; then \
> - ./config.status --recheck; \
> - ./config.status; \
> - else \
> - ./configure; \
> - fi
> - touch config.h
> -
> -configure: configure.in
> - autoconf
> -
> -portable-dist:
> - epm -v -s fltk.xpm fltk
> + -@ rm -f core config.cache *.o *.bck
> + echo "=== cleaning src ==="
> + touch src/makedepend
> + cd src ; $(MAKE) clean
> + echo "=== cleaning fluid ==="
> + touch fluid/makedepend
> + cd fluid ; $(MAKE) clean
> + echo "=== cleaning test ==="
> + touch test/makedepend
> + cd test ; $(MAKE) clean
>
> -native-dist:
> - epm -v -f native fltk
> +config.h: makefiles/config.mingw
> + cp $< $@
>
> +makeinclude: makefiles/makeinclude.mingw
> + cp $< $@
>
> #
> -# End of "$Id: Makefile,v 1.12.2.6.2.16 2003/06/15 05:39:12 easysw Exp
> $".
> +# End of "$Id: Makefile.mingw,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp
> $".
> #
> diff -urN fltk-1.1.4/config.h fltk-1.1.4-patched/config.h
> --- fltk-1.1.4/config.h 1970-01-01 02:00:00.000000000 +0200
> +++ fltk-1.1.4-patched/config.h 2003-01-30 23:41:07.000000000 +0200
> @@ -0,0 +1,219 @@
> +/*
> + * "$Id: config.mingw,v 1.1.2.3.2.10 2003/01/30 21:41:07 easysw Exp $"
> + *
> + * Configuration file for the Fast Light Tool Kit (FLTK).
> + *
> + * Copyright 1998-2003 by Bill Spitzak and others.
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Library General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Library General Public License for more details.
> + *
> + * You should have received a copy of the GNU Library General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
> + * USA.
> + *
> + * Please report all bugs and problems to "FLT...@fl...".
> + */
> +
> +/*
> + * Where to find files...
> + */
> +
> +#define FLTK_DATADIR "C:/FLTK"
> +#define FLTK_DOCDIR "C:/FLTK/DOC"
> +
> +/*
> + * BORDER_WIDTH:
> + *
> + * Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
> + * supported.
> + *
> + * 3 is the historic FLTK look.
> + * 2 is the default and looks like Microsoft Windows, KDE, and Qt.
> + * 1 is a plausible future evolution...
> + *
> + * Note that this may be simulated at runtime by redefining the boxtypes
> + * using Fl::set_boxtype().
> + */
> +
> +#define BORDER_WIDTH 2
> +
> +/*
> + * HAVE_GL:
> + *
> + * Do you have OpenGL? Set this to 0 if you don't have or plan to use
> + * OpenGL, and FLTK will be smaller.
> + *
> + * In order to set to 1 you will need to obtain the OpenGL header and
> + * library files. Consult the README.win32 file for further details.
> + */
> +
> +#define HAVE_GL 1
> +
> +/*
> + * HAVE_GL_GLU_H:
> + *
> + * Do you have the OpenGL Utility Library header file?
> + * (many broken Mesa RPMs do not...)
> + */
> +
> +#define HAVE_GL_GLU_H 1
> +
> +/*
> + * USE_COLORMAP:
> + *
> + * Setting this to zero will save a good deal of code (especially for
> + * fl_draw_image), but FLTK will only work on TrueColor visuals.
> + */
> +
> +#define USE_COLORMAP 1
> +
> +/*
> + * USE_XFT
> + *
> + * Use the new Xft library to draw anti-aliased text.
> + */
> +
> +#define USE_XFT 0
> +
> +/*
> + * HAVE_XDBE:
> + *
> + * Do we have the X double-buffer extension?
> + */
> +
> +#define HAVE_XDBE 0
> +
> +/*
> + * USE_XDBE:
> + *
> + * Actually try to use the double-buffer extension? Set this to zero
> + * disable use of XDBE without breaking the list_visuals program.
> + */
> +
> +#define USE_XDBE HAVE_XDBE
> +
> +/*
> + * HAVE_OVERLAY:
> + *
> + * Use the X overlay extension? FLTK will try to use an overlay
> + * visual for Fl_Overlay_Window, the Gl_Window overlay, and for the
> + * menus. Setting this to zero will remove a substantial amount of
> + * code from FLTK. Overlays have only been tested on SGI servers!
> + */
> +
> +#define HAVE_OVERLAY 0
> +
> +/*
> + * HAVE_GL_OVERLAY:
> + *
> + * It is possible your GL has an overlay even if X does not. If so,
> + * set this to 1.
> + */
> +
> +#define HAVE_GL_OVERLAY HAVE_OVERLAY
> +
> +/*
> + * WORDS_BIGENDIAN:
> + *
> + * Byte order of your machine: 1 = big-endian, 0 = little-endian.
> + */
> +
> +#define WORDS_BIGENDIAN 0
> +
> +/*
> + * U16, U32, U64:
> + *
> + * Types used by fl_draw_image. One of U32 or U64 must be defined.
> + * U16 is optional but FLTK will work better with it!
> + */
> +
> +#define U16 unsigned short
> +#define U32 unsigned
> +/* #undef U64 */
> +
> +/*
> + * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H,
> HAVE_SCANDIR:
> + *
> + * Where is <dirent.h> (used only by fl_file_chooser and scandir).
> + */
> +
> +#define HAVE_DIRENT_H 1
> +/* #undef HAVE_SYS_NDIR_H */
> +/* #undef HAVE_SYS_DIR_H */
> +/* #undef HAVE_NDIR_H */
> +/* #undef HAVE_SCANDIR */
> +
> +/*
> + * Possibly missing sprintf-style functions:
> + */
> +
> +/* #undef HAVE_VSNPRINTF */
> +/* #undef HAVE_SNPRINTF */
> +
> +/*
> + * String functions...
> + */
> +
> +/* #undef HAVE_STRINGS_H */
> +#define HAVE_STRCASECMP 1
> +/* #undef HAVE_STRLCAT */
> +/* #undef HAVE_STRLCPY */
> +
> +/*
> + * HAVE_SYS_SELECT_H:
> + *
> + * Whether or not select() call has its own header file.
> + */
> +
> +/* #undef HAVE_SYS_SELECT_H */
> +
> +/*
> + * USE_POLL:
> + *
> + * Use poll() if we don't have select().
> + */
> +
> +#define USE_POLL 0
> +
> +/*
> + * Do we have various image libraries?
> + */
> +
> +/* #undef HAVE_LIBPNG */
> +/* #undef HAVE_LIBZ */
> +/* #undef HAVE_LIBJPEG */
> +
> +/*
> + * Which header file do we include for libpng?
> + */
> +
> +/* #undef HAVE_PNG_H */
> +/* #undef HAVE_LIBPNG_PNG_H */
> +
> +/*
> + * Do we have the png_xyz() functions?
> + */
> +
> +/* #undef HAVE_PNG_GET_VALID */
> +/* #undef HAVE_PNG_SET_TRNS_TO_ALPHA */
> +
> +/*
> + * Do we have POSIX threading?
> + */
> +
> +/* #undef HAVE_PTHREAD */
> +/* #undef HAVE_PTHREAD_H */
> +
> +
> +/*
> + * End of "$Id: config.mingw,v 1.1.2.3.2.10 2003/01/30 21:41:07 easysw
> Exp $".
> + */
> diff -urN fltk-1.1.4/makeinclude fltk-1.1.4-patched/makeinclude
> --- fltk-1.1.4/makeinclude 1970-01-01 02:00:00.000000000 +0200
> +++ fltk-1.1.4-patched/makeinclude 2004-01-30 23:50:47.000000000 +0200
> @@ -0,0 +1,126 @@
> +#
> +# "$Id: makeinclude.mingw,v 1.1.2.3.2.11 2002/07/14 17:03:31 easysw Exp
> $"
> +#
> +# Make include file for the Fast Light Tool Kit (FLTK).
> +# (this file for MingW using GCC 2.95.x)
> +#
> +# Copyright 1998-2001 by Bill Spitzak and others.
> +#
> +# This library is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU Library General Public
> +# License as published by the Free Software Foundation; either
> +# version 2 of the License, or (at your option) any later version.
> +#
> +# This library is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> +# Library General Public License for more details.
> +#
> +# You should have received a copy of the GNU Library General Public
> +# License along with this library; if not, write to the Free Software
> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
> +# USA.
> +#
> +# Please report all bugs and problems to "flt...@fl...".
> +#
> +
> +# Notes:
> +#
> +# 1) Console windows appearing
> +#
> +# Consoles will not appear when run from a command line prompt
> +# but will cause an 'unnecessary' console to appear when run directly
> from
> +# windows (say explorer). It provides i/o for stdin/stdout for
> debugging
> +#
> +# To avoid this add "-mwindows" to LDLIBS and GLDLIBS below
> +#
> +# 2) Stripping the executable to reduce size
> +#
> +# An external program may be run to strip out any debug symbols:
> +# strip filename.exe
> +#
> +# Alternatively add -s option to LDLIBS and GLDLIBS below to strip all
> +# symbols. (or -S for stripping of debug symbols only). See 'ld' man
> page
> +# for other useful link-time options.
> +#
> +# The default is to leave -mwindows and the stripping off, so as to
> facilitate
> +# debugging. For release it may be appropriate to add these additional
> switches
> +
> +
> +prefix = /usr/local
> +exec_prefix = ${prefix}
> +bindir = ${exec_prefix}/bin
> +includedir = ${prefix}/include
> +libdir = ${exec_prefix}/lib
> +srcdir = .
> +
> +# programs we use...
> +CHMOD = :
> +CP = cp
> +HTMLDOC = htmldoc.exe
> +LN = :
> +MKDIR = mkdir
> +NROFF = nroff
> +RM = rm
> +RMDIR = rmdir
> +STRIP = :
> +
> +# compiler names:
> +CXX = i686-pc-cygwin-g++
> +CC = i686-pc-cygwin-gcc
> +MAKEDEPEND = $(CXX) -M
> +POSTBUILD = :
> +
> +# flags for C++ compiler:
> +CFLAGS = -Wall -O2 -DWIN32
> +CXXFLAGS = -Wall -O2 -DWIN32
> +
> +# program to make the archive:
> +LIBNAME = ../lib/libfltk.a
> +FLLIBNAME = ../lib/libfltk_forms.a
> +GLLIBNAME = ../lib/libfltk_gl.a
> +IMGLIBNAME = ../lib/libfltk_images.a
> +LIBCOMMAND = i686-pc-cygwin-ar -ruv
> +RANLIB = i686-pc-cygwin-ranlib
> +DSONAME =
> +FLDSONAME =
> +GLDSONAME =
> +IMGDSONAME =
> +DSOCOMMAND = echo
> +
> +# libraries to link with (in addition to default libs):
> +LDLIBS =-mwindows -lgdi32 -lcomctl32 -lwsock32 -luuid -lole32
> +GLDLIBS =-mwindows -lglu32 -lopengl32 -lgdi32 -lcomctl32 -lwsock32
> -luuid -lole32
> +LINKFLTK =-L../lib -lfltk
> +LINKFLTKGL =-L../lib -lfltk_gl
> +LINKFLTKFORMS =-L../lib -lfltk_forms -lfltk
> +LINKFLTKIMG =-L../lib -lfltk_images -lfltk
> +IMAGELIBS =
> +
> +# Do we build the OpenGL demos?
> +GLDEMOS =gldemos
> +
> +# Do we build the threads demo?
> +THREADS =threads
> +
> +# Be quiet when building...
> +.SILENT:
> +
> +# Build commands and filename extensions...
> +.SUFFIXES: .c .cxx .h .fl .o
> +
> +.cxx:
> + echo Compiling and linking $@...
> + $(CXX) -I.. $(CXXFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@
> +
> +.c.o:
> + echo Compiling $@...
> + $(CC) -I.. $(CXXFLAGS) $< -c
> +
> +.cxx.o:
> + echo Compiling $@...
> + $(CXX) -I.. $(CXXFLAGS) $< -c
> +
> +#
> +# End of "$Id: makeinclude.mingw,v 1.1.2.3.2.11 2002/07/14 17:03:31
> easysw Exp $".
> +#
> diff -urN fltk-1.1.4/src/Fl_win32.cxx fltk-1.1.4-patched/src/Fl_win32.cxx
> --- fltk-1.1.4/src/Fl_win32.cxx 2003-06-15 07:27:35.000000000 +0300
> +++ fltk-1.1.4-patched/src/Fl_win32.cxx 2004-01-30 23:40:23.000000000
> +0200
> @@ -47,7 +47,6 @@
> // The following include files require GCC 3.x or a non-GNU compiler...
> #if !defined(__GNUC__) || __GNUC__ >= 3
> # include <ole2.h>
> -# include <ShellApi.h>
> #endif // !__GNUC__ || __GNUC__ >= 3
>
>
> diff -urN fltk-1.1.4/src/filename_list.cxx
> fltk-1.1.4-patched/src/filename_list.cxx
> --- fltk-1.1.4/src/filename_list.cxx 2003-01-30 23:43:21.000000000 +0200
> +++ fltk-1.1.4-patched/src/filename_list.cxx 2004-01-30 23:40:59.000000000
> +0200
> @@ -51,7 +51,7 @@
> Fl_File_Sort_F *sort) {
> #if defined(__hpux) || defined(__CYGWIN__)
> // HP-UX, Cygwin define the comparison function like this:
> - return scandir(d, list, 0, (int(*)(const dirent **, const dirent
> **))sort);
> + return scandir(d, list, 0, (int(*)(dirent **, dirent **))sort);
> #elif defined(__osf__)
> // OSF, DU 4.0x
> return scandir(d, list, 0, (int(*)(dirent **, dirent **))sort);
>
>
> --
> Dan Aloni
> da...@gm...
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> coLinux-devel mailing list
> coL...@li...
> https://lists.sourceforge.net/lists/listinfo/colinux-devel
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFAJSVXnwJBIFTVIqwRAhaJAKCIos2ZQ2LhQtQOgOlvb3TzSvkqewCglTXj
7dw26Y7RoAhGDrRptf+FSnM=
=UHdn
-----END PGP SIGNATURE-----
|