Subject: pkg/17733: devel/autoconf-devel detects emacs by mistake
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 07/26/2002 23:32:02
>Number:         17733
>Category:       pkg
>Synopsis:       devel/autoconf-devel detects emacs by mistake
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 26 14:31:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6E
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6E NetBSD 1.6E (DARKSTAR) #1: Fri Jul 26 18:51:08 CEST 2002 jmmv@darkstar.local:/var/stage/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	The configure script of devel/autoconf-devel tries to detect the
	presence of emacs. If it exist, it installs extra files (emacs
	modes), and if it is not installed, it installs nothing else. The
	configure script has no argument to disable this behavior. Therefore,
	the patch needs to remove everything from the configure script that
	belongs to emacs detection.

	Why is this wrong? Because new files do not get registered in the
	PLIST, and package behavior is different if emacs is present or not,
	a thing that should not happen.

	As said, the patch removes everything referring to emacs. The other
	solution would be to always install the files...
>How-To-Repeat:
	
>Fix:
	Incorporate these two patches and update distinfo:

	patches/patch-ab
	----------------

$NetBSD$

--- configure.orig	Fri Mar  8 14:09:59 2002
+++ configure	Fri Jul 26 23:22:41 2002
@@ -1707,100 +1707,6 @@
    { (exit 1); exit 1; }; }
 }
 
-# Emacs modes.
-ac_config_files="$ac_config_files lib/emacs/Makefile"
-
-
-# Check whether --with-lispdir or --without-lispdir was given.
-if test "${with_lispdir+set}" = set; then
-  withval="$with_lispdir"
-   lispdir="$withval"
-   echo "$as_me:$LINENO: checking where .elc files should go" >&5
-echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
-   echo "$as_me:$LINENO: result: $lispdir" >&5
-echo "${ECHO_T}$lispdir" >&6
-else
-
- # If set to t, that means we are running in a shell under Emacs.
- # If you have an Emacs named "t", then use the full path.
- test x"$EMACS" = xt && EMACS=
- for ac_prog in emacs xemacs
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_EMACS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$EMACS"; then
-  ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_EMACS="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-EMACS=$ac_cv_prog_EMACS
-if test -n "$EMACS"; then
-  echo "$as_me:$LINENO: result: $EMACS" >&5
-echo "${ECHO_T}$EMACS" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$EMACS" && break
-done
-test -n "$EMACS" || EMACS="no"
-
- if test $EMACS != "no"; then
-   if test x${lispdir+set} != xset; then
-     echo "$as_me:$LINENO: checking where .elc files should go" >&5
-echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
-if test "${am_cv_lispdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
-  # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
-  #  which is non-obvious for non-emacs users.
-  # Redirecting /dev/null should help a bit; pity we can't detect "broken"
-  #  emacsen earlier and avoid running this altogether.
-  { (echo "$as_me:$LINENO: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' </dev/null >conftest.out") >&5
-  ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        am_cv_lispdir=`sed -n \
-       -e 's,/$,,' \
-       -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' \
-       -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}' \
-       conftest.out`
-       rm conftest.out
-       if test -z "$am_cv_lispdir"; then
-         am_cv_lispdir='${datadir}/emacs/site-lisp'
-       fi
-
-fi
-echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5
-echo "${ECHO_T}$am_cv_lispdir" >&6
-     lispdir="$am_cv_lispdir"
-   fi
- fi
-
-fi;
-
 
 
 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile"
@@ -2317,7 +2223,6 @@
   "tests/autoupdate" ) CONFIG_FILES="$CONFIG_FILES tests/autoupdate:tests/wrappl.in" ;;
   "tests/ifnames" ) CONFIG_FILES="$CONFIG_FILES tests/ifnames:tests/wrappl.in" ;;
   "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-  "lib/emacs/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/emacs/Makefile" ;;
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
   "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;


	patches/patch-ac
	----------------

$NetBSD$

--- lib/Makefile.in.orig	Fri Jul 26 23:25:25 2002
+++ lib/Makefile.in	Fri Jul 26 23:25:31 2002
@@ -80,7 +80,7 @@
 install_sh = @install_sh@
 lispdir = @lispdir@
 
-SUBDIRS = Autom4te m4sugar autoconf autotest autoscan emacs
+SUBDIRS = Autom4te m4sugar autoconf autotest autoscan
 nodist_pkgdata_DATA = autom4te.cfg
 EXTRA_DIST = autom4te.in freeze.mk
 
>Release-Note:
>Audit-Trail:
>Unformatted: