Skip to content
Browse files

* configure.in: packagedir, icondir が prefix に従うように。

* acinclude.m4 (ac_output): 第三引数が argv として Lisp 関数にわた
るように。
  • Loading branch information...
1 parent 2f4dc18 commit 3eb02f8530f8fb6e5df0c555e30d37e44a935c67 nawota committed
Showing with 63 additions and 18 deletions.
  1. +7 −0 ChangeLog
  2. +3 −3 acinclude.m4
  3. +30 −11 configure
  4. +23 −4 configure.in
View
7 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>
* bcomp.el: XEmacs $B$N%3%s%Q%$%k;~%a%C%;!<%8%l%Y%k$rJQ99!#(B
View
6 acinclude.m4
@@ -6,12 +6,12 @@ AC_DEFUN([AC_EMACS_LISP],[dnl
{ ac_temp=./conftemp.$$
ac_output=confout.$$
rm -f $ac_temp $ac_output
-cat >$ac_temp <<\_ACEOF
-(defun ac-temp-func ()
+cat >>$ac_temp <<\_ACEOF
+(defun ac-temp-func (&optional argv)
$2
(princ "\n") ; make sure the output has trailing newline.
)
_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`
rm -f $ac_temp $ac_output; }])
View
41 configure
@@ -2360,8 +2360,8 @@ $as_echo_n "checking detecting your emacs type... " >&6; }
{ ac_temp=./conftemp.$$
ac_output=confout.$$
rm -f $ac_temp $ac_output
-cat >$ac_temp <<\_ACEOF
-(defun ac-temp-func ()
+cat >>$ac_temp <<\_ACEOF
+(defun ac-temp-func (&optional argv)
(princ (cond ((featurep 'xemacs) 'xemacs)
((>= emacs-major-version 21) 'emacs21)
((= emacs-major-version 20) 'emacs20)
@@ -2369,7 +2369,7 @@ cat >$ac_temp <<\_ACEOF
(princ "\n") ; make sure the output has trailing newline.
)
_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`
rm -f $ac_temp $ac_output; }
{ $as_echo "$as_me:$LINENO: result: $emacstype" >&5
@@ -2394,13 +2394,23 @@ case "$withval" in
yes) { ac_temp=./conftemp.$$
ac_output=confout.$$
rm -f $ac_temp $ac_output
-cat >$ac_temp <<\_ACEOF
-(defun ac-temp-func ()
-(princ (expand-file-name "../site-packages" data-directory))
+cat >>$ac_temp <<\_ACEOF
+(defun ac-temp-func (&optional argv)
+
+(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.
)
_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`
rm -f $ac_temp $ac_output; }
;;
@@ -2439,13 +2449,22 @@ else
{ ac_temp=./conftemp.$$
ac_output=confout.$$
rm -f $ac_temp $ac_output
-cat >$ac_temp <<\_ACEOF
-(defun ac-temp-func ()
-(princ (expand-file-name "navi2ch/icons" data-directory))
+cat >>$ac_temp <<\_ACEOF
+(defun ac-temp-func (&optional argv)
+
+(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.
)
_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`
rm -f $ac_temp $ac_output; }
if test -z "$_cv_icondir"; then
View
27 configure.in
@@ -26,8 +26,18 @@ AC_ARG_WITH(packagedir,
[ AC_MSG_CHECKING([where package files should go])
test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs)
case "$withval" in
-yes) AC_EMACS_LISP(packagedir, [dnl
-(princ (expand-file-name "../site-packages" data-directory))])
+yes) AC_EMACS_LISP(packagedir,[
+(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 ;;
*) packagedir="$withval" ;;
@@ -50,8 +60,17 @@ AC_MSG_RESULT([$icondir])],
[
if test -z "${icondir}"; then
AC_CACHE_CHECK([where icon files should go], [_cv_icondir], [dnl
- AC_EMACS_LISP(_cv_icondir,[dnl
-(princ (expand-file-name "navi2ch/icons" data-directory))])
+ AC_EMACS_LISP(_cv_icondir,[
+(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
_cv_icondir='${datadir}/pixmaps/navi2ch'
fi

0 comments on commit 3eb02f8

Please sign in to comment.
Something went wrong with that request. Please try again.