+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:6134: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6137 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_shmat = no; then
+
+echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:6181: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lipc "
+cat > conftest.$ac_ext <<EOF
+#line 6186 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS="$LDFLAGS"
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+
+xe_msg_checking="for IceConnectionNumber in -lICE"
+test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:6233: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lICE $X_EXTRA_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6238 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+ # Autoconf claims to find X library and include dirs for us.
+ if test "$no_x" = "yes"
+ then with_x11=no window_system=none HAVE_X_WINDOWS=no
+ else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
+ fi
+fi
+
+
+if test "$with_x11" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_X_WINDOWS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_X_WINDOWS 1
+EOF
+}
+
+ MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
+ SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
+
+ for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
+ inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
+ if test -d "$lib_dir" -a -d "$inc_dir"; then
+ case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ x_libraries="$lib_dir $x_libraries"
+ X_LIBS="-L${lib_dir} $X_LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
+ esac
+ case "$x_includes" in "$inc_dir"* ) ;; *)
+ x_includes="$inc_dir $x_includes"
+ X_CFLAGS="-I${inc_dir} $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
+ esac
+ break; fi
+ done
+
+ for rel in "X11R6" "X11R5" "X11R4"; do
+ lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
+ if test -d "$lib_dir" -a -d "$inc_dir"; then
+ case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ x_libraries="$x_libraries $lib_dir"
+ X_LIBS="$X_LIBS -L${lib_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
+ esac
+ case "$x_includes" in "$inc_dir"* ) ;; *)
+ x_includes="$x_includes $inc_dir"
+ X_CFLAGS="$X_CFLAGS -I${inc_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
+ esac
+ break; fi
+ done
+
+ case "$opsys" in
+ decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
+ esac
+
+ ld_switch_x_site="$X_LIBS"
+
+
+if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+ ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+ ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+
+ runpath="" runpath_dirs=""
+ if test -n "$LD_RUN_PATH"; then
+ runpath="$LD_RUN_PATH"
+ elif test "$GCC" = "yes"; then
+ ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+ echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+ xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+ for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+ case "$arg" in P,* | -L* | -R* )
+ for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
+ {
+xe_runpath_dir="$dir"
+ test "$xe_runpath_dir" != "/lib" -a \
+ "$xe_runpath_dir" != "/usr/lib" -a \
+ -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+ eval "$xe_add_unique_runpath_dir"
+}
+ done ;;
+ esac
+ done
+ ld_switch_run="$ld_switch_run_save"
+ rm -f conftest*
+ else
+ for arg in $ld_switch_site $ld_switch_x_site; do
+ case "$arg" in -L*) {
+xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
+ test "$xe_runpath_dir" != "/lib" -a \
+ "$xe_runpath_dir" != "/usr/lib" -a \
+ -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+ eval "$xe_add_unique_runpath_dir"
+};; esac
+ done
+ if test "$opsys $need_motif" = "sol2 yes"; then
+ xe_runpath_dir="/opt/SUNWdt/lib";
+ eval "$xe_add_unique_runpath_dir";
+ fi
+ fi
+ if test -n "$runpath"; then
+ ld_switch_run="${dash_r}${runpath}"
+
+if test "$GCC" = "yes"; then
+ set x $ld_switch_run; shift; ld_switch_run=""
+ while test -n "$1"; do
+ case $1 in
+ -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
+ -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
+ -Xlinker* ) ;;
+ * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
+ esac
+ shift
+ done
+fi
+ test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+ fi
+fi
+
+
+ if test "$extra_verbose" = "yes"; then
+ echo; echo "X11 compilation variables:"
+ for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
+ echo
+ fi
+
+ bitmapdirs=
+ if test "$x_includes" != NONE; then
+ for i in $x_includes; do
+ if test -d "$i/bitmaps"; then
+ bitmapdirs="$i/bitmaps:$bitmapdirs"
+ fi
+ if test -d "$i/X11/bitmaps"; then
+ bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
+ fi
+ done
+ bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
+ fi
+ test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
+ Defining BITMAPDIR = "$bitmapdirs"
+EOF
+cat >> confdefs.h <<EOF
+#define BITMAPDIR "$bitmapdirs"
+EOF
+}
+
+
+ echo "checking for X defines extracted by xmkmf" 1>&6
+echo "configure:6416: checking for X defines extracted by xmkmf" >&5
+ rm -fr conftestdir
+ if mkdir conftestdir; then
+ cd conftestdir
+ cat > Imakefile <<'EOF'
+xetest:
+ @echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+ fi
+ cd ..
+ rm -fr conftestdir
+ for word in $xmkmf_defines; do
+ case "$word" in
+ -D__STDC__*) ;;
+ -D* )
+ sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
+ case "$word" in
+ -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
+ * ) val=1 ;;
+ esac
+ if grep "^#define $sym " confdefs.h >/dev/null; then :; else
+ if test "$val" = "1"
+ then { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $sym
+EOF
+cat >> confdefs.h <<EOF
+#define $sym 1
+EOF
+}
+
+ else { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $sym = $val
+EOF
+cat >> confdefs.h <<EOF
+#define $sym $val
+EOF
+}
+
+ fi
+ fi ;;
+ esac
+ done
+ fi
+
+ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
+echo "configure:6465: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6468 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
+fi
+
+
+
+echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
+echo "configure:6497: checking for XOpenDisplay in -lX11" >&5
+ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lX11 "
+cat > conftest.$ac_ext <<EOF
+#line 6502 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XOpenDisplay();
+
+int main() {
+XOpenDisplay()
+; return 0; }
+EOF
+if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ have_lib_x11=yes
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ if test "$have_lib_x11" != "yes"; then
+
+xe_msg_checking="for XGetFontProperty in -lX11"
+test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:6538: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lX11 -b i486-linuxaout"
+cat > conftest.$ac_ext <<EOF
+#line 6543 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XGetFontProperty();
+
+int main() {
+XGetFontProperty()
+; return 0; }
+EOF
+if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
+fi
+
+
+ fi
+ libs_x="-lX11"
+ test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
+
+
+echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
+echo "configure:6581: checking for XShapeSelectInput in -lXext" >&5
+ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXext "
+cat > conftest.$ac_ext <<EOF
+#line 6586 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XShapeSelectInput();
+
+int main() {
+XShapeSelectInput()
+; return 0; }
+EOF
+if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ libs_x="-lXext $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXext\" to \$libs_x"; fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+
+echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
+echo "configure:6620: checking for XtOpenDisplay in -lXt" >&5
+ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXt "
+cat > conftest.$ac_ext <<EOF
+#line 6625 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XtOpenDisplay();
+
+int main() {
+XtOpenDisplay()
+; return 0; }
+EOF
+if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ libs_x="-lXt $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXt\" to \$libs_x"; fi
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
+fi
+
+
+
+ echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
+echo "configure:6659: checking the version of X11 being used" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 6661 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+ int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
+EOF
+if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+then
+ ./conftest foobar; x11_release=$?
+else
+ conftest_rc="$?"
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ x11_release=4
+fi
+rm -fr conftest*
+ echo "$ac_t""R${x11_release}" 1>&6
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining THIS_IS_X11R${x11_release}
+EOF
+cat >> confdefs.h <<EOF
+#define THIS_IS_X11R${x11_release} 1
+EOF
+}
+
+
+ if test "${x11_release}" = "4"; then
+ case "$with_widgets" in
+ "" | "no") with_widgets=no ;;
+ *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
+ esac
+ fi
+
+ for ac_func in XConvertCase
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6697: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6700 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ for ac_hdr in X11/Xlocale.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6755: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6758 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ for ac_func in XRegisterIMInstantiateCallback
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6796: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6799 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
+echo "configure:6850: checking for standard XRegisterIMInstantiateCallback prototype" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 6852 "configure"
+#include "confdefs.h"
+
+#define NeedFunctionPrototypes 1
+#include <X11/Xlib.h>
+extern Bool XRegisterIMInstantiateCallback(
+ Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:6864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
+EOF
+cat >> confdefs.h <<\EOF
+#define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
+EOF
+}
+
+fi
+rm -f conftest*
+
+ test -z "$with_xmu" && {
+echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
+echo "configure:6885: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXmu "
+cat > conftest.$ac_ext <<EOF
+#line 6890 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XmuReadBitmapDataFromFile();
+
+int main() {
+XmuReadBitmapDataFromFile()
+; return 0; }
+EOF
+if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ with_xmu=yes
+else
+ echo "$ac_t""no" 1>&6
+with_xmu=no
+fi
+
+ }
+ if test "$with_xmu" = "no"; then
+ extra_objs="$extra_objs xmu.o" && if test "$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"xmu.o\""
+ fi
+ else
+ libs_x="-lXmu $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXmu\" to \$libs_x"; fi
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_XMU
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XMU 1
+EOF
+}
+
+ fi
+
+
+echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
+echo "configure:6940: checking for main in -lXbsd" >&5
+ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXbsd "
+cat > conftest.$ac_ext <<EOF
+#line 6945 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ libs_x="-lXbsd $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXbsd\" to \$libs_x"; fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
+ if test "$GCC" = "yes"; then
+ X_CFLAGS="-mthreads $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$X_CFLAGS"; fi
+ libs_x="-mthreads $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$libs_x"; fi
+ else
+ case "$CC" in
+ "xlc" ) CC="xlc_r" ;;
+ "xlC" ) CC="xlC_r" ;;
+ "cc" ) CC="cc_r" ;;
+ esac
+ fi
+ fi
+
+fi
+if test "$with_msw" != "no"; then
+ echo "checking for MS-Windows" 1>&6
+echo "configure:6989: checking for MS-Windows" >&5
+
+echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
+echo "configure:6992: checking for main in -lgdi32" >&5
+ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgdi32 "
+cat > conftest.$ac_ext <<EOF
+#line 6997 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }