summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--CHANGES3
-rw-r--r--CMake/install.cmake4
-rw-r--r--CMake/options.cmake7
-rw-r--r--CMakeLists.txt6
-rw-r--r--FL/Enumerations.H36
-rw-r--r--Makefile1
-rw-r--r--README.MSWindows.txt7
-rw-r--r--abi-version.cmake.in7
-rw-r--r--abi-version.in7
-rw-r--r--configure.in16
-rw-r--r--ide/VisualC2008/FL/abi-version.h31
-rw-r--r--ide/VisualC2010/FL/abi-version.h31
-rw-r--r--ide/VisualC6/FL/abi-version.h31
-rw-r--r--ide/Xcode4/FL/abi-version.h31
15 files changed, 205 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 9eccf651a..bd3c5445d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,7 +21,8 @@
/*.bck
/TAGS
-# /FL/
+# /FL
+/FL/abi-version.h
/FL/Makefile
/FL/*.bck
diff --git a/CHANGES b/CHANGES
index 5abdb8955..91264037b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ CHANGES IN FLTK 1.3.4 RELEASED: ??? ?? ????
New features and extensions
+ - FLTK's ABI version can now be configured with configure or CMake.
+*FIXME* See further documentation in ... [TBD].
+
- Added full support of true subwindows to the Mac OS X platform.
Window nesting to any depth is possible. An Fl_Gl_Window window or
subwindow can contain Fl_Window's as subwindows.
diff --git a/CMake/install.cmake b/CMake/install.cmake
index 755489b02..e97d02890 100644
--- a/CMake/install.cmake
+++ b/CMake/install.cmake
@@ -36,6 +36,10 @@ install(DIRECTORY ${FLTK_SOURCE_DIR}/FL
PATTERN ".svn" EXCLUDE
)
+install(DIRECTORY ${FLTK_BINARY_DIR}/FL
+ DESTINATION ${FLTK_INCLUDEDIR} USE_SOURCE_PERMISSIONS
+)
+
if(OPTION_CREATE_LINKS)
install(SCRIPT ${FLTK_BINARY_DIR}/install-symlinks.cmake)
endif(OPTION_CREATE_LINKS)
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 1444ae154..1c721d131 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -34,6 +34,13 @@ set(OPTION_ARCHFLAGS ""
add_definitions(${OPTION_ARCHFLAGS})
#######################################################################
+set(OPTION_ABI_VERSION ""
+ CACHE STRING
+ "FLTK ABI Version (FL_ABI_VERSION - define as 10x0y for 1.x.y)"
+ )
+set(FL_ABI_VERSION ${OPTION_ABI_VERSION})
+
+#######################################################################
#######################################################################
if(UNIX)
option(OPTION_CREATE_LINKS "create backwards compatibility links" OFF)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b82d5dcda..16f75fca9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,12 @@ include(CMake/variables.cmake)
#######################################################################
include(CMake/export.cmake)
+configure_file(
+ ${FLTK_SOURCE_DIR}/abi-version.cmake.in
+ ${FLTK_BINARY_DIR}/FL/abi-version.h
+ @ONLY
+ )
+
#######################################################################
# build examples - these have to be built after fluid is built/imported
#######################################################################
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index 5746391eb..675c8c562 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -23,23 +23,28 @@
#ifndef Fl_Enumerations_H
#define Fl_Enumerations_H
-/* Uncomment the following FL_ABI_VERSION line to enable ABI breaking fixes
- * in the current patch release of FLTK. ** Use for static builds only! **
- * For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION
- ******************************************************************************
- * Note: the link above is outdated.
- * FIXME: Update docs ...
+/*
******************************************************************************
- * This is work in progress!
+ * Notes on FL_ABI_VERSION and deprecated (obsolete) FLTK_ABI_VERSION:
+ *
+ * (1) FLTK_ABI_VERSION is deprecated, but still defined below.
+ * Do NOT define FLTK_ABI_VERSION here - it would be overwritten later.
*
- * OLD: FLTK_ABI_VERSION deprecated, but defined later (see below)
- * NEW: FL_ABI_VERSION FIXME: to be defined by configure !
+ * (2) FL_ABI_VERSION is now (as of FLTK 1.3.4) defined by configure
+ * or CMake. Do NOT define it here. Its definition will be included
+ * below by "#include <FL/abi-version.h>".
*
- * The intent is to define FL_ABI_VERSION by configure and CMake.
- * When this is done, the definition will be #include'd here !
+ * (3) If you use the provided IDE files (Windows VC++ or Xcode) you should
+ * edit the definition in the provided IDE subdirectory. The correct
+ * file is `/path/to/fltk/ide/<IDE-name>/FL/abi-version.h' .
+ *
+ ******************************************************************************
+ * For more info on FL_ABI_VERSION, see: http://fltk.org/cmp.php#FL_ABI_VERSION
+ * FIXME: Update docs ...
******************************************************************************
*/
-//#define FL_ABI_VERSION 10304
+
+#include <FL/abi-version.h>
# include "Fl_Export.H"
# include "fl_types.h"
@@ -166,7 +171,8 @@
10300 <= FL_ABI_VERSION <= 10304
- Note: configure + CMake not yet implemented, see also STR #3161.
+ Note: configure + CMake can be used to define FL_ABI_VERSION, but they
+ do not check validity. This is done here.
*/
#if FL_ABI_VERSION < FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100
@@ -184,8 +190,8 @@
/*
FLTK_ABI_VERSION is deprecated (replaced by FL_ABI_VERSION).
- This deprecated constant should be removed in FLTK 1.4.0 and later.
- Please use FL_ABI_VERSION instead.
+ This deprecated constant will be removed in FLTK 1.4.0 and later.
+ Please use FL_ABI_VERSION when FLTK 1.4.0 has been released.
*/
#ifdef FLTK_ABI_VERSION
diff --git a/Makefile b/Makefile
index cd62a268b..892a571c5 100644
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ distclean: clean
$(RM) fltk-config fltk.list makeinclude
$(RM) fltk.spec
$(RM) FL/Makefile
+ $(RM) FL/abi-version.h
$(RM) documentation/*.$(CAT1EXT)
$(RM) documentation/*.$(CAT3EXT)
$(RM) documentation/*.$(CAT6EXT)
diff --git a/README.MSWindows.txt b/README.MSWindows.txt
index 2d7740507..6dc154bc3 100644
--- a/README.MSWindows.txt
+++ b/README.MSWindows.txt
@@ -389,6 +389,9 @@ without adding link and include paths to the solution.
copy the entire FL directory into the include path
+ add all files from ide\VisualC2008\FL to the FL directory copied above
+ (this is currently only one file: abi-version.h)
+
copy all .lib files from the fltk lib directory to the VC lib directory
copy fluid.exe in the fluid directory to the bin directory
@@ -500,6 +503,9 @@ without adding link and include paths to the solution.
copy the entire FL directory into the include path
+ add all files from ide\VisualC2010\FL to the FL directory copied above
+ (this is currently only one file: abi-version.h)
+
copy all .lib files from the fltk lib directory to the VC lib directory
copy fluid.exe in the fluid directory to the bin directory
@@ -638,3 +644,4 @@ Oct 25 2010 - matt: restructured entire document and verified instructions
Dec 20 2010 - matt: merged with README.win32
Dec 22 2010 - AlbrechtS: added newer Cygwin (cross/mingw-w64) options
Feb 24 2012 - AlbrechtS: clarified console window FAQ
+Jul 12 2015 - AlbrechtS: add abi-config.h to files to be copied
diff --git a/abi-version.cmake.in b/abi-version.cmake.in
new file mode 100644
index 000000000..a91887a6b
--- /dev/null
+++ b/abi-version.cmake.in
@@ -0,0 +1,7 @@
+/*
+ DO NOT EDIT - This file is generated by CMake
+*/
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#cmakedefine FL_ABI_VERSION @FL_ABI_VERSION@
diff --git a/abi-version.in b/abi-version.in
new file mode 100644
index 000000000..84794b1a7
--- /dev/null
+++ b/abi-version.in
@@ -0,0 +1,7 @@
+/*
+ DO NOT EDIT - This file is generated by configure
+*/
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#undef FL_ABI_VERSION
diff --git a/configure.in b/configure.in
index 963dc6eed..cb6f3359b 100644
--- a/configure.in
+++ b/configure.in
@@ -172,6 +172,21 @@ AC_SUBST(GLLIBBASENAME)
AC_SUBST(IMGLIBBASENAME)
AC_SUBST(CAIROLIBBASENAME)
+has_abiversion=""
+AC_ARG_WITH(abiversion,
+[ --with-abiversion Build with FL_ABI_VERSION, e.g. 10304 for FLTK 1.3.4])
+has_abiversion="$with_abiversion"
+if test "$has_abiversion" = "yes" ; then
+ has_abiversion=""
+else
+ if test "$has_abiversion" = "no" ; then
+ has_abiversion=""
+ fi
+fi
+if test ! "$has_abiversion" = "" ; then
+ AC_DEFINE_UNQUOTED(FL_ABI_VERSION, [$has_abiversion], [define to FL_ABI_VERSION])
+fi
+
dnl Handle compile-time options...
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [[default=no]]])
if test x$enable_debug = xyes; then
@@ -1475,6 +1490,7 @@ fi
dnl Write all of the files...
AC_CONFIG_HEADER(config.h:configh.in)
+AC_CONFIG_HEADER(FL/abi-version.h:abi-version.in)
AC_OUTPUT(makeinclude fltk.list fltk-config fltk.spec FL/Makefile)
dnl Make sure the fltk-config script is executable...
diff --git a/ide/VisualC2008/FL/abi-version.h b/ide/VisualC2008/FL/abi-version.h
new file mode 100644
index 000000000..a46603d6e
--- /dev/null
+++ b/ide/VisualC2008/FL/abi-version.h
@@ -0,0 +1,31 @@
+/*
+ DO NOT EDIT - This file must be configured BEFORE building FLTK !
+*/
+
+/*
+ ============================================================================
+ Important note to IDE users:
+ ============================================================================
+
+ This file *may* be edited *before* building FLTK with your IDE project,
+ i.e. in /path/to/fltk/ide/<your-ide>/FL/abi-version.h:
+
+ (1) Define FL_ABI_VERSION as described below.
+ (2) Rebuild the entire FLTK library.
+ (3) Optional: install files as usual including THIS file.
+
+ DO NOT edit this file after building the FLTK library, i.e. when this
+ file is already installed in a (system) directory used to build your
+ programs.
+
+ Editing this file w/o rebuilding the entire FLTK library will change
+ the ABI and thus render your programs unusable - they may crash or
+ show other unpredictable errors. You have been warned!
+
+ ============================================================================
+ End of important note to IDE users.
+ ============================================================================
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#define FL_ABI_VERSION 10300
diff --git a/ide/VisualC2010/FL/abi-version.h b/ide/VisualC2010/FL/abi-version.h
new file mode 100644
index 000000000..a46603d6e
--- /dev/null
+++ b/ide/VisualC2010/FL/abi-version.h
@@ -0,0 +1,31 @@
+/*
+ DO NOT EDIT - This file must be configured BEFORE building FLTK !
+*/
+
+/*
+ ============================================================================
+ Important note to IDE users:
+ ============================================================================
+
+ This file *may* be edited *before* building FLTK with your IDE project,
+ i.e. in /path/to/fltk/ide/<your-ide>/FL/abi-version.h:
+
+ (1) Define FL_ABI_VERSION as described below.
+ (2) Rebuild the entire FLTK library.
+ (3) Optional: install files as usual including THIS file.
+
+ DO NOT edit this file after building the FLTK library, i.e. when this
+ file is already installed in a (system) directory used to build your
+ programs.
+
+ Editing this file w/o rebuilding the entire FLTK library will change
+ the ABI and thus render your programs unusable - they may crash or
+ show other unpredictable errors. You have been warned!
+
+ ============================================================================
+ End of important note to IDE users.
+ ============================================================================
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#define FL_ABI_VERSION 10300
diff --git a/ide/VisualC6/FL/abi-version.h b/ide/VisualC6/FL/abi-version.h
new file mode 100644
index 000000000..a46603d6e
--- /dev/null
+++ b/ide/VisualC6/FL/abi-version.h
@@ -0,0 +1,31 @@
+/*
+ DO NOT EDIT - This file must be configured BEFORE building FLTK !
+*/
+
+/*
+ ============================================================================
+ Important note to IDE users:
+ ============================================================================
+
+ This file *may* be edited *before* building FLTK with your IDE project,
+ i.e. in /path/to/fltk/ide/<your-ide>/FL/abi-version.h:
+
+ (1) Define FL_ABI_VERSION as described below.
+ (2) Rebuild the entire FLTK library.
+ (3) Optional: install files as usual including THIS file.
+
+ DO NOT edit this file after building the FLTK library, i.e. when this
+ file is already installed in a (system) directory used to build your
+ programs.
+
+ Editing this file w/o rebuilding the entire FLTK library will change
+ the ABI and thus render your programs unusable - they may crash or
+ show other unpredictable errors. You have been warned!
+
+ ============================================================================
+ End of important note to IDE users.
+ ============================================================================
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#define FL_ABI_VERSION 10300
diff --git a/ide/Xcode4/FL/abi-version.h b/ide/Xcode4/FL/abi-version.h
new file mode 100644
index 000000000..a46603d6e
--- /dev/null
+++ b/ide/Xcode4/FL/abi-version.h
@@ -0,0 +1,31 @@
+/*
+ DO NOT EDIT - This file must be configured BEFORE building FLTK !
+*/
+
+/*
+ ============================================================================
+ Important note to IDE users:
+ ============================================================================
+
+ This file *may* be edited *before* building FLTK with your IDE project,
+ i.e. in /path/to/fltk/ide/<your-ide>/FL/abi-version.h:
+
+ (1) Define FL_ABI_VERSION as described below.
+ (2) Rebuild the entire FLTK library.
+ (3) Optional: install files as usual including THIS file.
+
+ DO NOT edit this file after building the FLTK library, i.e. when this
+ file is already installed in a (system) directory used to build your
+ programs.
+
+ Editing this file w/o rebuilding the entire FLTK library will change
+ the ABI and thus render your programs unusable - they may crash or
+ show other unpredictable errors. You have been warned!
+
+ ============================================================================
+ End of important note to IDE users.
+ ============================================================================
+
+/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
+
+#define FL_ABI_VERSION 10300