comparison configure.ac @ 5843:69f9e31c9ccf

Fix progress bar crashes. Thanks to Ralf Soergel for diagnosis and the configure test. 2015-01-08 Stephen J. Turnbull <stephen@xemacs.org> * config.h.in (HAVE_ATHENA_I18N): New #define. * lwlib/xt-wrappers.h (HAVE_ATHENA_I18N): Define XAW_INTERNATIONALIZATION when needed. * configure.ac (Athena widgets): Test for international resource in SimpleWidgetClass in libXaw3d.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 10 Jan 2015 17:11:19 +0900
parents ad3e9b3274d5
children 83e5c3cd6be6
comparison
equal deleted inserted replaced
5842:9e5f3a0d4e66 5843:69f9e31c9ccf
4051 fi 4051 fi
4052 4052
4053 dnl Do we actually have a usable Athena widget set? Please? 4053 dnl Do we actually have a usable Athena widget set? Please?
4054 if test -n "$athena_lib" -a -n "$athena_h_path"; then 4054 if test -n "$athena_lib" -a -n "$athena_h_path"; then
4055 have_xaw=yes 4055 have_xaw=yes
4056 have_athena_i18n=unset
4057 dnl X.org at some point added .international to SimplePart, protected
4058 dnl by #ifdef XAW_INTERNATIONALIZATION in Xaw3d (only?). Unfortunately,
4059 dnl the distributed headers for Xaw3d don't set this to correspond to
4060 dnl the distributed library. (pkg-config does, if present.)
4061 if test "$athena_variant" = "Xaw3d"; then
4062 save_libs_x=$libs_x
4063 XE_PREPEND(-lXaw3d, libs_x)
4064 dnl The test below was provided by Ralf Soergel.
4065 AC_MSG_CHECKING([for "international" resource in Xaw3d SimpleWidget])
4066 AC_RUN_IFELSE(
4067 [AC_LANG_PROGRAM(
4068 [#include <stdlib.h>
4069 #include <string.h>
4070 #undef XAW_INTERNATIONALIZATION
4071 #include <$athena_h_path/Simple.h>
4072 ],
4073 [[int i = simpleWidgetClass->core_class.num_resources;
4074 while (i-- > 0)
4075 if (!strcmp(simpleWidgetClass->core_class.resources[i].resource_name,
4076 "international"))
4077 exit(0);
4078 exit(253);
4079 ]])],
4080 [have_athena_i18n=yes],
4081 [have_athena_i18n=no])
4082 libs_x=$save_libs_x
4083 AC_MSG_RESULT([$have_athena_i18n])
4084 fi
4056 else 4085 else
4057 have_xaw=no 4086 have_xaw=no
4058 fi 4087 fi
4059 4088
4060 else 4089 else
4183 AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h") 4212 AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
4184 4213
4185 AC_DEFINE(LWLIB_USES_ATHENA) 4214 AC_DEFINE(LWLIB_USES_ATHENA)
4186 AC_DEFINE(NEED_ATHENA) 4215 AC_DEFINE(NEED_ATHENA)
4187 need_athena="yes" 4216 need_athena="yes"
4188
4189 if test "$athena_3d" = "yes"; then 4217 if test "$athena_3d" = "yes"; then
4190 AC_DEFINE(HAVE_ATHENA_3D) 4218 AC_DEFINE(HAVE_ATHENA_3D)
4219 if test "$have_athena_i18n" = "yes"; then
4220 AC_DEFINE(HAVE_ATHENA_I18N)
4221 fi
4191 fi 4222 fi
4192 ;; 4223 ;;
4193 esac 4224 esac
4194 4225
4195 case "$all_widgets" in *motif* ) 4226 case "$all_widgets" in *motif* )