Define HAVE_BOOLEAN when the Windows headers declare 'boolean' to avoid a

conflict with the jpeg headers which will otherwise also declare it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell 2006-09-04 17:57:17 +00:00
parent 4db9f933ab
commit 5f41d1bf1d
2 changed files with 78 additions and 6 deletions

78
configure vendored
View File

@ -27008,6 +27008,72 @@ _ACEOF
WXCONFIG_RESFLAGS="--define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
WIN32INSTALL=win32install
echo "$as_me:$LINENO: checking for boolean" >&5
echo $ECHO_N "checking for boolean... $ECHO_C" >&6
if test "${ac_cv_type_boolean+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <windows.h>
int
main ()
{
if ((boolean *) 0)
return 0;
if (sizeof (boolean))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_boolean=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_boolean=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_boolean" >&5
echo "${ECHO_T}$ac_cv_type_boolean" >&6
if test $ac_cv_type_boolean = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_BOOLEAN 1
_ACEOF
fi
fi
if test "$wxUSE_GUI" = "yes"; then
@ -28929,7 +28995,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@ -28956,7 +29022,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
if test -r "$ac_dir/X11/Xlib.h"; then
if test -r "$ac_dir/X11/Intrinsic.h"; then
ac_x_includes=$ac_dir
break
fi
@ -28970,18 +29036,18 @@ if test "$ac_x_libraries" = no; then
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
LIBS="-lX11 $LIBS"
LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
int
main ()
{
XrmInitialize ()
XtMalloc (0)
;
return 0;
}
@ -29019,7 +29085,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
if test -r $ac_dir/libX11.$ac_extension; then
if test -r $ac_dir/libXt.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi

View File

@ -2830,6 +2830,12 @@ if test "$USE_WIN32" = 1 ; then
dnl install Win32-specific files in "make install"
WIN32INSTALL=win32install
dnl the jpeg header jmorecfg.h delcares the type boolean, which conflicts
dnl on systems which declare it in the system headers. If HAVE_BOOLEAN is
dnl defined then jmorecfg.h doesn't declare it, so checking for it here
dnl solves the problem.
AC_CHECK_TYPES(boolean, [], [], [#include <windows.h>])
fi
if test "$wxUSE_GUI" = "yes"; then