5 steps to autotools GNU diction

  1. download and unzip (google GNU diction and find it in gun.org
  2. configure
  3. make
  4. make check
  5. make install

details as below:

liuyu@LIUYU:~/GNUdiction$ ls
diction.tar.gz
liuyu@LIUYU:~/GNUdiction$ tar -xvfz diction.tar.gz
tar: z:无法 open: 没有那个文件或目录
tar: Error is not recoverable: exiting now
liuyu@LIUYU:~/GNUdiction$ tar -xvf diction.tar.gz
diction-1.11/COPYING
diction-1.11/INSTALL
diction-1.11/Makefile.in
diction-1.11/README
diction-1.11/NEWS
diction-1.11/configure
diction-1.11/install-sh
diction-1.11/de
diction-1.11/en
diction-1.11/en_GB
diction-1.11/nl
diction-1.11/test/
diction-1.11/test/rundiction.in
diction-1.11/test/test01
diction-1.11/test/test05
diction-1.11/test/test02
diction-1.11/test/test03
diction-1.11/test/test04
diction-1.11/test/test06
diction-1.11/test/test07
diction-1.11/test/test08
diction-1.11/test/test09
diction-1.11/config.guess
diction-1.11/config.h.in
diction-1.11/config.sub
diction-1.11/configure.in
diction-1.11/de.po
diction-1.11/diction.1.in
diction-1.11/diction.c
diction-1.11/diction.pot
diction-1.11/diction.spec
diction-1.11/diction.spec.in
diction-1.11/diction.texi.in
diction-1.11/en_GB.po
diction-1.11/getopt.c
diction-1.11/getopt.h
diction-1.11/getopt1.c
diction-1.11/getopt_int.h
diction-1.11/misc.c
diction-1.11/misc.h
diction-1.11/nl.po
diction-1.11/sentence.c
diction-1.11/sentence.h
diction-1.11/style.1.in
diction-1.11/style.c
liuyu@LIUYU:~/GNUdiction$ ls
diction-1.11 diction.tar.gz
liuyu@LIUYU:~/GNUdiction$ cd diction-1.11
liuyu@LIUYU:~/GNUdiction/diction-1.11$ ls
config.guess de diction.spec.in getopt.c misc.c sentence.c
config.h.in de.po diction.texi.in getopt.h misc.h sentence.h
config.sub diction.1.in en getopt_int.h NEWS style.1.in
configure diction.c en_GB INSTALL nl style.c
configure.in diction.pot en_GB.po install-sh nl.po test
COPYING diction.spec getopt1.c Makefile.in README
liuyu@LIUYU:~/GNUdiction/diction-1.11$ ./configure
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for a BSD-compatible install… /usr/bin/install -c
checking for strerror… yes
checking for library containing regcomp… none required
checking for broken realloc… no
checking for msgfmt… yes
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking libintl.h usability… yes
checking libintl.h presence… yes
checking for libintl.h… yes
checking for library containing gettext… none required
configure: creating ./config.status
config.status: creating Makefile
config.status: creating diction.1
config.status: creating diction.texi
config.status: creating diction.spec
config.status: creating style.1
config.status: creating test/rundiction
config.status: creating config.h
liuyu@LIUYU:~/GNUdiction/diction-1.11$ make
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common diction.c
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common sentence.c
sentence.c: In function ‘sentence’:
sentence.c:219:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
(void)fgets(buf+1,sizeof(buf)-1,in);
^
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common misc.c
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common getopt.c
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common getopt1.c
gcc -o diction -g diction.o sentence.o misc.o
getopt.o getopt1.o
gcc -c -I. -DSHAREDIR="/usr/local/share" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -pipe -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common style.c
In file included from style.c:37:0:
style.c: In function ‘main’:
style.c:1186:18: warning: unknown conversion type character ‘(’ in format [-Wformat=]
printf((" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1186:16: note: in expansion of macro ‘

printf((" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1186:18: warning: unknown conversion type character ‘(’ in format [-Wformat=]
printf(
(" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1186:16: note: in expansion of macro ‘
printf(
(" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1186:18: warning: unknown conversion type character ‘(’ in format [-Wformat=]
printf((" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1186:16: note: in expansion of macro ‘

printf((" conjunctions %1.f% (%d) pronouns %1.f% (%d) prepositi
^
style.c:1191:18: warning: unknown conversion type character ‘(’ in format [-Wformat=]
printf(
(" nominalizations %1.f% (%d)\n"),
^
style.c:1191:16: note: in expansion of macro ‘
printf(
(" nominalizations %1.f% (%d)\n"),
^
gcc -o style -g style.o sentence.o misc.o
getopt.o getopt1.o -lm
msgfmt -o de.mo de.po
msgfmt -o en_GB.mo en_GB.po
msgfmt -o nl.mo nl.po
liuyu@LIUYU:~/GNUdiction/diction-1.11$ make check
for i in ./test/test*; do i ∣ ∣ b r e a k ; d o n e . / t e s t / t e s t 01 : T w o r e g u l a r s e n t e n c e s . . . p a s s e d . / t e s t / t e s t 02 : E n d i n g e l l i p s i s . . . p a s s e d . / t e s t / t e s t 03 : B e g i n n i n g e l l i p s i s . . . p a s s e d . / t e s t / t e s t 04 : O m i s s i o n e l l i p s i s . . . p a s s e d . / t e s t / t e s t 05 : S t e m m i n g . . . p a s s e d . / t e s t / t e s t 06 : R e c o v e r y . . . p a s s e d . / t e s t / t e s t 07 : E n d o f s e n t e n c e 1... p a s s e d . / t e s t / t e s t 08 : E n d o f s e n t e n c e 2... p a s s e d . / t e s t / t e s t 09 : S u f f i x m a t c h i n g . . . p a s s e d l i u y u @ L I U Y U :   / G N U d i c t i o n / d i c t i o n − 1.11 i || break; done ./test/test01: Two regular sentences... passed ./test/test02: Ending ellipsis... passed ./test/test03: Beginning ellipsis... passed ./test/test04: Omission ellipsis... passed ./test/test05: Stemming... passed ./test/test06: Recovery... passed ./test/test07: End of sentence 1... passed ./test/test08: End of sentence 2... passed ./test/test09: Suffix matching... passed liuyu@LIUYU:~/GNUdiction/diction-1.11 ibreak;done./test/test01:Tworegularsentences...passed./test/test02:Endingellipsis...passed./test/test03:Beginningellipsis...passed./test/test04:Omissionellipsis...passed./test/test05:Stemming...passed./test/test06:Recovery...passed./test/test07:Endofsentence1...passed./test/test08:Endofsentence2...passed./test/test09:Suffixmatching...passedliuyu@LIUYU: /GNUdiction/diction1.11 make install
[ -d /usr/local/bin ] || /usr/bin/install -c -m 755 -d /usr/local/bin
/usr/bin/install -c diction /usr/local/bin/diction
/usr/bin/install: 无法创建普通文件’/usr/local/bin/diction’: 权限不够
Makefile:41: recipe for target ‘install’ failed
make: *** [install] Error 1
liuyu@LIUYU:~/GNUdiction/diction-1.11$ sudo make install
[sudo] liuyu 的密码:
[ -d /usr/local/bin ] || /usr/bin/install -c -m 755 -d /usr/local/bin
/usr/bin/install -c diction /usr/local/bin/diction
/usr/bin/install -c style /usr/local/bin/style
/usr/bin/install -c -m 755 -d /usr/local/share/diction
/usr/bin/install -c -m 644 ./de /usr/local/share/diction/de
/usr/bin/install -c -m 644 ./en /usr/local/share/diction/en
(cd /usr/local/share/diction; rm -f C; ln en C)
/usr/bin/install -c -m 644 ./en_GB /usr/local/share/diction/en_GB
/usr/bin/install -c -m 644 ./nl /usr/local/share/diction/nl
[ -d /usr/local/share/man/man1 ] || /usr/bin/install -c -m 755 -d /usr/local/share/man/man1
/usr/bin/install -c -m 644 diction.1 /usr/local/share/man/man1/diction.1
/usr/bin/install -c -m 644 style.1 /usr/local/share/man/man1/style.1
make install-po-yes
make[1]: Entering directory ‘/home/liuyu/GNUdiction/diction-1.11’
for cat in de.mo en_GB.mo nl.mo; do
dir=/usr/local/share/locale/basename $cat .mo/LC_MESSAGES;
[ -d $dir ] || /usr/bin/install -c -m 755 -d $dir;
/usr/bin/install -c -m 644 $cat KaTeX parse error: Undefined control sequence: \ at position 17: …ir/diction.mo; \̲ ̲ done make[1]: …

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值