Skip to content

Commit

Permalink
* configure.in: packagedir, icondir が prefix に従うように。
Browse files Browse the repository at this point in the history
* acinclude.m4 (ac_output): 第三引数が argv として Lisp 関数にわた
るように。
  • Loading branch information
nawota committed Jul 26, 2008
1 parent 2f4dc18 commit 3eb02f8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 18 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2008-07-26 Naohiro Aota <nao.aota@gmail.com>

* configure.in: packagedir, icondir $B$,(B prefix $B$K=>$&$h$&$K!#(B

* acinclude.m4 (ac_output): $BBh;00z?t$,(B argv $B$H$7$F(B Lisp $B4X?t$K$o$?(B
$B$k$h$&$K!#(B

2008-07-23 Naohiro Aota <nao.aota@gmail.com> 2008-07-23 Naohiro Aota <nao.aota@gmail.com>


* bcomp.el: XEmacs $B$N%3%s%Q%$%k;~%a%C%;!<%8%l%Y%k$rJQ99!#(B * bcomp.el: XEmacs $B$N%3%s%Q%$%k;~%a%C%;!<%8%l%Y%k$rJQ99!#(B
Expand Down
6 changes: 3 additions & 3 deletions acinclude.m4
Expand Up @@ -6,12 +6,12 @@ AC_DEFUN([AC_EMACS_LISP],[dnl
{ ac_temp=./conftemp.$$ { ac_temp=./conftemp.$$
ac_output=confout.$$ ac_output=confout.$$
rm -f $ac_temp $ac_output rm -f $ac_temp $ac_output
cat >$ac_temp <<\_ACEOF cat >>$ac_temp <<\_ACEOF
(defun ac-temp-func () (defun ac-temp-func (&optional argv)
$2 $2
(princ "\n") ; make sure the output has trailing newline. (princ "\n") ; make sure the output has trailing newline.
) )
_ACEOF _ACEOF
$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output $EMACS -batch -q -l $ac_temp -eval "(ac-temp-func $3)" | sed -e '/^ *$/d' > $ac_output
$1=`cat $ac_output` $1=`cat $ac_output`
rm -f $ac_temp $ac_output; }]) rm -f $ac_temp $ac_output; }])
41 changes: 30 additions & 11 deletions configure
Expand Up @@ -2360,16 +2360,16 @@ $as_echo_n "checking detecting your emacs type... " >&6; }
{ ac_temp=./conftemp.$$ { ac_temp=./conftemp.$$
ac_output=confout.$$ ac_output=confout.$$
rm -f $ac_temp $ac_output rm -f $ac_temp $ac_output
cat >$ac_temp <<\_ACEOF cat >>$ac_temp <<\_ACEOF
(defun ac-temp-func () (defun ac-temp-func (&optional argv)
(princ (cond ((featurep 'xemacs) 'xemacs) (princ (cond ((featurep 'xemacs) 'xemacs)
((>= emacs-major-version 21) 'emacs21) ((>= emacs-major-version 21) 'emacs21)
((= emacs-major-version 20) 'emacs20) ((= emacs-major-version 20) 'emacs20)
(t 'UNKNOWN))) (t 'UNKNOWN)))
(princ "\n") ; make sure the output has trailing newline. (princ "\n") ; make sure the output has trailing newline.
) )
_ACEOF _ACEOF
$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output $EMACS -batch -q -l $ac_temp -eval "(ac-temp-func )" | sed -e '/^ *$/d' > $ac_output
emacstype=`cat $ac_output` emacstype=`cat $ac_output`
rm -f $ac_temp $ac_output; } rm -f $ac_temp $ac_output; }
{ $as_echo "$as_me:$LINENO: result: $emacstype" >&5 { $as_echo "$as_me:$LINENO: result: $emacstype" >&5
Expand All @@ -2394,13 +2394,23 @@ case "$withval" in
yes) { ac_temp=./conftemp.$$ yes) { ac_temp=./conftemp.$$
ac_output=confout.$$ ac_output=confout.$$
rm -f $ac_temp $ac_output rm -f $ac_temp $ac_output
cat >$ac_temp <<\_ACEOF cat >>$ac_temp <<\_ACEOF
(defun ac-temp-func () (defun ac-temp-func (&optional argv)
(princ (expand-file-name "../site-packages" data-directory))
(let ((prefix argv)
(default data-directory))
(princ
(if (and prefix
(not (string= prefix "NONE"))
(string-match "/\\(xemacs[^/]*/.*$\\)" default))
(expand-file-name "site-packages"
(expand-file-name (match-string 1 default)
prefix))
(expand-file-name "../site-packages" default))))
(princ "\n") ; make sure the output has trailing newline. (princ "\n") ; make sure the output has trailing newline.
) )
_ACEOF _ACEOF
$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output $EMACS -batch -q -l $ac_temp -eval "(ac-temp-func \"${prefix}\")" | sed -e '/^ *$/d' > $ac_output
packagedir=`cat $ac_output` packagedir=`cat $ac_output`
rm -f $ac_temp $ac_output; } rm -f $ac_temp $ac_output; }
;; ;;
Expand Down Expand Up @@ -2439,13 +2449,22 @@ else
{ ac_temp=./conftemp.$$ { ac_temp=./conftemp.$$
ac_output=confout.$$ ac_output=confout.$$
rm -f $ac_temp $ac_output rm -f $ac_temp $ac_output
cat >$ac_temp <<\_ACEOF cat >>$ac_temp <<\_ACEOF
(defun ac-temp-func () (defun ac-temp-func (&optional argv)
(princ (expand-file-name "navi2ch/icons" data-directory))
(let ((prefix argv)
(default data-directory))
(princ (expand-file-name "navi2ch/icons"
(if (and prefix
(not (string= prefix "NONE"))
(string-match "/\\(x?emacs[^/]*/.*$\\)" default))
(expand-file-name (match-string 1 default)
prefix)
default))))
(princ "\n") ; make sure the output has trailing newline. (princ "\n") ; make sure the output has trailing newline.
) )
_ACEOF _ACEOF
$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output $EMACS -batch -q -l $ac_temp -eval "(ac-temp-func \"${prefix}\")" | sed -e '/^ *$/d' > $ac_output
_cv_icondir=`cat $ac_output` _cv_icondir=`cat $ac_output`
rm -f $ac_temp $ac_output; } rm -f $ac_temp $ac_output; }
if test -z "$_cv_icondir"; then if test -z "$_cv_icondir"; then
Expand Down
27 changes: 23 additions & 4 deletions configure.in
Expand Up @@ -26,8 +26,18 @@ AC_ARG_WITH(packagedir,
[ AC_MSG_CHECKING([where package files should go]) [ AC_MSG_CHECKING([where package files should go])
test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs) test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs)
case "$withval" in case "$withval" in
yes) AC_EMACS_LISP(packagedir, [dnl yes) AC_EMACS_LISP(packagedir,[
(princ (expand-file-name "../site-packages" data-directory))]) (let ((prefix argv)
(default data-directory))
(princ
(if (and prefix
(not (string= prefix "NONE"))
(string-match "/\\(xemacs[[^/]]*/.*$\\)" default))
(expand-file-name "site-packages"
(expand-file-name (match-string 1 default)
prefix))
(expand-file-name "../site-packages" default))))],
\"${prefix}\")
;; ;;
no) unset packagedir ;; no) unset packagedir ;;
*) packagedir="$withval" ;; *) packagedir="$withval" ;;
Expand All @@ -50,8 +60,17 @@ AC_MSG_RESULT([$icondir])],
[ [
if test -z "${icondir}"; then if test -z "${icondir}"; then
AC_CACHE_CHECK([where icon files should go], [_cv_icondir], [dnl AC_CACHE_CHECK([where icon files should go], [_cv_icondir], [dnl
AC_EMACS_LISP(_cv_icondir,[dnl AC_EMACS_LISP(_cv_icondir,[
(princ (expand-file-name "navi2ch/icons" data-directory))]) (let ((prefix argv)
(default data-directory))
(princ (expand-file-name "navi2ch/icons"
(if (and prefix
(not (string= prefix "NONE"))
(string-match "/\\(x?emacs[[^/]]*/.*$\\)" default))
(expand-file-name (match-string 1 default)
prefix)
default))))],
\"${prefix}\")
if test -z "$_cv_icondir"; then if test -z "$_cv_icondir"; then
_cv_icondir='${datadir}/pixmaps/navi2ch' _cv_icondir='${datadir}/pixmaps/navi2ch'
fi fi
Expand Down

0 comments on commit 3eb02f8

Please sign in to comment.