From 1209e9dcd7e1e97bedc747d06ba4eea837562158 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 22 Oct 2023 19:30:37 +0200 Subject: 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 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) --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9c8b9ad2c..8630e5943 100644 --- a/configure.ac +++ b/configure.ac @@ -114,6 +114,8 @@ AC_ARG_ENABLE([wayland], AS_HELP_STRING([--disable-wayland], [turn off hybrid Wa AC_ARG_ENABLE([usecairo], AS_HELP_STRING([--enable-usecairo], [all drawing to X11 windows uses Cairo])) +AC_ARG_ENABLE([use_std], AS_HELP_STRING([--enable-use_std], [allow FLTK to use std::string etc.])) + AC_ARG_ENABLE([print], AS_HELP_STRING([--disable-print], [turn off print support (X11)])) AS_IF([test x$enable_print = xno], [ AC_DEFINE([FL_NO_PRINT_SUPPORT], [Disable X11 print support?]) @@ -911,6 +913,14 @@ UNINSTALL_DESKTOP="" AS_IF([test x$enable_fluid != xno], [FLUIDDIR="fluid"]) +dnl Option use_std - allow std::string and maybe more +AS_IF([test x$enable_use_std = xyes], [ + AC_DEFINE([FLTK_USE_STD]) + ] +) + +dnl Platform specific Processing + AS_CASE([$host_os_gui], [cygwin* | mingw*], [ dnl Cygwin environment, using windows GDI ... # Recent versions of Cygwin are seriously broken and the size @@ -1408,6 +1418,8 @@ AS_CASE([$host_os_gui], [cygwin* | mingw*], [ UNINSTALL_DESKTOP="uninstall-linux" ]) +dnl End of platform specific Processing + AC_SUBST([GLDEMOS]) AC_SUBST([GLLIBS]) AC_SUBST([HLINKS]) @@ -1823,6 +1835,12 @@ AS_IF([test x$THREADS = x], [ echo " Threads: YES" ]) +AS_IF([test x$enable_use_std != xyes], [ + echo " Allow std:: : NO" +], [ + echo " Allow std:: : YES" +]) + dnl Set empty BINARY_DIR variable for fltk-config.in (CMake compatibility) BINARY_DIR= AC_SUBST([BINARY_DIR]) -- cgit v1.2.3