From xemacs-m  Fri Feb 21 02:50:53 1997
Received: from pentagana.sonic.jp (root@tokyo-01-048.gol.com [202.243.51.48])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id CAA28459
	for <xemacs-beta@xemacs.org>; Fri, 21 Feb 1997 02:50:48 -0600 (CST)
Received: (from jhod@localhost) by pentagana.sonic.jp (8.7.1+2.6Wbeta4/3.4W3) id RAA09767; Fri, 21 Feb 1997 17:31:02 +0900
Date: Fri, 21 Feb 1997 17:31:02 +0900
Message-Id: <199702210831.RAA09767@pentagana.sonic.jp>
From: P E Jareth Hein <jhod@po.iijnet.or.jp>
To: XEmacs-Beta List <xemacs-beta@xemacs.org>
Subject: Configure patches
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: multipart/mixed;
 boundary="Multipart_Fri_Feb_21_17:30:59_1997-1"
Content-Transfer-Encoding: 7bit

--Multipart_Fri_Feb_21_17:30:59_1997-1
Content-Type: text/plain; charset=US-ASCII

Here are a couple of fixes to configure, et al. Most of the support is
for my WNN hacks, but I've also fixed up CDE related stuff as
well. Lemme know if CDE doesn't get auto-detected on your system or if
the include paths are wonky...

--Jareth


--Multipart_Fri_Feb_21_17:30:59_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="configdiffs"
Content-Transfer-Encoding: 7bit

Index: configure
===================================================================
RCS file: /usr/local/CVS/XEmacs/configure,v
retrieving revision 1.2
diff -u -r1.2 configure
--- configure	1997/02/17 09:20:55	1.2
+++ configure	1997/02/21 07:38:10
@@ -280,6 +280,8 @@
 			This is beta level code.
 --with-wnn6		Compile with support for WNN version 6
 			This is alpha level code.
+--wnn-includes=DIR 	Search for WNN header files in DIR.
+--wnn-libraries=DIR	Search for WNN libraries in DIR.
 --with-i18n3		Compile with I18N level 3 (support for message
 			translation).  This doesn't currently work.
 
@@ -445,6 +447,8 @@
 	native_sound_lib	| \
 	x_includes	| \
 	x_libraries	| \
+        wnn_includes    | \
+        wnn_libraries   | \
 	site_includes	| \
 	site_libraries	| \
 	site_runtime_libraries  )
@@ -3306,9 +3310,12 @@
    :; 
 fi
 
+  if test "${internal_cde_lib_found}" = "no" -a -f "/usr/dt/lib/libDtSvc.a"; then
+    internal_cde_lib_found="yes"
+  fi
   if test "${internal_cde_lib_found}" = "yes" ; then
     internal_cde_includes_found='no'
-    for arg in ${DEFS} /usr/include ; do
+    for arg in ${DEFS} /usr/include /usr/dt/include ; do
       if test -f `echo "${arg}/Dt/Dt.h" | sed 's/^\-I//'` ; then
         internal_cde_includes_found='yes'
       fi
@@ -3331,6 +3338,13 @@
 }
 
 
+# having CDE implies Tooltalk
+if test "${with_cde}"      = "yes" -a \
+        "${with_tooltalk}" != "no" -a \
+	"${with_tooltalk}" != "none" ; then
+  with_tooltalk='yes'
+fi
+
 #
 # See if we can find OffiX.
 #
@@ -4420,6 +4434,7 @@
 \${ac_eA}XIM_MOTIF\${ac_eB}XIM_MOTIF\${ac_eC}1\${ac_eD}
 "
 }
+
   fi
   # wnn6 implies wnn support
   if test "$with_wnn6" = "yes" ; then
@@ -4435,6 +4450,26 @@
   done
 fi
 
+#
+# set defaults for finding WNN includes and libs
+#
+if test "${with_wnn}" = "yes" ; then
+  for arg in "-I${wnn_includes}" "-I/usr/X11R6/include"
+  do
+    if test -f `echo "${arg}/wnnerror.h" | sed 's/^\-I//'` ; then
+      C_SWITCH_SITE="${C_SWITCH_SITE} ${arg}"
+      wnn_includes=${arg}
+    fi
+  done
+  for arg in "-L${wnn_libraries}" "-I/usr/X11R6/lib"
+  do
+    if test -f `echo "${arg}/libwnn.a" | sed 's/^\-L//'` ; then
+      LD_SWITCH_SITE="${LD_SWITCH_SITE} ${arg}"
+      wnn_libraries=${arg}
+    fi
+  done
+fi
+
 # If netdb.h doesn't declare h_errno, we must declare it by hand.
 test -n "$silent" || echo "checking for declaration of h_errno in netdb.h"
 cat > conftest.${ac_ext} <<EOF
@@ -5768,15 +5803,23 @@
 
 fi
 
+if test "${with_cde}" = "yes" ; then
+  if test -f "/usr/dt/include/Dt/Dt.h" ; then
+    C_SWITCH_X_SITE="${C_SWITCH_X_SITE} -I/usr/dt/include"
+  fi
+  if test -f "/usr/dt/lib/libDtSvc.a" ; then
+    LD_SWITCH_X_SITE="${LD_SWITCH_X_SITE} -L/usr/dt/lib"
+  fi
+fi
+
 if test "${with_tooltalk}" = "yes" ; then
-  for arg in ${DEFS} "-I/usr/include" "-I${OPENWINHOME-/usr/openwin}/include"
+  for arg in "-I/usr/include/desktop" "-I${OPENWINHOME-/usr/openwin}/include/desktop" "-I/usr/dt/include/Tt"
   do
-    if test -f `echo "${arg}/desktop/tt_c.h" | sed 's/^\-I//'` ; then
-      C_SWITCH_X_SITE="${C_SWITCH_X_SITE} ${arg}/desktop"
+    if test -f `echo "${arg}/tt_c.h" | sed 's/^\-I//'` ; then
+      C_SWITCH_X_SITE="${C_SWITCH_X_SITE} ${arg}"
     fi
   done
-
-  for arg in ${LIBS} "-L/usr/lib" "-L${OPENWINHHOME-/usr/openwin}/lib"
+  for arg in "-L/usr/lib" "-L${OPENWINHHOME-/usr/openwin}/lib" "-L/usr/dt/lib"
   do
     case "${arg}" in
 	-L*) if test -f `echo "${arg}/libtt.a" | sed 's/^\-L//'` ; then
@@ -6927,7 +6970,10 @@
 elif test -n "$site_runtime_libraries"; then
   echo "  Additional libraries:                                   ${site_runtime_libraries}"
 fi
-
+if test "$with_wnn"; then
+  echo "  Finding WNN includes with:                              ${wnn_includes}"
+  echo "  Loading WNN libs with:                                  ${wnn_libraries}"
+fi
 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
 test "$with_term"  = yes && echo "  Compiling in support for TERM."
 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
@@ -6958,7 +7004,6 @@
 
 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
 test "$with_socks"    = yes && echo "  Compiling in support for SOCKS."
-test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
 
 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
@@ -6970,6 +7015,7 @@
 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
 
 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
+test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
 test "$with_mocklisp" = yes && echo "  Compiling in support for Mocklisp."
 test "$with_sparcworks" = yes && echo "  Compiling in support for SparcWorks."
Index: configure.in
===================================================================
RCS file: /usr/local/CVS/XEmacs/configure.in,v
retrieving revision 1.2
diff -u -r1.2 configure.in
--- configure.in	1997/02/17 09:20:58	1.2
+++ configure.in	1997/02/21 07:37:54
@@ -296,6 +296,8 @@
 			This is beta level code.
 --with-wnn6		Compile with support for WNN version 6
 			This is alpha level code.
+--wnn-includes=DIR 	Search for WNN header files in DIR.
+--wnn-libraries=DIR	Search for WNN libraries in DIR.
 --with-i18n3		Compile with I18N level 3 (support for message
 			translation).  This doesn't currently work.
 
@@ -461,6 +463,8 @@
 	native_sound_lib	| \
 	x_includes	| \
 	x_libraries	| \
+        wnn_includes    | \
+        wnn_libraries   | \
 	site_includes	| \
 	site_libraries	| \
 	site_runtime_libraries  )
@@ -2271,9 +2275,12 @@
 	"${with_cde}"      != "yes" ; then
   internal_cde_lib_found='no'
   AC_HAVE_LIBRARY(-lDtSvc, internal_cde_lib_found='yes')
+  if test "${internal_cde_lib_found}" = "no" -a -f "/usr/dt/lib/libDtSvc.a"; then
+    internal_cde_lib_found="yes"
+  fi
   if test "${internal_cde_lib_found}" = "yes" ; then
     internal_cde_includes_found='no'
-    for arg in ${DEFS} /usr/include ; do
+    for arg in ${DEFS} /usr/include /usr/dt/include ; do
       if test -f `echo "${arg}/Dt/Dt.h" | sed 's/^\-I//'` ; then
         internal_cde_includes_found='yes'
       fi
@@ -2285,6 +2292,13 @@
 fi
 IF_YES_AC_DEFINE(with_cde, HAVE_CDE)
 
+# having CDE implies Tooltalk
+if test "${with_cde}"      = "yes" -a \
+        "${with_tooltalk}" != "no" -a \
+	"${with_tooltalk}" != "none" ; then
+  with_tooltalk='yes'
+fi
+
 #
 # See if we can find OffiX.
 #
@@ -2652,6 +2666,26 @@
   done
 fi
 
+#
+# set defaults for finding WNN includes and libs
+#
+if test "${with_wnn}" = "yes" ; then
+  for arg in "-I${wnn_includes}" "-I/usr/X11R6/include"
+  do
+    if test -f `echo "${arg}/wnnerror.h" | sed 's/^\-I//'` ; then
+      C_SWITCH_SITE="${C_SWITCH_SITE} ${arg}"
+      wnn_includes=${arg}
+    fi
+  done
+  for arg in "-L${wnn_libraries}" "-I/usr/X11R6/lib"
+  do
+    if test -f `echo "${arg}/libwnn.a" | sed 's/^\-L//'` ; then
+      LD_SWITCH_SITE="${LD_SWITCH_SITE} ${arg}"
+      wnn_libraries=${arg}
+    fi
+  done
+fi
+
 # If netdb.h doesn't declare h_errno, we must declare it by hand.
 AC_COMPILE_CHECK(declaration of h_errno in netdb.h,
 	[#include <netdb.h>],
@@ -2879,15 +2913,23 @@
   AC_HEADER_EGREP(AuXtErrorJump,audio/Xtutil.h, , old_nas=true)
 fi
 
+if test "${with_cde}" = "yes" ; then
+  if test -f "/usr/dt/include/Dt/Dt.h" ; then
+    C_SWITCH_X_SITE="${C_SWITCH_X_SITE} -I/usr/dt/include"
+  fi
+  if test -f "/usr/dt/lib/libDtSvc.a" ; then
+    LD_SWITCH_X_SITE="${LD_SWITCH_X_SITE} -L/usr/dt/lib"
+  fi
+fi
+
 if test "${with_tooltalk}" = "yes" ; then
-  for arg in ${DEFS} "-I/usr/include" "-I${OPENWINHOME-/usr/openwin}/include"
+  for arg in "-I/usr/include/desktop" "-I${OPENWINHOME-/usr/openwin}/include/desktop" "-I/usr/dt/include/Tt"
   do
-    if test -f `echo "${arg}/desktop/tt_c.h" | sed 's/^\-I//'` ; then
-      C_SWITCH_X_SITE="${C_SWITCH_X_SITE} ${arg}/desktop"
+    if test -f `echo "${arg}/tt_c.h" | sed 's/^\-I//'` ; then
+      C_SWITCH_X_SITE="${C_SWITCH_X_SITE} ${arg}"
     fi
   done
-
-  for arg in ${LIBS} "-L/usr/lib" "-L${OPENWINHHOME-/usr/openwin}/lib"
+  for arg in "-L/usr/lib" "-L${OPENWINHHOME-/usr/openwin}/lib" "-L/usr/dt/lib"
   do
     case "${arg}" in
 	-L*) if test -f `echo "${arg}/libtt.a" | sed 's/^\-L//'` ; then
@@ -3130,7 +3172,10 @@
 elif test -n "$site_runtime_libraries"; then
   echo "  Additional libraries:                                   ${site_runtime_libraries}"
 fi
-
+if test "$with_wnn"; then
+  echo "  Finding WNN includes with:                              ${wnn_includes}"
+  echo "  Loading WNN libs with:                                  ${wnn_libraries}"
+fi
 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
 test "$with_term"  = yes && echo "  Compiling in support for TERM."
 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
@@ -3161,7 +3206,6 @@
 
 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
 test "$with_socks"    = yes && echo "  Compiling in support for SOCKS."
-test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
 
 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
@@ -3173,6 +3217,7 @@
 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
 
 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
+test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
 test "$with_mocklisp" = yes && echo "  Compiling in support for Mocklisp."
 test "$with_sparcworks" = yes && echo "  Compiling in support for SparcWorks."
Index: src/Makefile.in.in
===================================================================
RCS file: /usr/local/CVS/XEmacs/src/Makefile.in.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in.in
--- Makefile.in.in	1997/02/17 09:28:18	1.2
+++ Makefile.in.in	1997/02/21 08:24:48
@@ -632,22 +632,24 @@
 #ifdef AIX4
 # define LIBI18N -li18n
 #else
-# if (defined(LINUX) && defined(HAVE_CDE))
-#  define LIBI18N -lXintl
-# else
-#  define LIBI18N
-#endif /* LINUX & CDE */
+# define LIBI18N
 #endif /* AIX4 */
 
+#if (defined(LINUX) && defined(HAVE_CDE))
+# define LIBX11_INTL -lXintl
+#else
+# define LIBX11_INTL
+#endif
+
 #ifdef THIS_IS_X11R6
 #ifdef NEED_LIBW
 LIBW= -lw
 #else
 LIBW=
 #endif
-LIBX=  $(LIBX11_LIBS) $(XMU_LIB) -lXt -lSM -lICE $(LIBW) -lXext -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N
+LIBX=  $(LIBX11_LIBS) $(XMU_LIB) -lXt -lSM -lICE $(LIBW) -lXext LIBX11_INTL -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N
 #else
-LIBX=  $(LIBX11_LIBS) $(XMU_LIB) -lXt -lXext -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N
+LIBX=  $(LIBX11_LIBS) $(XMU_LIB) -lXt -lXext LIBX11_INTL -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N
 #endif
 
 #else

--Multipart_Fri_Feb_21_17:30:59_1997-1--

