| 17 | | print <<EOM; |
| 18 | | You seem to be running on an environment that may not have mecab-config |
| 19 | | available. This script uses mecab-config to auto-probe |
| 20 | | 1. The version string of libmecab that you are building Text::MeCab |
| 21 | | against. (e.g. 0.90) |
| 22 | | 2. Additional compiler flags that you may have built libmecab with, and |
| 23 | | 3. Additional linker flags that you may have build libmecab with. |
| 24 | | |
| 25 | | Since we can't auto-probe, you should specify the above three to proceed |
| 26 | | with compilation: |
| 27 | | EOM |
| 28 | | |
| 29 | | print "Version of libmecab that you are compiling against (e.g. 0.90)? (REQUIRED) [] "; |
| 30 | | $version = <STDIN>; |
| 31 | | chomp($version); |
| | 17 | $version = prompt( |
| | 18 | join( |
| | 19 | "\n", |
| | 20 | "", |
| | 21 | "You seem to be running on an environment that may not have mecab-config", |
| | 22 | "available. This script uses mecab-config to auto-probe", |
| | 23 | " 1. The version string of libmecab that you are building Text::MeCab", |
| | 24 | " against. (e.g. 0.90)", |
| | 25 | " 2. Additional compiler flags that you may have built libmecab with, and", |
| | 26 | " 3. Additional linker flags that you may have build libmecab with.", |
| | 27 | "", |
| | 28 | "Since we can't auto-probe, you should specify the above three to proceed", |
| | 29 | "with compilation:", |
| | 30 | "", |
| | 31 | "Version of libmecab that you are compiling against (e.g. 0.90)? (REQUIRED) []" |
| | 32 | ) |
| | 33 | ); |
| | 34 | chomp $version; |
| 105 | | my $encoding = 'utf-8'; |
| 106 | | print |
| 107 | | "Text::MeCab needs to know what encoding you built your dictionary with\n", |
| 108 | | "to properly execute tests.\n", |
| 109 | | "\n", |
| 110 | | "Encoding of your mecab dictionary? (shift_jis, euc-jp, utf-8) [$encoding] " |
| 111 | | ; |
| 112 | | |
| 113 | | if ($interactive) { |
| 114 | | my $input = <STDIN>; |
| 115 | | chomp $input; |
| 116 | | if ($input) { |
| 117 | | $encoding = $input; |
| 118 | | } |
| 119 | | } |
| | 94 | my $default_encoding = 'utf-8'; |
| | 95 | my $encoding = prompt( |
| | 96 | join( |
| | 97 | "\n", |
| | 98 | "", |
| | 99 | "Text::MeCab needs to know what encoding you built your dictionary with", |
| | 100 | "to properly execute tests.", |
| | 101 | "", |
| | 102 | "Encoding of your mecab dictionary? (shift_jis, euc-jp, utf-8)", |
| | 103 | ), |
| | 104 | $default_encoding |
| | 105 | ); |