]> code.delx.au - gnu-emacs/commitdiff
* configure (progname): New option `--with-gcc'. Make it clearer
authorJim Blandy <jimb@redhat.com>
Sun, 14 Feb 1993 14:25:18 +0000 (14:25 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 14 Feb 1993 14:25:18 +0000 (14:25 +0000)
how we are trying to guess whether or not we have GCC.
* INSTALL: Document the `--with-gcc' option, and improve
description of `--with-x' options.

configure1.in

index c64177799b28502535fc988841283fd76fef78bd..19f1835b98605df4fef35703b442626220de460e 100755 (executable)
@@ -64,6 +64,12 @@ The --with-x, --with-x11 and --with-x10 options specify what window
        system to use; if all are omitted, use X11 if present.  If you
        don't want X, specify \`--with-x=no'.
 
+The --with-gcc option says that the build process should use GCC to
+       compile Emacs.  If you have GCC but don't want to use it,
+       specify \`--with-gcc=no'.  \`configure' tries to guess whether
+       or not you have GCC by searching your executable path, but if
+       it guesses incorrectly, you may need to use this.
+
 The --srcdir=DIR option specifies that the configuration and build
        processes should look for the Emacs source code in DIR, when
        DIR is not the current directory.  This option doesn't work yet.
@@ -130,6 +136,22 @@ Set it to either \`yes' or \`no'."
           eval "${opt}=\"${val}\""
         ;;
 
+       ## Has the user specified whether or not they want GCC?
+       "with_gcc" )
+         ## Make sure the value given was either "yes" or "no".
+         case "${val}" in
+           y | ye | yes )      val=yes ;;
+           n | no )            val=no  ;;
+           * )
+             (echo "${progname}: the \`--${opt}' option is supposed to have a boolean value.
+Set it to either \`yes' or \`no'."
+              echo "${short_usage}") >&2
+             exit 1
+           ;;
+         esac
+          eval "${opt}=\"${val}\""
+        ;;
+
         ## Has the user specified a source directory?
        "srcdir" )
          ## If the value was omitted, get it from the next argument.
@@ -749,17 +771,25 @@ esac
 
 
 #### Choose a compiler.
-echo "Checking for GCC."
-temppath=`echo $PATH | sed 's/^:/.:/
-                           s/::/:.:/g
-                           s/:$/:./
-                           s/:/ /g'`
-default_cc=`(
-  for dir in ${temppath}; do
-    if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
-  done
-  echo cc
-)`
+echo "Checking compilers."
+if [ "${with_gcc}" = "" ]; then
+  echo "  Searching load path for GCC."
+  temppath=`echo $PATH | sed 's/^:/.:/
+                             s/::/:.:/g
+                             s/:$/:./
+                             s/:/ /g'`
+  default_cc=`(
+    for dir in ${temppath}; do
+      if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
+    done
+    echo cc
+  )`
+else
+  case ${with_gcc} in
+    "yes" ) default_cc="gcc" ;;
+    "no"  ) default_cc="cc"  ;;
+  esac
+fi
 
 case "${default_cc}" in
   "gcc" )