• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

シェルスクリプト言語xyzshのソースコード。


コミットメタ情報

リビジョン967acf964d9b85b484ffa7de802da7b9d555c080 (tree)
日時2013-02-03 14:24:37
作者ab25cq <ab25cq@gmai...>
コミッターab25cq

ログメッセージ

1.3.3

変更サマリ

差分

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,5 @@
11
2-2013 1st Feburary version 1.3.3
2+2013 3rd Feburary version 1.3.3
33
44 1. Modified configure.in and Makfile.in especially for related with docdir and sysconfdir
55
--- a/Makefile.in
+++ b/Makefile.in
@@ -96,7 +96,10 @@ $(OBJ): src/xyzsh/xyzsh.h src/xyzsh/block.h src/xyzsh/curses.h src/xyzsh/debug.h
9696 extension: $(EXTOBJ)
9797
9898 src/ext/migemo.so: src/ext/migemo.c
99- gcc -shared src/ext/migemo.c -o src/ext/migemo.so -lmigemo -lxyzsh $(LIBS) $(CFLAGS)
99+ gcc -shared src/ext/migemo.c -o src/ext/migemo.so $(CFLAGS) -lmigemo -lxyzsh $(LIBS)
100+
101+src/ext/migemo.dll: src/ext/migemo.c
102+ gcc -shared src/ext/migemo.c -o src/ext/migemo.dll $(CFLAGS) -lmigemo -lxyzsh $(LIBS)
100103
101104 #########################################################
102105 # install
@@ -132,9 +135,11 @@ normal-install:
132135 $(INSTALL) -m 644 completion.xyzsh "$(sysconfdir)"
133136 $(INSTALL) -m 644 help.xyzsh "$(sysconfdir)"
134137 $(INSTALL) -m 644 read_history.xyzsh "$(sysconfdir)"
135- mkdir -p "$(DESTDIR)/$(EXTDIR)"
138+ mkdir -p "$(EXTDIR)"
136139 if test -e src/ext/migemo.so; then $(INSTALL) -m 755 src/ext/migemo.so "$(EXTDIR)"; fi
140+ if test -e src/ext/migemo.dll; then $(INSTALL) -m 755 src/ext/migemo.dll "$(EXTDIR)"; fi
137141 if test -e src/ext/migemo.so; then $(INSTALL) -m 644 src/ext/migemo.so.xyzsh "$(EXTDIR)"; fi
142+ if test -e src/ext/migemo.dll; then $(INSTALL) -m 644 src/ext/migemo.dll.xyzsh "$(EXTDIR)"; fi
138143
139144 dest-install:
140145 mkdir -p "$(DESTDIR)/$(bindir)";
@@ -165,7 +170,9 @@ dest-install:
165170 $(INSTALL) -m 644 read_history.xyzsh "$(DESTDIR)/$(sysconfdir)"
166171 mkdir -p "$(DESTDIR)/$(EXTDIR)"
167172 if test -e src/ext/migemo.so; then $(INSTALL) -m 755 src/ext/migemo.so "$(DESTDIR)/$(EXTDIR)"; fi
173+ if test -e src/ext/migemo.dll; then $(INSTALL) -m 755 src/ext/migemo.dll "$(DESTDIR)/$(EXTDIR)"; fi
168174 if test -e src/ext/migemo.so; then $(INSTALL) -m 644 src/ext/migemo.so.xyzsh "$(DESTDIR)/$(EXTDIR)"; fi
175+ if test -e src/ext/migemo.dll; then $(INSTALL) -m 644 src/ext/migemo.dll.xyzsh "$(DESTDIR)/$(EXTDIR)"; fi
169176
170177 #########################################################
171178 # uninstall
@@ -208,7 +215,8 @@ permission:
208215 # clean
209216 ########################################################
210217 clean:
211- rm -fR xyzsh xyzsh.dSYM src/*.o libxyzsh* xyzsh.exe* config.log config.status *.stackdump autom4te.cache .DS_Store src/ext/*.so src/ext/*.o src/ext/migemo.so.dSYM
218+ rm -fR xyzsh xyzsh.dSYM src/*.o libxyzsh* xyzsh.exe* config.log config.status *.stackdump autom4te.cache .DS_Store src/ext/*.stackdump src/ext/*.dll src/ext/*.so src/ext/*.o src/ext/migemo.so.dSYM src/ext/*.a
212219
213220 distclean:
214- rm -fR xyzsh xyzsh.dSYM src/*.o libxyzsh* config.h Makefile xyzsh.exe* config.log config.status *.stackdump autom4te.cache .DS_Store src/ext/*.so src/ext/*.o src/ext/migemo.so.dSYM
221+ rm -fR xyzsh xyzsh.dSYM src/*.o libxyzsh* config.h Makefile xyzsh.exe* config.log config.status *.stackdump src/ext/*.stackdump autom4te.cache .DS_Store src/ext/*.so src/ext/*.dll src/ext/*.o src/ext/migemo.so.dSYM src/ext/*.a
222+
--- a/completion.xyzsh
+++ b/completion.xyzsh
@@ -195,8 +195,8 @@ completion kill (
195195
196196 completion load (
197197 | if(| index -quiet "-dynamic-library" ) (
198- ls $XYZSH_EXT_PATH | (| print -read-from-error; | print) | egrep '.so$'
199- ls ~/.xyzsh/lib | ( | print -read-from-error; | print ) | grep '.so$'
198+ ls $XYZSH_EXT_PATH | (| print -read-from-error; | print) | egrep '.so$|.dll$'
199+ ls ~/.xyzsh/lib | ( | print -read-from-error; | print ) | egrep '.so$|.dll$'
200200 ) else (
201201 | file_completion
202202 hash COMPLETION_OPTIONS -key load
--- a/configure
+++ b/configure
@@ -1,9 +1,11 @@
11 #! /bin/sh
22 # Guess values for system-dependent variables and create Makefiles.
3-# Generated by GNU Autoconf 2.69.
3+# Generated by GNU Autoconf 2.68.
44 #
55 #
6-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8+# Foundation, Inc.
79 #
810 #
911 # This configure script is free software; the Free Software Foundation
@@ -132,31 +134,6 @@ export LANGUAGE
132134 # CDPATH.
133135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134136
135-# Use a proper internal environment variable to ensure we don't fall
136- # into an infinite loop, continuously re-executing ourselves.
137- if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138- _as_can_reexec=no; export _as_can_reexec;
139- # We cannot yet assume a decent shell, so we have to provide a
140-# neutralization value for shells without unset; and this also
141-# works around shells that cannot unset nonexistent variables.
142-# Preserve -v and -x to the replacement shell.
143-BASH_ENV=/dev/null
144-ENV=/dev/null
145-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146-case $- in # ((((
147- *v*x* | *x*v* ) as_opts=-vx ;;
148- *v* ) as_opts=-v ;;
149- *x* ) as_opts=-x ;;
150- * ) as_opts= ;;
151-esac
152-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153-# Admittedly, this is quite paranoid, since all the known shells bail
154-# out after a failed `exec'.
155-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156-as_fn_exit 255
157- fi
158- # We don't want this to propagate to other subprocesses.
159- { _as_can_reexec=; unset _as_can_reexec;}
160137 if test "x$CONFIG_SHELL" = x; then
161138 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162139 emulate sh
@@ -190,8 +167,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190167 else
191168 exitcode=1; echo positional parameters were not saved.
192169 fi
193-test x\$exitcode = x0 || exit 1
194-test -x / || exit 1"
170+test x\$exitcode = x0 || exit 1"
195171 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196172 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197173 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -236,25 +212,21 @@ IFS=$as_save_IFS
236212
237213
238214 if test "x$CONFIG_SHELL" != x; then :
239- export CONFIG_SHELL
240- # We cannot yet assume a decent shell, so we have to provide a
241-# neutralization value for shells without unset; and this also
242-# works around shells that cannot unset nonexistent variables.
243-# Preserve -v and -x to the replacement shell.
244-BASH_ENV=/dev/null
245-ENV=/dev/null
246-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247-case $- in # ((((
248- *v*x* | *x*v* ) as_opts=-vx ;;
249- *v* ) as_opts=-v ;;
250- *x* ) as_opts=-x ;;
251- * ) as_opts= ;;
252-esac
253-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254-# Admittedly, this is quite paranoid, since all the known shells bail
255-# out after a failed `exec'.
256-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257-exit 255
215+ # We cannot yet assume a decent shell, so we have to provide a
216+ # neutralization value for shells without unset; and this also
217+ # works around shells that cannot unset nonexistent variables.
218+ # Preserve -v and -x to the replacement shell.
219+ BASH_ENV=/dev/null
220+ ENV=/dev/null
221+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222+ export CONFIG_SHELL
223+ case $- in # ((((
224+ *v*x* | *x*v* ) as_opts=-vx ;;
225+ *v* ) as_opts=-v ;;
226+ *x* ) as_opts=-x ;;
227+ * ) as_opts= ;;
228+ esac
229+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
258230 fi
259231
260232 if test x$as_have_required = xno; then :
@@ -356,14 +328,6 @@ $as_echo X"$as_dir" |
356328
357329
358330 } # as_fn_mkdir_p
359-
360-# as_fn_executable_p FILE
361-# -----------------------
362-# Test if FILE is an executable regular file.
363-as_fn_executable_p ()
364-{
365- test -f "$1" && test -x "$1"
366-} # as_fn_executable_p
367331 # as_fn_append VAR VALUE
368332 # ----------------------
369333 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -485,10 +449,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
485449 chmod +x "$as_me.lineno" ||
486450 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487451
488- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489- # already done that, so ensure we don't try to do so again and fall
490- # in an infinite loop. This has already happened in practice.
491- _as_can_reexec=no; export _as_can_reexec
492452 # Don't try to exec as it changes $[0], causing all sort of problems
493453 # (the dirname of $[0] is not the place where we might find the
494454 # original and so on. Autoconf is especially sensitive to this).
@@ -523,16 +483,16 @@ if (echo >conf$$.file) 2>/dev/null; then
523483 # ... but there are two gotchas:
524484 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525485 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526- # In both cases, we have to default to `cp -pR'.
486+ # In both cases, we have to default to `cp -p'.
527487 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528- as_ln_s='cp -pR'
488+ as_ln_s='cp -p'
529489 elif ln conf$$.file conf$$ 2>/dev/null; then
530490 as_ln_s=ln
531491 else
532- as_ln_s='cp -pR'
492+ as_ln_s='cp -p'
533493 fi
534494 else
535- as_ln_s='cp -pR'
495+ as_ln_s='cp -p'
536496 fi
537497 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538498 rmdir conf$$.dir 2>/dev/null
@@ -544,8 +504,28 @@ else
544504 as_mkdir_p=false
545505 fi
546506
547-as_test_x='test -x'
548-as_executable_p=as_fn_executable_p
507+if test -x / >/dev/null 2>&1; then
508+ as_test_x='test -x'
509+else
510+ if ls -dL / >/dev/null 2>&1; then
511+ as_ls_L_option=L
512+ else
513+ as_ls_L_option=
514+ fi
515+ as_test_x='
516+ eval sh -c '\''
517+ if test -d "$1"; then
518+ test -d "$1/.";
519+ else
520+ case $1 in #(
521+ -*)set "./$1";;
522+ esac;
523+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
524+ ???[sx]*):;;*)false;;esac;fi
525+ '\'' sh
526+ '
527+fi
528+as_executable_p=$as_test_x
549529
550530 # Sed expression to map a string onto a valid CPP name.
551531 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1158,6 +1138,8 @@ target=$target_alias
11581138 if test "x$host_alias" != x; then
11591139 if test "x$build_alias" = x; then
11601140 cross_compiling=maybe
1141+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1142+ If a cross compiler is detected then cross compile mode will be used" >&2
11611143 elif test "x$build_alias" != "x$host_alias"; then
11621144 cross_compiling=yes
11631145 fi
@@ -1396,9 +1378,9 @@ test -n "$ac_init_help" && exit $ac_status
13961378 if $ac_init_version; then
13971379 cat <<\_ACEOF
13981380 configure
1399-generated by GNU Autoconf 2.69
1381+generated by GNU Autoconf 2.68
14001382
1401-Copyright (C) 2012 Free Software Foundation, Inc.
1383+Copyright (C) 2010 Free Software Foundation, Inc.
14021384 This configure script is free software; the Free Software Foundation
14031385 gives unlimited permission to copy, distribute and modify it.
14041386 _ACEOF
@@ -1671,7 +1653,7 @@ $as_echo "$ac_try_echo"; } >&5
16711653 test ! -s conftest.err
16721654 } && test -s conftest$ac_exeext && {
16731655 test "$cross_compiling" = yes ||
1674- test -x conftest$ac_exeext
1656+ $as_test_x conftest$ac_exeext
16751657 }; then :
16761658 ac_retval=0
16771659 else
@@ -1694,7 +1676,7 @@ This file contains any messages produced by compilers while
16941676 running configure, to aid debugging if configure makes a mistake.
16951677
16961678 It was created by $as_me, which was
1697-generated by GNU Autoconf 2.69. Invocation command line was
1679+generated by GNU Autoconf 2.68. Invocation command line was
16981680
16991681 $ $0 $@
17001682
@@ -1952,7 +1934,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
19521934 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19531935 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19541936 as_fn_error $? "failed to load site script $ac_site_file
1955-See \`config.log' for more details" "$LINENO" 5; }
1937+See \`config.log' for more details" "$LINENO" 5 ; }
19561938 fi
19571939 done
19581940
@@ -2067,7 +2049,7 @@ do
20672049 IFS=$as_save_IFS
20682050 test -z "$as_dir" && as_dir=.
20692051 for ac_exec_ext in '' $ac_executable_extensions; do
2070- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2052+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20712053 ac_cv_prog_CC="${ac_tool_prefix}gcc"
20722054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20732055 break 2
@@ -2107,7 +2089,7 @@ do
21072089 IFS=$as_save_IFS
21082090 test -z "$as_dir" && as_dir=.
21092091 for ac_exec_ext in '' $ac_executable_extensions; do
2110- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2092+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21112093 ac_cv_prog_ac_ct_CC="gcc"
21122094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132095 break 2
@@ -2160,7 +2142,7 @@ do
21602142 IFS=$as_save_IFS
21612143 test -z "$as_dir" && as_dir=.
21622144 for ac_exec_ext in '' $ac_executable_extensions; do
2163- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2145+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21642146 ac_cv_prog_CC="${ac_tool_prefix}cc"
21652147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21662148 break 2
@@ -2201,7 +2183,7 @@ do
22012183 IFS=$as_save_IFS
22022184 test -z "$as_dir" && as_dir=.
22032185 for ac_exec_ext in '' $ac_executable_extensions; do
2204- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2186+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22052187 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
22062188 ac_prog_rejected=yes
22072189 continue
@@ -2259,7 +2241,7 @@ do
22592241 IFS=$as_save_IFS
22602242 test -z "$as_dir" && as_dir=.
22612243 for ac_exec_ext in '' $ac_executable_extensions; do
2262- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2244+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22632245 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
22642246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22652247 break 2
@@ -2303,7 +2285,7 @@ do
23032285 IFS=$as_save_IFS
23042286 test -z "$as_dir" && as_dir=.
23052287 for ac_exec_ext in '' $ac_executable_extensions; do
2306- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2288+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23072289 ac_cv_prog_ac_ct_CC="$ac_prog"
23082290 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23092291 break 2
@@ -2346,7 +2328,7 @@ fi
23462328 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23472329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23482330 as_fn_error $? "no acceptable C compiler found in \$PATH
2349-See \`config.log' for more details" "$LINENO" 5; }
2331+See \`config.log' for more details" "$LINENO" 5 ; }
23502332
23512333 # Provide some information about the compiler.
23522334 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2461,7 +2443,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
24612443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24622444 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24632445 as_fn_error 77 "C compiler cannot create executables
2464-See \`config.log' for more details" "$LINENO" 5; }
2446+See \`config.log' for more details" "$LINENO" 5 ; }
24652447 else
24662448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24672449 $as_echo "yes" >&6; }
@@ -2504,7 +2486,7 @@ else
25042486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25052487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25062488 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2507-See \`config.log' for more details" "$LINENO" 5; }
2489+See \`config.log' for more details" "$LINENO" 5 ; }
25082490 fi
25092491 rm -f conftest conftest$ac_cv_exeext
25102492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2563,7 +2545,7 @@ $as_echo "$ac_try_echo"; } >&5
25632545 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25642546 as_fn_error $? "cannot run C compiled programs.
25652547 If you meant to cross compile, use \`--host'.
2566-See \`config.log' for more details" "$LINENO" 5; }
2548+See \`config.log' for more details" "$LINENO" 5 ; }
25672549 fi
25682550 fi
25692551 fi
@@ -2615,7 +2597,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
26152597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26162598 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26172599 as_fn_error $? "cannot compute suffix of object files: cannot compile
2618-See \`config.log' for more details" "$LINENO" 5; }
2600+See \`config.log' for more details" "$LINENO" 5 ; }
26192601 fi
26202602 rm -f conftest.$ac_cv_objext conftest.$ac_ext
26212603 fi
@@ -2749,7 +2731,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27492731 /* end confdefs.h. */
27502732 #include <stdarg.h>
27512733 #include <stdio.h>
2752-struct stat;
2734+#include <sys/types.h>
2735+#include <sys/stat.h>
27532736 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
27542737 struct buf { int x; };
27552738 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2900,7 +2883,7 @@ case $as_dir/ in #((
29002883 # by default.
29012884 for ac_prog in ginstall scoinst install; do
29022885 for ac_exec_ext in '' $ac_executable_extensions; do
2903- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2886+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
29042887 if test $ac_prog = install &&
29052888 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
29062889 # AIX install. It has an incompatible calling convention.
@@ -3114,7 +3097,8 @@ elif uname -s | grep -q CYGWIN_NT; then
31143097
31153098
31163099 CFLAGS="-Isrc/ -I. -L. -I$myprefix/include -L$myprefix/lib $CFLAGS"
3117- STATIC_LINK=1
3100+
3101+ LIBXYZSHA=libxyzsh.a
31183102 else
31193103 echo "Linux"
31203104
@@ -3353,7 +3337,7 @@ else
33533337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33543338 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33553339 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3356-See \`config.log' for more details" "$LINENO" 5; }
3340+See \`config.log' for more details" "$LINENO" 5 ; }
33573341 fi
33583342
33593343 ac_ext=c
@@ -3379,7 +3363,7 @@ do
33793363 for ac_prog in grep ggrep; do
33803364 for ac_exec_ext in '' $ac_executable_extensions; do
33813365 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3382- as_fn_executable_p "$ac_path_GREP" || continue
3366+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
33833367 # Check for GNU ac_path_GREP and select it if it is found.
33843368 # Check for GNU $ac_path_GREP
33853369 case `"$ac_path_GREP" --version 2>&1` in
@@ -3445,7 +3429,7 @@ do
34453429 for ac_prog in egrep; do
34463430 for ac_exec_ext in '' $ac_executable_extensions; do
34473431 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3448- as_fn_executable_p "$ac_path_EGREP" || continue
3432+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
34493433 # Check for GNU ac_path_EGREP and select it if it is found.
34503434 # Check for GNU $ac_path_EGREP
34513435 case `"$ac_path_EGREP" --version 2>&1` in
@@ -3975,7 +3959,19 @@ ac_cv_lib_onig=ac_cv_lib_onig_main
39753959 ###########################################################################
39763960 if test $ENABLE_MIGEMO = 1
39773961 then
3978- ac_fn_c_check_header_mongrel "$LINENO" "migemo.h" "ac_cv_header_migemo_h" "$ac_includes_default"
3962+ if test "$OS" = CYGWIN
3963+ then
3964+ ac_fn_c_check_header_mongrel "$LINENO" "migemo.h" "ac_cv_header_migemo_h" "$ac_includes_default"
3965+if test "x$ac_cv_header_migemo_h" = xyes; then :
3966+ EXTOBJ="$EXTOBJ src/ext/migemo.dll"; OBJ="$OBJ src/ext/migemo.o"; LIBS="$LIBS -lmigemo"; $as_echo "#define HAVE_MIGEMO_H 1" >>confdefs.h
3967+
3968+else
3969+ exit
3970+fi
3971+
3972+
3973+ else
3974+ ac_fn_c_check_header_mongrel "$LINENO" "migemo.h" "ac_cv_header_migemo_h" "$ac_includes_default"
39793975 if test "x$ac_cv_header_migemo_h" = xyes; then :
39803976 EXTOBJ="$EXTOBJ src/ext/migemo.so"; $as_echo "#define HAVE_MIGEMO_H 1" >>confdefs.h
39813977
@@ -3984,6 +3980,7 @@ else
39843980 fi
39853981
39863982
3983+ fi
39873984 fi
39883985
39893986
@@ -4415,16 +4412,16 @@ if (echo >conf$$.file) 2>/dev/null; then
44154412 # ... but there are two gotchas:
44164413 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
44174414 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
4418- # In both cases, we have to default to `cp -pR'.
4415+ # In both cases, we have to default to `cp -p'.
44194416 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
4420- as_ln_s='cp -pR'
4417+ as_ln_s='cp -p'
44214418 elif ln conf$$.file conf$$ 2>/dev/null; then
44224419 as_ln_s=ln
44234420 else
4424- as_ln_s='cp -pR'
4421+ as_ln_s='cp -p'
44254422 fi
44264423 else
4427- as_ln_s='cp -pR'
4424+ as_ln_s='cp -p'
44284425 fi
44294426 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
44304427 rmdir conf$$.dir 2>/dev/null
@@ -4484,16 +4481,28 @@ else
44844481 as_mkdir_p=false
44854482 fi
44864483
4487-
4488-# as_fn_executable_p FILE
4489-# -----------------------
4490-# Test if FILE is an executable regular file.
4491-as_fn_executable_p ()
4492-{
4493- test -f "$1" && test -x "$1"
4494-} # as_fn_executable_p
4495-as_test_x='test -x'
4496-as_executable_p=as_fn_executable_p
4484+if test -x / >/dev/null 2>&1; then
4485+ as_test_x='test -x'
4486+else
4487+ if ls -dL / >/dev/null 2>&1; then
4488+ as_ls_L_option=L
4489+ else
4490+ as_ls_L_option=
4491+ fi
4492+ as_test_x='
4493+ eval sh -c '\''
4494+ if test -d "$1"; then
4495+ test -d "$1/.";
4496+ else
4497+ case $1 in #(
4498+ -*)set "./$1";;
4499+ esac;
4500+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
4501+ ???[sx]*):;;*)false;;esac;fi
4502+ '\'' sh
4503+ '
4504+fi
4505+as_executable_p=$as_test_x
44974506
44984507 # Sed expression to map a string onto a valid CPP name.
44994508 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4515,7 +4524,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45154524 # values after options handling.
45164525 ac_log="
45174526 This file was extended by $as_me, which was
4518-generated by GNU Autoconf 2.69. Invocation command line was
4527+generated by GNU Autoconf 2.68. Invocation command line was
45194528
45204529 CONFIG_FILES = $CONFIG_FILES
45214530 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4577,10 +4586,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
45774586 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
45784587 ac_cs_version="\\
45794588 config.status
4580-configured by $0, generated by GNU Autoconf 2.69,
4589+configured by $0, generated by GNU Autoconf 2.68,
45814590 with options \\"\$ac_cs_config\\"
45824591
4583-Copyright (C) 2012 Free Software Foundation, Inc.
4592+Copyright (C) 2010 Free Software Foundation, Inc.
45844593 This config.status script is free software; the Free Software Foundation
45854594 gives unlimited permission to copy, distribute and modify it."
45864595
@@ -4669,7 +4678,7 @@ fi
46694678 _ACEOF
46704679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
46714680 if \$ac_cs_recheck; then
4672- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4681+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
46734682 shift
46744683 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
46754684 CONFIG_SHELL='$SHELL'
@@ -4701,7 +4710,7 @@ do
47014710 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
47024711 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
47034712
4704- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
4713+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
47054714 esac
47064715 done
47074716
@@ -5018,7 +5027,7 @@ do
50185027 esac
50195028 case $ac_mode$ac_tag in
50205029 :[FHL]*:*);;
5021- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
5030+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
50225031 :[FH]-) ac_tag=-:-;;
50235032 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50245033 esac
@@ -5046,7 +5055,7 @@ do
50465055 [\\/$]*) false;;
50475056 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50485057 esac ||
5049- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
5058+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
50505059 esac
50515060 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50525061 as_fn_append ac_file_inputs " '$ac_f'"
@@ -5073,7 +5082,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
50735082
50745083 case $ac_tag in
50755084 *:-:* | *:-) cat >"$ac_tmp/stdin" \
5076- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
5085+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50775086 esac
50785087 ;;
50795088 esac
--- a/configure.in
+++ b/configure.in
@@ -98,7 +98,8 @@ elif uname -s | grep -q CYGWIN_NT; then
9898 AC_SUBST(LIBXYZSHASTRIP)
9999
100100 CFLAGS="-Isrc/ -I. -L. -I$myprefix/include -L$myprefix/lib $CFLAGS"
101- STATIC_LINK=1
101+
102+ LIBXYZSHA=libxyzsh.a
102103 else
103104 echo "Linux"
104105
@@ -264,7 +265,12 @@ AC_HAVE_LIBRARY(onig, [ LIBS="$LIBS -lonig"; ], [ exit ])
264265 ###########################################################################
265266 if test $ENABLE_MIGEMO = 1
266267 then
267- AC_CHECK_HEADER(migemo.h, [EXTOBJ="$EXTOBJ src/ext/migemo.so"; AC_DEFINE(HAVE_MIGEMO_H, 1)], [ exit ])
268+ if test "$OS" = CYGWIN
269+ then
270+ AC_CHECK_HEADER(migemo.h, [EXTOBJ="$EXTOBJ src/ext/migemo.dll"; OBJ="$OBJ src/ext/migemo.o"; LIBS="$LIBS -lmigemo"; AC_DEFINE(HAVE_MIGEMO_H, 1)], [ exit ])
271+ else
272+ AC_CHECK_HEADER(migemo.h, [EXTOBJ="$EXTOBJ src/ext/migemo.so"; AC_DEFINE(HAVE_MIGEMO_H, 1)], [ exit ])
273+ fi
268274 fi
269275
270276 AC_SUBST(EXTOBJ)
--- a/src/ext/migemo.c
+++ b/src/ext/migemo.c
@@ -212,7 +212,11 @@ BOOL cmd_migemo_match(sObject* nextin, sObject* nextout, sRunInfo* runinfo)
212212 return TRUE;
213213 }
214214
215+#if defined(__CYGWIN__)
216+int migemo_dl_init()
217+#else
215218 int dl_init()
219+#endif
216220 {
217221 migemo_init();
218222 sObject* migemo_object = UOBJECT_NEW_GC(8, gRootObject, "migemo", TRUE);
@@ -225,7 +229,11 @@ int dl_init()
225229 return 0;
226230 }
227231
232+#if defined(__CYGWIN__)
233+int migemo_dl_final()
234+#else
228235 int dl_final()
236+#endif
229237 {
230238 migemo_final();
231239
--- /dev/null
+++ b/src/ext/migemo.dll.xyzsh
@@ -0,0 +1,197 @@
1+print "welcome to migemo.so dynamic library. You can read help type with \"migemo::help 'command name'\""\n
2+
3+compl::run( root::object migemo )
4+
5+completion migemo::help (
6+ migemo::self | egrep native\ function\$ | egrep -v 'run|show' | root::scan '(^.+?):' | each ( | chomp | quote | pomch )
7+)
8+
9+migemo::run(
10+ object help ( Help )
11+
12+ print <<<'EOS'
13+match (migemo クエリー)
14+-
15+パイプからの入力とmigemoクエリーを比較してマッチしたなら、そのマッチした文字範囲のバイト数を返す。
16+
17+-quiet リターンコードだけ返し、出力は返さない
18+EOS | help::set_helps_ja
19+
20+ print <<<'EOS'
21+match (migemo querry)
22+-
23+Compare migemo querry with input from pipe data and output the string ranges.
24+
25+-quiet no output. you can get only return code.
26+EOS | help::set_helps
27+)
28+
29+root::run(
30+ class MigemoCompletion (
31+ def common_head (
32+ | each (
33+ | chomp| length -utf8
34+ ) | max | var -local max_length
35+
36+ print 0 | var -local point
37+
38+ while(true) (
39+ | each (
40+ | chomp | rows -utf8 0..$point | pomch
41+ ) | sys::sort | uniq | length -line-num | strip | if(| != 1) (
42+ -- point;
43+ break
44+ )
45+
46+ ++ point;
47+
48+ if(point | -ge $max_length) (
49+ -- point
50+ break
51+ )
52+ )
53+
54+ if(point | -ne -1) (
55+ | rows -utf8 0..$point
56+ )
57+ )
58+
59+ def ascii_only (
60+ | length -byte | var -local LEN
61+
62+ LEN | -eq $(| length -utf8)
63+ )
64+
65+ def migemo_file_completion (
66+ print $ARGV[0] | var -local inputing
67+ print $ARGV[1] | var -local editing_line
68+
69+ print 1 | var -local ALL_ASCII_ONLY
70+ | each (
71+ if(|ascii_only) (
72+ | if(| index $inputing | = 0\n) (
73+ | print
74+ )
75+ ) else (
76+ print 0 | var -local ALL_ASCII_ONLY
77+ print 0 | var -local ALL_FILES
78+
79+ if(inputing | =~ '^.*\/$') (
80+#print 0 | p > /dev/null
81+ inputing | var -local no_migemo_string
82+ print "" | var -local migemo_string
83+
84+ print 1 | var -local ALL_FILES
85+ ) elif (inputing | =~ '^.*\/[a-zA-Z]+$') (
86+#print a | p > /dev/null
87+ | if(|=~ '^.*\/[a-zA-Z]+[^a-zA-z/]+$') (
88+ (inputing; |print) | common_head | var -local same_head
89+
90+ same_head | var -local no_migemo_string
91+ inputing | sub -no-regex $same_head '' | var -local migemo_string
92+ ) else (
93+ inputing | sub '^(.*\/)[a-zA-Z]+$' '\1' | var -local no_migemo_string
94+ inputing | sub '^.*\/([a-zA-Z]+)$' '\1' | var -local migemo_string
95+ )
96+ ) elif (inputing | =~ '^.*\/[^a-zA-Z]+[a-zA-Z]+$') (
97+#print b | p > /dev/null
98+ inputing | sub '^(.*\/[^a-zA-Z]+)[a-zA-Z]+$' '\1' | var -local no_migemo_string
99+ inputing | sub '^.*\/[^a-zA-Z]+([a-zA-Z]+)$' '\1' | var -local migemo_string
100+ ) elif (inputing | =~ '^.*\/[^a-zA-Z]+$') (
101+#print b2 | p > /dev/null
102+ inputing | var -local no_migemo_string
103+ print "" | var -local migemo_string
104+ ) elif (inputing | =~ '^[a-zA-Z]+$') (
105+#print c | p > /dev/null
106+ | if(|=~ '^[a-zA-Z]+[^a-zA-z/]+$') (
107+ (inputing; |print) | common_head | var -local same_head
108+
109+ same_head | var -local no_migemo_string
110+ inputing | sub -no-regex $same_head '' | var -local migemo_string
111+ ) else (
112+ print "" | var -local no_migemo_string
113+ inputing | var -local migemo_string
114+ )
115+ ) elif (inputing | =~ '^[^a-zA-Z]+[a-zA-Z]+$') (
116+#print d | p > /dev/null
117+ inputing | sub '(^[^a-zA-Z]+)[a-zA-Z]+$' '\1' | var -local no_migemo_string
118+ inputing | sub '^[^a-zA-Z]+([a-zA-Z]+)$' '\1' | var -local migemo_string
119+ ) elif (inputing | =~ '^[^a-zA-Z]+$') (
120+ inputing | var -local no_migemo_string
121+ print "" | var -local migemo_string
122+ ) else (
123+#print e | p > /dev/null
124+ print "" | var -local no_migemo_string
125+ print "" | var -local migemo_string
126+ )
127+
128+#| p > /dev/null
129+ if(ALL_FILES | = 1\n) (
130+ | print
131+ ) else (
132+ | if(| index $no_migemo_string | = 0\n) (
133+ | if(| sub -no-regex $no_migemo_string '' | chomp | migemo::match $migemo_string | lines 0 | = 0\n) (
134+ | print
135+ )
136+ )
137+ )
138+ )
139+ ) | (| common_head | var -local COMMON_HEAD; | length -line-num | var -local NUM)
140+
141+ if(ALL_ASCII_ONLY | = 0\n && COMMON_HEAD | chomp | -n) ( # && COMMON_HEAD | length | -gt $(inputing | length)) (
142+ rl::delete_text $(editing_line | rindex $inputing) $(rl::point)
143+ if(NUM | chomp | -eq 1 && COMMON_HEAD| chomp | rows -1 | != /) (
144+ rl::insert_text $COMMON_HEAD" "
145+ ) else (
146+ rl::insert_text $COMMON_HEAD
147+ )
148+ )
149+ )
150+
151+ def file_completion (
152+ | split '(?<!\\) +' | lines -1 | var -local inputing
153+
154+ if(inputing | index -quiet /) (
155+ sys::dirname $(inputing|chomp| if (|rows -1 | = /) ( |add aaa ) else ( | print ) ) | var -local DIR
156+
157+ ls $(DIR|xyzsh_dequote|chomp) | each (
158+ | if (|chomp | add -number 0 $(DIR|xyzsh_dequote|chomp)/ | -d) (
159+ |chomp | xyzsh_quote | add -number 0 $DIR/ | add / | pomch
160+ ) else (
161+ |chomp | xyzsh_quote | add -number 0 $DIR/ | pomch
162+ )
163+ ) | migemo_file_completion $inputing $(|print)
164+ ) else (
165+ ls | each (
166+ | if (|chomp| -d) (
167+ | chomp | xyzsh_quote | add / | pomch
168+ ) else (
169+ |chomp | xyzsh_quote| pomch
170+ )
171+ ) | migemo_file_completion $inputing $(|print)
172+ )
173+ )
174+
175+ completion __all__ (
176+ | file_completion
177+ )
178+
179+ root::compl::run( root::object sys )
180+
181+ completion sys::__all__ (
182+ | file_completion
183+ )
184+ )
185+
186+ if(defined MIGEMO_COMPLETION_AUTO_LOAD) (
187+ if(MIGEMO_COMPLETION_AUTO_LOAD | = 1\n) (
188+ MigemoCompletion
189+ print "loaded migemo completion.\n"
190+ )
191+ ) else (
192+ if(readline "Do you want to use migemo completion which is Japanese ROMAJI completion?(y/n)" | chomp |=~ -ignore-case ^y) (
193+ MigemoCompletion
194+ print "loaded migemo completion.\n"
195+ )
196+ )
197+)
--- a/src/run.c
+++ b/src/run.c
@@ -1771,6 +1771,11 @@ BOOL load_file(char* fname, sObject* nextin, sObject* nextout, sRunInfo* runinfo
17711771 return TRUE;
17721772 }
17731773
1774+#if defined(__CYGWIN__)
1775+int migemo_dl_final();
1776+int migemo_dl_init();
1777+#endif
1778+
17741779 BOOL load_so_file(char* fname, sObject* nextin, sObject* nextout, sRunInfo* runinfo)
17751780 {
17761781 sCommand* command = runinfo->mCommand;
@@ -1791,9 +1796,27 @@ BOOL load_so_file(char* fname, sObject* nextin, sObject* nextout, sRunInfo* runi
17911796 }
17921797 }
17931798
1799+#if defined(__CYGWIN__)
17941800 if(hash_item(gDynamicLibraryFinals, path) == NULL) {
1795- void* handle = dlopen(path, RTLD_LAZY);
1801+ if(strstr(path, "migemo")) {
1802+ if(migemo_dl_init() != 0) {
1803+ err_msg("false in initialize the dynamic library", runinfo->mSName, runinfo->mSLine, command->mArgs[0]);
1804+ return FALSE;
1805+ }
1806+ hash_put(gDynamicLibraryFinals, path, migemo_dl_final);
1807+ }
17961808
1809+ char path2[PATH_MAX];
1810+ snprintf(path2, PATH_MAX, "%s.xyzsh", path);
1811+ if(access(path2, F_OK) == 0) {
1812+ if(!load_file(path2, nextin, nextout, runinfo, NULL, 0)) {
1813+ return FALSE;
1814+ }
1815+ }
1816+ }
1817+#else
1818+ if(hash_item(gDynamicLibraryFinals, path) == NULL) {
1819+ void* handle = dlopen(path, RTLD_LAZY);
17971820 if(handle == NULL) {
17981821 err_msg(dlerror(), runinfo->mSName, runinfo->mSLine, command->mArgs[0]);
17991822 return FALSE;
@@ -1825,6 +1848,7 @@ BOOL load_so_file(char* fname, sObject* nextin, sObject* nextout, sRunInfo* runi
18251848 }
18261849 }
18271850 }
1851+#endif
18281852
18291853 return TRUE;
18301854 }