Commit Graph

36 Commits

Author SHA1 Message Date
Albrecht Schlosser e25907c830 autoconf: fix PNG build
configure didn't export HAVE_PNG_H and HAVE_LIBPNG_H to config.h
2021-03-07 15:29:14 +01:00
Albrecht Schlosser 49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00
Albrecht Schlosser ba0b8affe3 Rewrite Pango checks for autoconf/configure
- disable "fallback mode" (don't use hardcoded flags and libs)
- use pkg-config for pango flags and libs but don't *require* it [1]
- enable CXXFLAGS and LDFLAGS usage for --enable-pango

[1] if pkg-config is not available (installed) you can still use
environment variables CFLAGS, CXXFLAGS, and LDFLAGS to enable Pango.
2021-02-17 11:28:31 +01:00
Albrecht Schlosser e182c8bcd5 Fix whitespace errors (no code changes)
- remove trailing whitespace
- convert tabs to spaces (configure.ac)
2021-02-16 14:21:13 +01:00
Albrecht Schlosser a355c16971 Fix 'configure --enable-pango'
Also change 'pango' to 'Pango' consistently in warning and error
messages.
2021-02-16 13:53:35 +01:00
Albrecht Schlosser edd5818355 fix autoconf and Makefile
do not delete config.sub and config.guess

todo: remove misc/config.{sub|guess} ?
2021-02-15 00:09:15 +01:00
Michael R Sweet 76315a961f
Finish first pass of modernizing autoconf source file. 2021-02-13 21:22:03 -05:00
Michael R Sweet 44e90666d2
Save work. 2021-02-13 18:02:17 -05:00
Michael R Sweet e3c3b9b39f
Save work on configure.ac modernization. 2021-02-13 17:17:43 -05:00
ManoloFLTK 2280e5838a macOS: remove explicit paths /opt/sw and /sw from configure.ac 2020-10-29 07:39:33 +01:00
ManoloFLTK 8accc6e840
Pango ps (#148)
Use cairo-PostScript to output PostScript when pango is available.

This allows to draw in vectorial form any script.
Before, only the Latin script could be drawn to PostScript in vectorial form.
2020-10-28 17:19:05 +01:00
ManoloFLTK a59026fa1c Fix to support macOS 11.0 "Big Sur" 2020-08-30 10:14:16 +02:00
Albrecht Schlosser 720b84ef9d CMake: refactor and reformat CMake files
- raise minimum CMake version from 2.6.3 to 3.2.3 (Jun 01, 2015)
- indent all CMake files according to the CMP (2 col.)
- refactor FLTK version number definitions and usage
- unify CMake and autoconf/configure variable names:
  - FL_VERSION -> FLTK_VERSION
  - FL_MAJOR_VERSION -> FLTK_VERSION_MAJOR
  - etc. for _MINOR_ and _PATCH_, respectively
  - note: this does not affect FL_VERSION etc. in source code
- generate "export headers" for all libraries (experimental: OFF)
- port some forgotten goodies from branch-1.3 to master
- merge and improve macro 'create_example' (WIP)
- remove "temporary" options and code for older CMake versions
- include and use 'GenerateExportHeader' (experimental, WIP: OFF)
  - note: created header files are not yet used
- build only *one* DLL with Visual Studio (tested, works)
  - similar to the bundled IDE projects in 1.3.x
- add some dynamically linked test/demo programs ('*-shared')
  if shared libraries are built (WIP)
- split 'macros.cmake': use one file per macro
2020-07-15 00:34:53 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
ManoloFLTK 26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
Albrecht Schlosser 95165884b6 Support cross-compilation with autotools
We use the host system's `fluid` when cross-compiling. This must be
executable as `fluid`, i.e. it must be in the PATH or otherwise
defined, for instance as an alias.
2020-06-10 16:24:39 +02:00
ManoloFLTK 75f47a766f Use pkg-config when available to detect pango 2020-04-16 18:04:51 +02:00
ManoloFLTK bebf554717 Try "pkg-config --cflags pangoxft" to detect presence of pango 2020-04-15 21:30:05 +02:00
ManoloFLTK 4197c2616d Use pkg-config to support --enable-pango under Darwin 2020-01-06 17:53:45 +01:00
ManoloFLTK 034d49064e Restore support of 'configure --enable-x11' with macOS 10.15 Catalina 2019-10-31 11:25:56 +01:00
ManoloFLTK 669f159665 Fix for STR#3473 (and its duplicate STR#3507)
Recent Linux distribution have replaced the freetype-config command
by pkg-config. The fix tries the new procedure with pkg-config and
falls back to freetype-config if the new procedure fails.
2019-01-30 17:58:22 +01:00
Ian MacArthur 9e212ec6f9 Recent (circa early 2018) versions of the Mingw32 headers have changed the file header layout, breaking the build of fltk-1.4 for some users.
These changes should give a working build once more - more complete rework is still needed to fully address the issues raised.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12946 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-18 22:49:04 +00:00
Albrecht Schlosser 5c2d98a5fc CMake + configure: improve generation of fltk-config.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-25 19:25:45 +00:00
Albrecht Schlosser ff64d09cf7 Remove obsolete -DUSE_OPENGL32 from configure and fltk-config.
This definition was introduced in svn r6657 (STR #2147) but never used.
The new driver model in FLTK 1.4 makes it (the intention described in
STR #2147) even more obsolete.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12689 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-25 14:40:05 +00:00
Albrecht Schlosser 7d1488507d CMake: Fix fltk-config for Windows and Unix/Linux.
This update ought to work with

  fltk-config [--use-images] [--use-gl] --compile <c source file>

on both Windows and Unix/Linux when built with CMake. It was tested
under Windows and Linux using fltk-config directly from the build tree,
but it should work as well after installation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-23 19:41:52 +00:00
Albrecht Schlosser 52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Manolo Gouy 8a179b577f configure: add checks to avoid incompatible options --disable-xft and --enable-pango and to detect if pango is found but not Xft.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-15 07:09:52 +00:00
Manolo Gouy c462635e88 MacOS configure --enable-x11: add needed compilation option under MacOS 10.13
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-08 10:19:19 +00:00
Greg Ercolano 457fb7c0b2 Changed AC_CHECK_HEADER -> AC_CHECK_HEADERS, since two files are being tested, e.g.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 18:06:30 +00:00
Greg Ercolano 3ef0e0d1c4 Small fix to remove an extra paren introduced in r12153
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 17:49:05 +00:00
Manolo Gouy 1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Albrecht Schlosser 60a9eee30d Fix inverted configure logic for option --enable-print.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-23 15:34:39 +00:00
Manolo Gouy 461750c38e X11 platform: Add optional use of the pango library to draw text, gaining the possibility to draw text in any script supported by Unicode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-21 15:05:02 +00:00
Manolo Gouy 21781c3fe9 Add --enable-print option to configure to allow building without print support on X11 platforms.
Also, the NO_PRINT_SUPPORT preprocessor variable is renamed FL_NO_PRINT_SUPPORT.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-01 17:31:29 +00:00
Albrecht Schlosser 7e273a9fd3 Configure fixes and enhancements, ported from branch-1.3.
- Abort configure if Xft was requested explicitly, but not found.
- Set config.h HAVE_* variables only if both library and header found.
- Replace deprecated configure macros with recommended ones.
- Improve indenting (clarify macro arguments).
- Remove all autoconf warnings (see autoconf --warnings=all).
- Normalize indenting with tabs+spaces.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11999 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-30 21:44:04 +00:00
Albrecht Schlosser 6b278da83d Rename configure.in to configure.ac.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11998 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-30 21:09:59 +00:00