diff options
| -rw-r--r-- | configh.in | 20 | ||||
| -rw-r--r-- | configure.in | 33 |
2 files changed, 20 insertions, 33 deletions
diff --git a/configh.in b/configh.in index 0abefa4a0..c08e91871 100644 --- a/configh.in +++ b/configh.in @@ -1,5 +1,5 @@ /* - * "$Id: configh.in,v 1.11.2.11.2.14 2002/10/22 13:45:23 easysw Exp $" + * "$Id: configh.in,v 1.11.2.11.2.15 2002/10/23 15:18:56 easysw Exp $" * * Configuration file for the Fast Light Tool Kit (FLTK). * @configure_input@ @@ -32,22 +32,6 @@ #define FLTK_DOCDIR "" /* - * Old C++ compilers don't support the bool type; unfortunately, it crept - * into FLTK 1.1.0 (Fl_Text_*) when we updated to the latest NEdit code, - * but we didn't notice it before 1.1.0 went out the door. Rather than - * break binary compatibility or do a 1.2.0 release for the sake of the - * few old C++ compilers that can't handle it, the following definitions - * allow older compilers to compile code using the bool type... - */ - -#undef HAVE_BOOL - -#if !defined(HAVE_BOOL) && defined(__cplusplus) -typedef char bool; -enum { false, true }; -#endif /* !HAVE_BOOL */ - -/* * BORDER_WIDTH: * * Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are @@ -236,5 +220,5 @@ enum { false, true }; /* - * End of "$Id: configh.in,v 1.11.2.11.2.14 2002/10/22 13:45:23 easysw Exp $". + * End of "$Id: configh.in,v 1.11.2.11.2.15 2002/10/23 15:18:56 easysw Exp $". */ diff --git a/configure.in b/configure.in index af66c7552..931b520b9 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl -*- sh -*- dnl the "configure" script is made from this by running GNU "autoconf" dnl -dnl "$Id: configure.in,v 1.33.2.31.2.89 2002/10/22 13:45:23 easysw Exp $" +dnl "$Id: configure.in,v 1.33.2.31.2.90 2002/10/23 15:18:57 easysw Exp $" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl @@ -280,19 +280,22 @@ fi dnl Does the C++ compiler support the bool type? AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type, -ac_cv_cxx_bool, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ -int f(int x){return 1;} -int f(char x){return 1;} -int f(bool x){return 1;} -],[bool b = true; return f(b);], - ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_bool" = yes; then - AC_DEFINE(HAVE_BOOL) + ac_cv_cxx_bool,[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ + int f(int x){return 1;} + int f(char x){return 1;} + int f(bool x){return 1;} + ],[ + bool b = true; + return f(b); + ], ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no) + AC_LANG_RESTORE + ]) + +if test "$ac_cv_cxx_bool" != yes; then + CXXFLAGS="-Dbool=char -Dfalse=0 -Dtrue=1 $CXXFLAGS" fi dnl Standard headers and functions... @@ -802,5 +805,5 @@ dnl Make sure the fltk-config script is executable... chmod +x fltk-config dnl -dnl End of "$Id: configure.in,v 1.33.2.31.2.89 2002/10/22 13:45:23 easysw Exp $". +dnl End of "$Id: configure.in,v 1.33.2.31.2.90 2002/10/23 15:18:57 easysw Exp $". dnl |
