Stephen Turnbull avatar Stephen Turnbull committed dede3f6

Sanity check package roots in configure.

Comments (0)

Files changed (3)

+2012-08-04  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* configure.ac (Package Search): New Installation section.
+	Warn about missing system package hierarchies.
+
+	* configure: Regenerate.
+
 2012-08-02  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* XEmacs 21.5.32 "habanero" is released.
     - Consider configuring with --with-pdump." ;;
 esac
 
+
+echo "
+Package Search (a 'root' contains '{xemacs,mule,site}-packages'):"
+
+if test -n "$with_early_packages"; then
+  case "$with_early_packages" in *:* ) case "$opsys" in *cygwin* )
+  echo "  WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_early_packages="`echo '' $with_early_packages | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+  echo "  User package roots:    $with_early_packages"
+else
+  echo "  User package roots:    ~/.xemacs"
+fi
+
+with_late_packages_expanded=$with_late_packages
+while true; do
+  case "$with_late_packages_expanded" in
+    *\$* ) eval "with_late_packages_expanded=$with_late_packages_expanded" ;;
+    *) break ;;
+  esac
+done
+case "$with_late_packages_expanded" in *:* ) case "$opsys" in *cygwin* )
+  echo "  WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_late_packages_expanded="`echo '' $with_late_packages_expanded | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+echo "  System package roots:  $with_late_packages_expanded"
+for path in $with_late_packages_expanded; do
+  if test ! -d $path; then
+    echo "    WARNING: $path was specified, but doesn't exist."
+    echo "    WARNING: XEmacs functionality will be noticably limited until"
+    echo "    WARNING: some packages are installed."
+  elif test ! -d "$path/xemacs-packages" \
+         -a ! -d "$path/mule-packages" \
+         -a ! -d "$path/site-packages"; then
+    echo "    WARNING: No packages found in $path."
+    echo "    WARNING: XEmacs functionality will be noticably limited until"
+    echo "    WARNING: some packages are installed."
+  fi
+done
+if test -z "$with_late_packages"; then
+  echo "    XEmacs BUG: with_late_packages is unset.  Please report this!"
+fi
+
+if test -n "$with_last_packages"; then
+  case "$with_last_packages" in *:* ) case "$opsys" in *cygwin* )
+  echo "  WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_last_packages="`echo '' $with_last_packages | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+  echo "  Legacy package roots:  $with_last_packages"
+  for path in $with_last_packages; do
+    if test ! -d $path; then
+      echo "    WARNING: $path was specified, but doesn't exist."
+      echo "    WARNING: If you don't need this setting, it is recommended"
+      echo "    WARNING: that you not use it."
+    elif test ! -d "$path/xemacs-packages" \
+           -a ! -d "$path/mule-packages" \
+           -a ! -d "$path/site-packages"; then
+      echo "    WARNING: No packages found in $path."
+      echo "    WARNING: If you don't need this setting, it is recommended"
+      echo "    WARNING: that you not use it."
+    fi
+  done
+fi
+
 echo "
 Window System:"
 if test "$with_msw" = "yes"; then
     - Consider configuring with --with-pdump." ;;
 esac
 
+define(COLON_TO_SPACE_WARN,
+  [case "$[$1]" in *:* [)] dnl
+case "$opsys" in *cygwin* [)]
+  echo "  WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+[$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
+
+echo "
+Package Search (a 'root' contains '{xemacs,mule,site}-packages'):"
+
+if test -n "$with_early_packages"; then
+  COLON_TO_SPACE_WARN(with_early_packages)
+  echo "  User package roots:    $with_early_packages"
+else
+  echo "  User package roots:    ~/.xemacs"
+fi
+
+dnl Unlike the others, with_late_packages gets a non-null default.
+XE_EXPAND_VARIABLE(with_late_packages,with_late_packages_expanded)
+COLON_TO_SPACE_WARN(with_late_packages_expanded)
+echo "  System package roots:  $with_late_packages_expanded"
+for path in $with_late_packages_expanded; do
+  if test ! -d $path; then
+    echo "    WARNING: $path was specified, but doesn't exist."
+    echo "    WARNING: XEmacs functionality will be noticably limited until"
+    echo "    WARNING: some packages are installed."
+  elif test ! -d "$path/xemacs-packages" \
+         -a ! -d "$path/mule-packages" \
+         -a ! -d "$path/site-packages"; then
+    echo "    WARNING: No packages found in $path."
+    echo "    WARNING: XEmacs functionality will be noticably limited until"
+    echo "    WARNING: some packages are installed."
+  fi
+done
+dnl #### Shouldn't need this.
+if test -z "$with_late_packages"; then
+  echo "    XEmacs BUG: with_late_packages is unset.  Please report this!"
+fi
+
+if test -n "$with_last_packages"; then
+  COLON_TO_SPACE_WARN(with_last_packages)
+  echo "  Legacy package roots:  $with_last_packages"
+  for path in $with_last_packages; do
+    if test ! -d $path; then
+      echo "    WARNING: $path was specified, but doesn't exist."
+      echo "    WARNING: If you don't need this setting, it is recommended"
+      echo "    WARNING: that you not use it."
+    elif test ! -d "$path/xemacs-packages" \
+           -a ! -d "$path/mule-packages" \
+           -a ! -d "$path/site-packages"; then
+      echo "    WARNING: No packages found in $path."
+      echo "    WARNING: If you don't need this setting, it is recommended"
+      echo "    WARNING: that you not use it."
+    fi
+  done
+fi
+
 echo "
 Window System:"
 if test "$with_msw" = "yes"; then
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.