changeset 5641:e3854e6846a0

Handle --with-x-toolkit. Produce lwlib/Makefile. Substitute USE_X_TOOLKIT as both C macro and Make variable. If CPP has a value that is a directory, discard the value.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Jan 1994 14:39:31 +0000
parents f0f285e628d0
children 665c0dc2b4bd
files configure1.in
diffstat 1 files changed, 63 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/configure1.in	Thu Jan 20 14:27:51 1994 +0000
+++ b/configure1.in	Thu Jan 20 14:39:31 1994 +0000
@@ -81,6 +81,14 @@
 archlibdir='${libdir}/emacs/${version}/${configuration}'
 CC=
 
+# On Sun systems, people sometimes set up the variable CPP
+# with a value that is a directory, not an executable at all.
+# Detect that case, and ignore that value.
+if [ "x$CPP" != x ] && [ -d "$CPP" ];
+then
+  CPP=
+fi
+
 # We cannot use this variable in the case statement below, because many
 # /bin/sh's have broken semantics for "case".  Unfortunately, you must
 # actually edit the clause itself.
@@ -96,10 +104,12 @@
 CONFIGURATION specifies the machine and operating system to build for.
 --with-x		Support the X Window System.
 --with-x=no		Don't support X.
+--with-x-toolkit	Use an X toolkit.
+--with-x-toolkit=no	Don't use an X toolkit.
+--with-gcc		Use GCC to compile Emacs.
+--with-gcc=no		Don't use GCC to compile Emacs.
 --x-includes=DIR 	Search for X header files in DIR.
 --x-libraries=DIR	Search for X libraries in DIR.
---with-gcc		Use GCC to compile Emacs.
---with-gcc=no		Don't use GCC to compile Emacs.
 --run-in-place		Use libraries and data files directly out of the 
 			source tree.
 --single-tree=DIR	Has the effect of creating a directory tree at DIR
@@ -186,6 +196,27 @@
           eval "${opt}=\"${val}\""
         ;;
 
+        ## Has the user specified which toolkit they want to support?
+        "with_x_toolkit" )
+	  ## Make sure the value given was either "yes" or "no".
+	  case "${val}" in
+	    y | ye | yes )	val=athena ;;
+	    n | no )		val=no  ;;
+	    l | lu | luc | luci | lucid )	val=lucid ;;
+	    a | at | ath | athe | athena )	val=athena ;;
+	    m | mo | mot | moti | motif )	val=motif ;;
+	    o | op | ope | open | open- | open-l | open-lo \
+		| open-loo | open-look )	val=open-look ;;
+	    * )
+	      (echo "${progname}: the \`--${optname}' option is supposed to have a value
+which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
+	       echo "${short_usage}") >&2
+	      exit 1
+	    ;;
+	  esac
+          eval "${opt}=\"${val}\""
+        ;;
+
 	## Has the user specified whether or not they want GCC?
 	"with_gcc" | "with_gnu_cc" )
 	  ## Make sure the value given was either "yes" or "no".
@@ -407,7 +438,7 @@
 fi
 
 ### Make the necessary directories, if they don't exist.
-for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
+for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
   if [ ! -d ${dir} ]; then
     mkdir ${dir}
   fi
@@ -1117,21 +1148,6 @@
   ;;
 esac
 
-case "${window_system}" in
-  "" | "x11" )
-    ### If the user hasn't specified where we should find X, try
-    ### letting autoconf figure that out.
-    if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
-      ]
-      AC_FIND_X
-      [
-    fi
-    if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
-      window_system=x11
-    fi
-  ;;
-esac
-
 [ -z "${window_system}" ] && window_system=none
 
 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
@@ -1148,10 +1164,33 @@
     HAVE_X_WINDOWS=yes
     HAVE_X11=yes
     echo "  Using X11."
+    case "${with_x_toolkit}" in
+      athena )
+	USE_X_TOOLKIT=ATHENA
+	echo "  Using Xt toolkit."
+	;;	
+      lucid )
+	USE_X_TOOLKIT=LUCID
+	echo "  Using Lucid toolkit."
+	;;	
+      motif )
+	USE_X_TOOLKIT=MOTIF
+	echo "  Using Motif toolkit."
+	;;	
+      open-look )
+	USE_X_TOOLKIT=OPEN_LOOK
+	echo "  Using Open-Look toolkit."
+	;;	
+      * )
+	USE_X_TOOLKIT=no
+	echo "  Using Xlib directly."
+      ;;
+    esac
   ;;
   x10 )
     HAVE_X_WINDOWS=yes
     HAVE_X11=no
+    USE_X_TOOLKIT=no
     echo "  Using X10."
   ;;
   none )
@@ -1160,6 +1199,7 @@
     echo "  Using no window system."
   ;;
 esac
+X_TOOLKIT_TYPE=$USE_X_TOOLKIT
 
 ### If we're using X11, we should use the X menu package.
 HAVE_X_MENU=no
@@ -1346,6 +1386,7 @@
 AC_SUBST(LD_SWITCH_X_SITE_AUX)
 AC_SUBST(C_SWITCH_X_SITE)
 AC_SUBST(CFLAGS)
+AC_SUBST(X_TOOLKIT_TYPE)
 
 AC_DEFINE_UNQUOTED(config_machfile,  "\"${machfile}\"")
 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
@@ -1358,6 +1399,9 @@
 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
   ] AC_DEFINE(HAVE_X_WINDOWS) [
 fi
+if [ "${USE_X_TOOLKIT}" = "yes" ] ; then
+  ] AC_DEFINE(USE_X_TOOLKIT) [
+fi
 if [ "${HAVE_X11}" = "yes" ] ; then
   ] AC_DEFINE(HAVE_X11) [
 fi
@@ -1448,7 +1492,7 @@
 test -n "${exec_prefix}" &&
   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
 ]
-AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in, [
+AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [
 # Build src/Makefile from ${srcdir}/src/Makefile.in.  This must be done
 # after src/config.h is built, since we rely on that file.