このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
tools:flex:インストール:2.6.4 [2021/01/13 08:18] michiya |
tools:flex:インストール:2.6.4 [2021/01/14 07:50] (現在) michiya |
||
---|---|---|---|
行 1: | 行 1: | ||
====== Flexをソースからのインストール ====== | ====== Flexをソースからのインストール ====== | ||
- | 必須ライブラリ | + | ===== 依存ライブラリ |
* [[tools: | * [[tools: | ||
* [[tools: | * [[tools: | ||
行 7: | 行 8: | ||
* [[tools: | * [[tools: | ||
* [[tools: | * [[tools: | ||
- | * [[tools: | + | * [[tools: |
- | * [[tools: | + | * [[tools: |
- | * [[tools: | + | * [[tools: |
- | * indent | + | * [[tools: |
+ | |||
+ | ===== インストール手順 ===== | ||
< | < | ||
行 16: | 行 19: | ||
$ tar xvf flex-2.6.4.tar.gz | $ tar xvf flex-2.6.4.tar.gz | ||
$ cd flex-2.6.4/ | $ cd flex-2.6.4/ | ||
- | $ export | + | $ LIBTOOLIZE=/ |
- | $ ./ | + | |
- | $ ./configure --prefix=/ | + | |
+ | $ ./ | ||
+ | PATH=/ | ||
+ | | ||
+ | | ||
$ make | $ make | ||
$ make install | $ make install | ||
</ | </ | ||
+ | ===== 環境変数 ===== | ||
+ | < | ||
+ | $ export PATH=/ | ||
+ | $ export LD_LIBRARY_PATH=/ | ||
+ | $ export C_INCLUDE_PATH=/ | ||
+ | $ export CPLUS_INCLUDE_PATH=/ | ||
+ | </ | ||
+ | |||
+ | ===== スクリプト ===== | ||
+ | |||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | ############################################################# | ||
+ | inst_ver=2.6.4 | ||
+ | inst_target=/ | ||
+ | arch_file=" | ||
+ | target_web=" | ||
+ | working_dir=$(cd $(dirname $0); pwd)/ | ||
+ | m4_path=/ | ||
+ | libtool_path=/ | ||
+ | autoconf_path=/ | ||
+ | gettext_path=/ | ||
+ | automake_path=/ | ||
+ | bison_path=/ | ||
+ | help2man_path=/ | ||
+ | texinfo_path=/ | ||
+ | indent_path=/ | ||
+ | ############################################################# | ||
+ | |||
+ | if [ -d ${inst_target} ]; | ||
+ | then | ||
+ | echo " | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | if [ ! -d ${m4_path} ]; | ||
+ | then | ||
+ | echo "m4 is not exist" | ||
+ | exit 1 | ||
+ | fi | ||
+ | if [ ! -f ${libtool_path} ]; | ||
+ | then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | if [ ! -d ${autoconf_path} ]; | ||
+ | then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | if [ ! -d ${gettext_path} ]; | ||
+ | then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | if [ ! -d ${automake_path} ]; | ||
+ | then | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | mkdir -p ${inst_target} | ||
+ | if [ $? -ne 0 ]; | ||
+ | then | ||
+ | echo "You do not have write permission on " | ||
+ | echo "Scipt is aborted." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | rm -rf ${arch_file} ${working_dir} | ||
+ | |||
+ | wget ${target_web} | ||
+ | if [ $? -ne 0 ]; | ||
+ | then | ||
+ | echo " | ||
+ | echo "wget ${target_web}" | ||
+ | exit 1 | ||
+ | fi | ||
+ | mkdir ${working_dir} | ||
+ | tar xvf ${arch_file} -C ${working_dir} --strip-components 1 | ||
+ | cd ${working_dir} | ||
+ | LIBTOOLIZE=${libtool_path} PATH=${automake_path}: | ||
+ | ./configure PATH=${indent_path}: | ||
+ | make | ||
+ | make install | ||
+ | </ |