Commit Graph

88 Commits

Author SHA1 Message Date
Albrecht Schlosser d3a3ab40b7 Replace setenv() with putenv() on old systems (+937)
Add system check for setenv() function in configure and CMake.
2024-03-18 22:29:50 +01:00
ManoloFLTK 82bd0b6652 Have FLTK use libdecor at version > 0.2.2
- it's no longer necessary to take care of the change in the layout of "struct libdecor"
between versions ≤ 0.2.2 and > 0.2.2 of libdecor
- version > 0.2.2 contains MR131, that is, it defines LIBDECOR_WINDOW_STATE_RESIZING
so the hack to emulate it is no longer  necessary
- CMake option FLTK_USE_SYSTEM_LIBDECOR now requires libdecor version > 0.2.2
to be activated, otherwise the bundled libdecor is used
- what will be the libdecor version after 0.2.2 (0.2.3? 0.3.0?) is not known as of today
2024-03-15 12:21:38 +01:00
Albrecht Schlosser 5df5daf78e Make the 'Forms' compatibility library 'fltk_forms' optional
This library is no longer needed in FLTK itself. There is only one
demo program (test/forms.cxx) that uses it if it is built. The demo
program displays a message if fltk_forms is not available.

The default is 'enabled' for backwards compatibility but this may
be changed to 'disabled' in a future version.
2023-12-20 17:33:37 +01:00
ManoloFLTK e5d9000564 Remove "-mwindows" link option from CFLAGS and CXXFLAGS 2023-12-07 09:21:03 +01:00
ManoloFLTK 973d53bbcd Fix error in configure-based build 2023-12-02 22:08:01 +01:00
ManoloFLTK f72748bb45 Wayland: make OPTION_USE_SYSTEM_LIBDECOR ON by default
This commit makes the default FLTK build setting use libdecor
as packaged in Linux when the build system contains packages
libdecor-0-dev and libdecor-0-plugin-1-gtk in version ≥ 0.2.0.
Otherwise, FLTK uses the bundled version of libdecor.
This includes situations where package libdecor-0-dev is
present in an earlier version.
2023-12-02 09:28:08 +01:00
Albrecht Schlosser c5ef206c57 Notify users that configure/make support will be dropped in 1.5.0
... as discussed in our video meeting on Nov 11.
2023-11-17 13:19:43 +01:00
Albrecht Schlosser 1209e9dcd7 Make Fl_String and Fl_Int_Vector private (#789)
- add CMake option 'OPTION_USE_STD'
- add configure option '--enable-use_std'
- move FL/Fl_String.H to src/Fl_String.H
- move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H
- remove Fl_String from demo program examples/callbacks.cxx
- remove Fl_Int_Vector from public header FL/Fl_Table.H
- some methods of Fl_Table are no longer inline
- add CMake option OPTION_USE_STD to allow std::string in some
  selected functions and methods

Experimental, may be removed before release:

- use either Fl_Int_Vector or std::vector in Fl_Table depending
  on CMake OPTION_USE_STD or configure --enable-use_std

Move all fl_filename* functions that use Fl_String to fluid

Main changes in fluid:
 - add fluid_filename.h and .cxx
 - include "fluid_filename.h" rather than <FL/filename.H>

Update fl_input(), fl_password() and test/ask

- add maxchar parameter to fl_input() and fl_password()
- fl_input_str() and fl_password_str() are optional and return
  std::string if enabled (FLTK_USE_STD)
2023-10-22 19:35:17 +02:00
Albrecht Schlosser 01038e832a Fix trailing whitespace and dependencies 2023-10-13 19:08:30 +02:00
ManoloFLTK 4fb18ffbdd Fix "Provide --without-fluid configure option" - cont'd (#725) 2023-05-10 14:41:48 +02:00
ManoloFLTK fe0fcecd61 Fix "Provide --without-fluid configure option " (#725)
Add new --disable-fluid configure option.
2023-05-09 16:19:12 +02:00
ManoloFLTK cdd1566cf9 Allow building Wayland platform without dbus (#726)
This commit supports configure-based builds without the dbus-dev package;
CMake-based builds are expected to be changed in further commit.
2023-04-30 18:41:49 +02:00
ManoloFLTK b867488442 Fix "recipe for target '../../src/xdg-decoration-protocol.c' failed" (#704) 2023-04-02 16:04:13 +02:00
Albrecht Schlosser 9c53d84ceb configure: test jpeg lib before png and zlib
For some obscure reason finding the jpeg lib *after* configuring for
local zlib and/or local png lib failed and thus switched to using the
local jpeg unexpectedly. Searching for jpeg libs before png/zlib fixes
this issue.

Note: this is a pragmatic fix (aka workaround) rather than fixing the
underlying issue. It would be interesting to find out why this happened.
2023-03-25 16:16:52 +01:00
Albrecht Schlosser 5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
ManoloFLTK 02adfc0560 Wayland: remove libdecor/demo/* from FLTK source tree 2023-02-16 08:56:37 +01:00
ManoloFLTK 160eb2926d Remove usage of __APPLE_QUARTZ__ (#673) 2023-02-06 21:42:40 +01:00
ManoloFLTK 6276822e9e Allow cmake -DOPTION_APPLE_X11=On without -U__APPLE__ 2023-02-02 18:48:24 +01:00
Matthias Melcher 1fc269b0d4
Move global FLTK options into new app fltk-admin (#560) 2023-01-21 17:14:41 +01:00
Albrecht Schlosser 71eda122e8 Fix shared library build on Solaris as requested by STR 3378
I couldn't test this though.

Reference: https://www.fltk.org/str.php?L3378
2023-01-16 22:55:16 +01:00
Matthias Melcher c8024c7a3b
Make sure that zlib and png are both local or system (#621)
Autoconf syncs png and zlib configuration
Cmake png zlib selection
2023-01-01 17:29:23 +01:00
Albrecht Schlosser 54a62eb951 Fix trailing whitespace 2022-12-08 19:48:31 +01:00
ManoloFLTK 1b0754ce4d Build hybrid Wayland/X11 w/ configure: check for Xinerama, et al 2022-11-29 17:01:48 +01:00
ManoloFLTK 13e3a4c613 fltk-config from configure: remove libdecor-related flags - cont'd 2022-11-27 10:19:15 +01:00
ManoloFLTK 1d04c75508 fltk-config from configure: remove libdecor-related flags 2022-11-26 10:43:21 +01:00
ManoloFLTK 27a6fd9609 Configure-based build: control presence of GL-related packages 2022-11-23 17:24:59 +01:00
Albrecht Schlosser ce777110fe Fix whitespace (trailing spaces) 2022-11-23 13:08:37 +01:00
ManoloFLTK 0ba051994a Have OPTION_USE_WAYLAND / --enable-wayland set to ON by default 2022-11-23 06:17:31 +01:00
ManoloFLTK bb4cc0ffe8 Wayland + configure: take care of HAVE_GLXGETPROCADDRESSARB 2022-11-05 05:01:56 +01:00
Albrecht Schlosser c570bd8f96 Fix trailing whitespace 2022-11-01 20:06:22 +01:00
ManoloFLTK 5fe2932924 macOS: restore "configure --enable-x11 --enable-usecairo" - cont'd 2022-10-14 12:44:42 +02:00
ManoloFLTK 763a8f9648 macOS: restore "configure --enable-x11 --enable-usecairo" 2022-10-13 15:04:32 +02:00
ManoloFLTK b37576aa55 New configure setting "--enable-wayland --disable-x11" to build pure Wayland platform. 2022-09-10 07:44:23 +02:00
Albrecht Schlosser c20e7d9efc Update dependencies, fix trailing whitespace 2022-08-29 14:26:28 +02:00
ManoloFLTK c720aae515 Make hybrid Wayland/X11 platform. 2022-08-29 12:15:32 +02:00
Albrecht Schlosser 6a546d4e9c Fix dependencies and whitespace errors
No "real" code changes, but dependencies can affect building.
2022-08-25 22:04:59 +02:00
ManoloFLTK 51e9b28f39 Add FL_EXPORT directives to support building shared libs with -no-undefined 2022-08-24 15:09:30 +02:00
ManoloFLTK 6686d2bfa9 Wayland platform: add support of FreeBSD version 13.1 2022-05-19 17:18:53 +02:00
Albrecht Schlosser 1ae95fddd9 Remove obsolete configure test for 'bool'
as discussed in fltk.coredev "RFC: autoconf test for 'bool' type"
on Apr 12, 2021.
2022-04-24 13:33:23 +02:00
Albrecht Schlosser cc6a7d008b Remove obsolete config variable 'HAVE_LIBPNG_PNG_H'
This variable has never been used in the code. Configure and CMake
look for a *working* libpng (HAVE_PNG) and set variable HAVE_PNG_H
if the header <png.h> can be included.

The alternative to include <libpng/png.h> is always used in the #else
clause and doesn't need its own config variable. Configure and CMake
log what they find, hence this extra variable is not necessary.
2022-04-04 21:10:25 +02:00
Albrecht Schlosser e91d65cd2f Fix whitespace errors (no code changes) 2022-03-31 16:00:11 +02:00
ManoloFLTK da5efb95d5 Add support of configure --enable-wayland --disable-gl - Cont'd. 2022-03-22 21:47:22 +01:00
ManoloFLTK 7432079632 Add support of configure --enable-wayland --disable-gl 2022-03-22 21:28:29 +01:00
ManoloFLTK f5ad1d2545 Wayland: fix configure-based build 2022-03-05 10:18:11 +01:00
ManoloFLTK 6216165dec Add the Wayland platform to FLTK 1.4 - continued. 2022-03-04 16:58:20 +01:00
ManoloFLTK 3718effc43 Add the Wayland platform to FLTK 1.4 2022-03-04 15:41:00 +01:00
Albrecht Schlosser 5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ

- Rename abi-version.h to fl_config.h, rename input files,
  update dependencies, .gitignore, CMake, configure and Makefiles.

- Include Cairo options in FL/fl_config.h

- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.

- Include <FL/fl_config.h> in config.h and wherever necessary,
  fix include order (move FL/Fl.H to the top) and more.

- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11

- Do not include <config.h> in Cairo demo program which is no
  longer required in Cairo programs since FLTK 1.4.0
2021-12-18 22:44:08 +01:00
ManoloFLTK eb8b016fab Fix for issue #254: remove hardware overlay support . 2021-11-26 15:16:15 +01:00
ManoloFLTK 84cf249482 Fix for issue #253: Remove xdbe support 2021-11-26 15:01:54 +01:00
Albrecht Schlosser c6eccf6137 Call pthread's recursive mutex on Linux (Issue #245)
Add CMake test for PTHREAD_MUTEX_RECURSIVE

Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE

Replace "#ifdef PTHREAD_MUTEX_RECURSIVE"
   with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE"
and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h
2021-07-21 12:16:20 +02:00