<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>阳光烂灿的日子 &#187; soft</title>
	<atom:link href="http://www.lerosua.org/tag/soft/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lerosua.org</link>
	<description>总会遇见</description>
	<lastBuildDate>Tue, 31 Jan 2012 14:44:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Arch下编译talkmm</title>
		<link>http://www.lerosua.org/2009/05/arch%e4%b8%8b%e7%bc%96%e8%af%91talkmm/</link>
		<comments>http://www.lerosua.org/2009/05/arch%e4%b8%8b%e7%bc%96%e8%af%91talkmm/#comments</comments>
		<pubDate>Sun, 31 May 2009 12:22:40 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[talkmm]]></category>
		<category><![CDATA[gtkmm]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=538</guid>
		<description><![CDATA[Arch下talkmm编译指南 1.编译前准备的包 语音支持方面的包 yaourt -S speex ilbc linphone 界面支持方面的包 yaourt -S gtkmm libsexymm 2.下载源码包 wget http://talkmm.googlecode.com/files/libjingle-0.4.1.tar.bz2 wget http://talkmm.googlecode.com/files/talkmm-0.10.tar.bz2 3. 解压libjingle tar xvfj libjingle-0.4.1.tar.bz2 cd libjingle-0.4.1 ./configure make cd .. 4. 解压talkmm tar xvfj talkmm-0.10.tar.bz2 cd talkmm-0.10 5. 连接libjingle目录 ln -s ../libjingle-0.4.1/talk src/talk 注意这是在talkmm-0.10目录里做的，并且libjingle-0.4.1目录就在talkmm-0.10同级目录中。 这是为了talkmm里的源码能连接到libjingle里生成的静态库. 6.编译talkmm ./autogen.sh ./configure make sudo make install PS. Arch中gcc 4.4.0-3 版本在编译时似乎有个bug。目前只能跳过这个gcc的版本来编译. [...]]]></description>
			<content:encoded><![CDATA[<p>Arch下talkmm编译指南</p>
<p>1.编译前准备的包<br />
语音支持方面的包</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">yaourt <span style="color: #339933;">-</span>S speex ilbc linphone</pre></div></div>

<p>界面支持方面的包</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">yaourt <span style="color: #339933;">-</span>S gtkmm libsexymm</pre></div></div>

<p>2.下载源码包</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">wget http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//talkmm.googlecode.com/files/libjingle-0.4.1.tar.bz2</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">wget http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//talkmm.googlecode.com/files/talkmm-0.10.tar.bz2</span></pre></div></div>

<p>3. 解压libjingle</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">tar xvfj libjingle<span style="color: #339933;">-</span>0.4.1.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
cd libjingle<span style="color: #339933;">-</span>0.4.1
.<span style="color: #339933;">/</span>configure
make
cd ..</pre></div></div>

<p>4. 解压talkmm</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">tar xvfj talkmm<span style="color: #339933;">-</span><span style="color:#800080;">0.10</span>.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
cd talkmm<span style="color: #339933;">-</span><span style="color:#800080;">0.10</span></pre></div></div>

<p>5. 连接libjingle目录</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">ln <span style="color: #339933;">-</span>s ..<span style="color: #339933;">/</span>libjingle<span style="color: #339933;">-</span>0.4.1<span style="color: #339933;">/</span>talk src<span style="color: #339933;">/</span>talk</pre></div></div>

<p>注意这是在talkmm-0.10目录里做的，并且libjingle-0.4.1目录就在talkmm-0.10同级目录中。<br />
这是为了talkmm里的源码能连接到libjingle里生成的静态库.</p>
<p>6.编译talkmm</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">.<span style="color: #339933;">/</span>autogen.<span style="color: #202020;">sh</span>
.<span style="color: #339933;">/</span>configure
make
sudo make install</pre></div></div>

<p>PS. Arch中gcc 4.4.0-3 版本在编译时似乎有个bug。目前只能跳过这个gcc的版本来编译.</p>
<p>如要指定ilbc位置,就以下面方式</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">.<span style="color: #339933;">/</span>configure <span style="color: #339933;">--</span>with<span style="color: #339933;">-</span>ilbc<span style="color: #339933;">=/</span>usr<span style="color: #339933;">/</span>local</pre></div></div>

<p>更正：前面说是4.4.0-3编译有bug，是我记错了。其实是4.4.0-2的bug，在线程同步方面。当时编译不过我就降级了，没想到过没多久gcc又升级并fix了这个bug。大家找的那个patch打上也无坏。它也修正了一些问题，我也已经把它加入svn中。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/05/arch%e4%b8%8b%e7%bc%96%e8%af%91talkmm/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>something</title>
		<link>http://www.lerosua.org/2009/04/something/</link>
		<comments>http://www.lerosua.org/2009/04/something/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 12:54:19 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[吱吱厄厄]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=484</guid>
		<description><![CDATA[最近战线拉得太长了，不断参与新项目。得节制一下。别重量不重质了。 提醒一下自己。 ubuntu9.04发布了。这是好消息。虽然我不用再升级了。 但用arch也有烦恼，电源管理这个程序最新版总是神神的，小bug不断。 gmlive好久没更新了，上次在论坛上随便开个玩笑还让人以为不再开发了。积累了两路人马的语言翻译没发布出去哩，不更新对不住人家。 gmchess的AI对战初步有成效了，目前就差个死棋检测。但是发现这死棋检测也是不容易的，要不先放个预览版给大家？ gmbox则是重在参与，这项目的其它开发者倒是比偶勤奋得多了。 未来两周则放到一新项目上，又是一个大项目啊，保持下神秘感。]]></description>
			<content:encoded><![CDATA[<p>最近战线拉得太长了，不断参与新项目。得节制一下。别重量不重质了。<br />
提醒一下自己。<br />
ubuntu9.04发布了。这是好消息。虽然我不用再升级了。<br />
但用arch也有烦恼，电源管理这个程序最新版总是神神的，小bug不断。<br />
gmlive好久没更新了，上次在论坛上随便开个玩笑还让人以为不再开发了。积累了两路人马的语言翻译没发布出去哩，不更新对不住人家。<br />
gmchess的AI对战初步有成效了，目前就差个死棋检测。但是发现这死棋检测也是不容易的，要不先放个预览版给大家？<br />
gmbox则是重在参与，这项目的其它开发者倒是比偶勤奋得多了。<br />
未来两周则放到一新项目上，又是一个大项目啊，保持下神秘感。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/04/something/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>开源模式</title>
		<link>http://www.lerosua.org/2009/04/%e5%bc%80%e6%ba%90%e6%a8%a1%e5%bc%8f/</link>
		<comments>http://www.lerosua.org/2009/04/%e5%bc%80%e6%ba%90%e6%a8%a1%e5%bc%8f/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 03:03:51 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[Linux Note]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=464</guid>
		<description><![CDATA[bones引用的一句话” release early , release often”引发了我再次去查看《大教堂与市集》这篇经典文章。事实上我以前总与这篇文章擦身而过。我总高傲地认为，开源嘛，不就是开放源代码嘛。总是没有认真地阅读过里面的文字（这规于年少的轻狂）。于是扎头进去写一两个软件，发布出来，美其名是曰开源软件。 我总是痛恨国内环境如何之差，找不到一两个可以合作的开发者。却没有想过这一切是我自己造成的。我做的已经足够好了吗？发布了源码，就是开放环境了吗？ 设身处地地想想吧，某人发布了一个x软件，我有些感兴趣，想参与。于是下载代码来看，发现代码已经挺多的了，但是却没有开发文档。那有没有讨论的论坛呢，也没有。那只有硬头皮读代码吧。有处不明白，那发封邮件给作者问问吧。嗯，算是解答了，但我怎么感觉态度一般而已啊，好像是我发邮件烦他一样，那没事还是别发邮件了。三天后，哎，代码太难看了。又没文档说清楚，算了，我自己到别处玩好了。 那我的情景，是不是这样呢。缺少文档。每次svn修改又不做过多说明，这无异于封闭开发。性格过于内敛，觉得还没个功能整天发关于软件的一些问题有张扬的嫌疑。有问题又不发布出来，自个儿躲起来研究。 像昨天说的，既然我不是天才，我无法一个人写出优秀的软件。那么我就应该尽全力调动开源的优势来完成项目。而对于目前的几个项目，我做的都不好，需要深思。 对于开源模式，迅速地提升个人编程能力不是最主要的，而是个人建立这个社区及开发群体的能力，我需要深思。]]></description>
			<content:encoded><![CDATA[<p>bones引用的一句话” release early , release often”引发了我再次去查看《大教堂与市集》这篇经典文章。事实上我以前总与这篇文章擦身而过。我总高傲地认为，开源嘛，不就是开放源代码嘛。总是没有认真地阅读过里面的文字（这规于年少的轻狂）。于是扎头进去写一两个软件，发布出来，美其名是曰开源软件。</p>
<p>我总是痛恨国内环境如何之差，找不到一两个可以合作的开发者。却没有想过这一切是我自己造成的。我做的已经足够好了吗？发布了源码，就是开放环境了吗？</p>
<p>设身处地地想想吧，某人发布了一个x软件，我有些感兴趣，想参与。于是下载代码来看，发现代码已经挺多的了，但是却没有开发文档。那有没有讨论的论坛呢，也没有。那只有硬头皮读代码吧。有处不明白，那发封邮件给作者问问吧。嗯，算是解答了，但我怎么感觉态度一般而已啊，好像是我发邮件烦他一样，那没事还是别发邮件了。三天后，哎，代码太难看了。又没文档说清楚，算了，我自己到别处玩好了。</p>
<p>那我的情景，是不是这样呢。缺少文档。每次svn修改又不做过多说明，这无异于封闭开发。性格过于内敛，觉得还没个功能整天发关于软件的一些问题有张扬的嫌疑。有问题又不发布出来，自个儿躲起来研究。</p>
<p>像昨天说的，既然我不是天才，我无法一个人写出优秀的软件。那么我就应该尽全力调动开源的优势来完成项目。而对于目前的几个项目，我做的都不好，需要深思。</p>
<p>对于开源模式，迅速地提升个人编程能力不是最主要的，而是个人建立这个社区及开发群体的能力，我需要深思。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/04/%e5%bc%80%e6%ba%90%e6%a8%a1%e5%bc%8f/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>lrcdis的rhythmbox插件</title>
		<link>http://www.lerosua.org/2009/03/lrcdis%e7%9a%84rhythmbox%e6%8f%92%e4%bb%b6/</link>
		<comments>http://www.lerosua.org/2009/03/lrcdis%e7%9a%84rhythmbox%e6%8f%92%e4%bb%b6/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:57:45 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[Linux Note]]></category>
		<category><![CDATA[lrcdis]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=417</guid>
		<description><![CDATA[众所周知，bones及一般脚本控达人搞了个lrcdis的歌词显示脚本，自动下载歌词还有多种显示方式，以支持N多的播放器。 用着真的是非常爽啊。但它需要在终端中另外开启。 于是我简单地为rhythmbox写了个插件调用它。只要启动这个lrcdis插件后，rhythmbox会在后台自动调用这个脚本。 如此听歌，启不更爽哉！ 下载地址：http://geekr.googlecode.com/files/lrcdis-rb.tar.gz 解压文件后放到 ~/.gnome2/rhythmbox/plugins 目录下，在rhythmbox开启相关插件即可，其它操作如lrcdis一般。 这个插件其实相当简单，就是启动lrcdis而已，不过也相当有潜力，可以发展成能配置lrcdis什么的。 ps.修正lrcdis一个bug，一会报告去&#8230; 发件人 lerosua&#8217; blog]]></description>
			<content:encoded><![CDATA[<p>众所周知，<a href="http://li2z.cn/category/lrcdis/">bones</a>及一般脚本控达人搞了个<a href="http://code.google.com/p/lrcdis/">lrcdis的歌词显示脚本</a>，自动下载歌词还有多种显示方式，以支持N多的播放器。<br />
用着真的是非常爽啊。但它需要在终端中另外开启。<br />
于是我简单地为rhythmbox写了个插件调用它。只要启动这个lrcdis插件后，rhythmbox会在后台自动调用这个脚本。<br />
如此听歌，启不更爽哉！</p>
<p>下载地址：<a href="http://geekr.googlecode.com/files/lrcdis-rb.tar.gz">http://geekr.googlecode.com/files/lrcdis-rb.tar.gz</a></p>
<p>解压文件后放到 ~/.gnome2/rhythmbox/plugins 目录下，在rhythmbox开启相关插件即可，其它操作如lrcdis一般。</p>
<p>这个插件其实相当简单，就是启动lrcdis而已，不过也相当有潜力，可以发展成能配置lrcdis什么的。</p>
<p>ps.修正lrcdis一个bug，一会报告去&#8230;</p>
<table style="width: auto;" border="0">
<tbody>
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/i-rhBPkM0BvnrB6moacmeA?feat=embedwebsite"><img src="http://lh3.ggpht.com/_R2A-LDioh3M/ScIy0pEOk3I/AAAAAAAAEHU/ibU4GgMLgng/s400/lrcdis.png" alt="" /></a></td>
</tr>
<tr>
<td style="font-family:arial,sans-serif; font-size:11px; text-align:right">发件人 <a href="http://picasaweb.google.com/lerosua/LerosuaBlog?feat=embedwebsite">lerosua&#8217; blog</a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/03/lrcdis%e7%9a%84rhythmbox%e6%8f%92%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>autotool简约指南</title>
		<link>http://www.lerosua.org/2009/03/autotool%e7%ae%80%e7%ba%a6%e6%8c%87%e5%8d%97/</link>
		<comments>http://www.lerosua.org/2009/03/autotool%e7%ae%80%e7%ba%a6%e6%8c%87%e5%8d%97/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 02:27:31 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[Linux Note]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=410</guid>
		<description><![CDATA[写项目最烦的一项就是写Makefile,虽然有autoconf/automake这套工具。但我一直不会搞，因为几次屡屡出错，损失了信心。一看到它就头大，感觉特别复杂。 不过这几天坚定信心，勇创难关，终于初窥门径。本文不打算教你啥原理，只是按步就班指导一下步骤。因为网上的原理教程多的是。但怕自己忘记操作的步骤，所以记下来. 众所周所automake支持三种目录层次：flat、shallow和deep。以下例子是deep的，因为这才是项目最常用到的结构(不知道是啥去找文章看看) 1.首先建立自己的源码目录，foo, foo下有src目录，src目录下才是真正的源码 foo.c leros@leros-desktop:/tmp$ ls foo/ src leros@leros-desktop:/tmp$ ls foo/src/ foo.c leros@leros-desktop:/tmp$ cat foo/src/foo.c #include &#60;stdio.h&#62; int main&#40;int argc, char *argv&#91;&#93;&#41; &#123; printf&#40;&#34;test autoconf\n&#34;&#41;; &#160; return 0; &#125; 2.进入foo目录执行autoscan,扫描生成configure.scan leros@leros-desktop:/tmp/foo$ autoscan leros@leros-desktop:/tmp/foo$ ls autoscan.log configure.scan src 3.把configure.scan改名为configure.in,然后修改内容 4 AC_PREREQ&#40;2.61&#41; 5 AC_INIT&#40;foo,1.0,lerosua@lerosua.org&#41; 6 AC_CONFIG_SRCDIR&#40;&#91;src/foo.c&#93;&#41; 7 AC_CONFIG_HEADER&#40;&#91;config.h&#93;&#41; 8 AM_INIT_AUTOMAKE&#40;foo,1.0&#41; 9 10 # Checks for [...]]]></description>
			<content:encoded><![CDATA[<p>写项目最烦的一项就是写Makefile,虽然有autoconf/automake这套工具。但我一直不会搞，因为几次屡屡出错，损失了信心。一看到它就头大，感觉特别复杂。<br />
不过这几天坚定信心，勇创难关，终于初窥门径。本文不打算教你啥原理，只是按步就班指导一下步骤。因为网上的原理教程多的是。但怕自己忘记操作的步骤，所以记下来.</p>
<p>众所周所automake支持三种目录层次：flat、shallow和deep。以下例子是deep的，因为这才是项目最常用到的结构(不知道是啥去找<a href="http://www.ibm.com/developerworks/cn/linux/l-makefile/">文章</a>看看)<br />
<strong>1</strong>.首先建立自己的源码目录，foo, foo下有src目录，src目录下才是真正的源码 foo.c</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">leros@leros<span style="color: #339933;">-</span>desktop<span style="color: #339933;">:/</span>tmp$ ls foo<span style="color: #339933;">/</span>
src
leros@leros<span style="color: #339933;">-</span>desktop<span style="color: #339933;">:/</span>tmp$ ls foo<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>
foo.<span style="color: #202020;">c</span>
leros@leros<span style="color: #339933;">-</span>desktop<span style="color: #339933;">:/</span>tmp$ cat foo<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>foo.<span style="color: #202020;">c</span>
<span style="color: #339933;">#include &lt;stdio.h&gt;</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;test autoconf<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>2</strong>.进入foo目录执行autoscan,扫描生成configure.scan</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ autoscan
leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
autoscan.log  configure.scan  src</pre></div></div>

<p><strong>3</strong>.把configure.scan改名为configure.in,然后修改内容</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #000000;">4</span> AC_PREREQ<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2.61</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000;">5</span> AC_INIT<span style="color: #7a0874; font-weight: bold;">&#40;</span>foo,<span style="color: #000000;">1.0</span>,lerosua<span style="color: #000000; font-weight: bold;">@</span>lerosua.org<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000;">6</span> AC_CONFIG_SRCDIR<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>src<span style="color: #000000; font-weight: bold;">/</span>foo.c<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000;">7</span> AC_CONFIG_HEADER<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>config.h<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000;">8</span> AM_INIT_AUTOMAKE<span style="color: #7a0874; font-weight: bold;">&#40;</span>foo,<span style="color: #000000;">1.0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000;">9</span>
 <span style="color: #000000;">10</span> <span style="color: #666666; font-style: italic;"># Checks for programs.</span>
 <span style="color: #000000;">11</span> AC_PROG_CC
 <span style="color: #000000;">12</span>
 <span style="color: #000000;">13</span> <span style="color: #666666; font-style: italic;"># Checks for libraries.</span>
 <span style="color: #000000;">14</span>
 <span style="color: #000000;">15</span> <span style="color: #666666; font-style: italic;"># Checks for header files.</span>
 <span style="color: #000000;">16</span>
 <span style="color: #000000;">17</span> <span style="color: #666666; font-style: italic;"># Checks for typedefs, structures, and compiler characteristics.</span>
 <span style="color: #000000;">18</span>
 <span style="color: #000000;">19</span> <span style="color: #666666; font-style: italic;"># Checks for library functions.</span>
 <span style="color: #000000;">20</span>
 <span style="color: #000000;">21</span> AC_OUTPUT<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>Makefile
 <span style="color: #000000;">22</span>                 src<span style="color: #000000; font-weight: bold;">/</span>Makefile<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>基本上添加了 AM_INIT_AUTOMAKE(foo,1.0)这行，还有改软件名和版本号，及最后AC_OUTPUT生成的文件。（和一些教程不同的是，这里没有把AC_CONFIG_HEADER([config.h])改成AM_CONFIG_HEADER([config.h])，我改了但会造成生成config.h出错，所以这里没改)</p>
<p><strong>4</strong>.新建必要的文件</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$touch</span> NEWS README ChangeLog AUTHORS</pre></div></div>

<p>将/usr/share/automake-1.X/目录下的depcomp和complie文件拷贝到本目录下,如果不复制，则会生成相应的链接文件，我想可能不利于移植，因为大家的automake的版本未必相同</p>
<p><strong>5</strong>.建立Makefile.am, src/Makefile.am。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">cat</span> Makefile.am
<span style="color: #007800;">SUBDIRS</span>=src
leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">cat</span> src<span style="color: #000000; font-weight: bold;">/</span>Makefile.am
<span style="color: #007800;">bin_PROGRAMS</span>=foo
<span style="color: #007800;">foo_SOURCES</span>=foo.c</pre></div></div>

<p>有多个源文件也只需要写进foo_SOURCES里就可</p>
<p><strong>6</strong>.运行命令：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">autoheader</span>
leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">autoconf</span>
leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">automake</span> <span style="color: #660033;">-a</span></pre></div></div>

<p>至此，构建基本上完成。<br />
<strong>7</strong>.即可编译:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><strong>8</strong>.看看最后的成果：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">leros<span style="color: #000000; font-weight: bold;">@</span>leros-desktop:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>foo$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
aclocal.m4      ChangeLog     COPYING     Makefile     NEWS
AUTHORS         config.h.in   depcomp     Makefile.am  README
autom4te.cache  configure     INSTALL     Makefile.in  src
autoscan.log    configure.in  install-sh  missing      stamp-h1</pre></div></div>

<p>总结一下，要编译的文件主要是configure.in , Makefile.am, src/Makefile.am,其它则是生成的文件。按步就班，其实也不是太复杂。另外额外的功能慢慢查及学习吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/03/autotool%e7%ae%80%e7%ba%a6%e6%8c%87%e5%8d%97/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>折腾perl脚本</title>
		<link>http://www.lerosua.org/2009/03/%e6%8a%98%e8%85%beperl%e8%84%9a%e6%9c%ac/</link>
		<comments>http://www.lerosua.org/2009/03/%e6%8a%98%e8%85%beperl%e8%84%9a%e6%9c%ac/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 11:35:45 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[patch]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://www.lerosua.org/?p=393</guid>
		<description><![CDATA[这两天没写程序，倒是和脚本较上劲了。主要是在ubuntu.cn论坛里收了ee的两个perl脚本。一个发图的，一个是将文件当成附件发送邮件的。 问题的关键是ubuntu和arch里的perl环境不一样。而arch的perl实在是太BT了。 这是ee的截图并上传脚本的帖子： http://forum.ubuntu.org.cn/viewtopic.php?f=120&#38;t=125239 arch环境中要运行它必须降级相关的perl模块，分别是perl-libwww-5.800 perl-www-mechanize-1.24 下面这个是ee的发送邮件附件脚本的帖子： http://forum.ubuntu.org.cn/viewtopic.php?f=21&#38;t=133299 arch源中我没找着Mail::Sender模块，于是自己搞了个PKGBUILD来安装它。 # $Id: PKGBUILD,v 1.11 2008/03/24 16:16:28 sergej Exp $ # Maintainer: Sergej Pupykin # Contributor: Francois Charette # PKGBUILD writer : lerosua &#160; pkgname=Mail-Sender pkgver=0.8.16 pkgrel=2 pkgdesc=&#34;Automates web page form &#38;amp; link interaction&#34; arch=&#40;'i686' 'x86_64'&#41; url=&#34;http://search.cpan.org/Mail-Sender&#34; license=&#40;'GPL' 'PerlArtistic'&#41; depends=&#40;'perl-uri' 'perl-html-parser' 'perl&#38;gt;=5.10.0'&#41; options=&#40;'!emptydirs'&#41; source=&#40;http://search.cpan.org/CPAN/authors/id/J/JE/JENDA/Mail-Sender-$pkgver.tar.gz&#41; md5sums=&#40;'e5d88236202b3d39567ade7d560797b0'&#41; &#160; build&#40;&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>这两天没写程序，倒是和脚本较上劲了。主要是在ubuntu.cn论坛里收了ee的两个perl脚本。一个发图的，一个是将文件当成附件发送邮件的。</p>
<p>问题的关键是ubuntu和arch里的perl环境不一样。而arch的perl实在是太BT了。</p>
<p>这是ee的截图并上传脚本的帖子：</p>
<p><a href="http://forum.ubuntu.org.cn/viewtopic.php?f=120&amp;t=125239">http://forum.ubuntu.org.cn/viewtopic.php?f=120&amp;t=125239</a></p>
<p>arch环境中要运行它必须降级相关的perl模块，分别是perl-libwww-5.800 perl-www-mechanize-1.24</p>
<p>下面这个是ee的发送邮件附件脚本的帖子：<br />
<a href="http://forum.ubuntu.org.cn/viewtopic.php?f=21&amp;t=133299">http://forum.ubuntu.org.cn/viewtopic.php?f=21&amp;t=133299</a><br />
arch源中我没找着Mail::Sender模块，于是自己搞了个PKGBUILD来安装它。</p>
<table border="5" background="#333">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># $Id: PKGBUILD,v 1.11 2008/03/24 16:16:28 sergej Exp $</span>
<span style="color: #666666; font-style: italic;"># Maintainer: Sergej Pupykin</span>
<span style="color: #666666; font-style: italic;"># Contributor: Francois Charette</span>
<span style="color: #666666; font-style: italic;"># PKGBUILD writer : lerosua </span>
&nbsp;
<span style="color: #007800;">pkgname</span>=Mail-Sender
<span style="color: #007800;">pkgver</span>=0.8.16
<span style="color: #007800;">pkgrel</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">pkgdesc</span>=<span style="color: #ff0000;">&quot;Automates web page form &amp;amp; link interaction&quot;</span>
<span style="color: #007800;">arch</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'i686'</span> <span style="color: #ff0000;">'x86_64'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">url</span>=<span style="color: #ff0000;">&quot;http://search.cpan.org/Mail-Sender&quot;</span>
<span style="color: #007800;">license</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'GPL'</span> <span style="color: #ff0000;">'PerlArtistic'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">depends</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'perl-uri'</span> <span style="color: #ff0000;">'perl-html-parser'</span> <span style="color: #ff0000;">'perl&amp;gt;=5.10.0'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">options</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'!emptydirs'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">source</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>http:<span style="color: #000000; font-weight: bold;">//</span>search.cpan.org<span style="color: #000000; font-weight: bold;">/</span>CPAN<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>J<span style="color: #000000; font-weight: bold;">/</span>JE<span style="color: #000000; font-weight: bold;">/</span>JENDA<span style="color: #000000; font-weight: bold;">/</span>Mail-Sender-<span style="color: #007800;">$pkgver</span>.tar.gz<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">md5sums</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'e5d88236202b3d39567ade7d560797b0'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
build<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #7a0874; font-weight: bold;">cd</span>  <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>Mail-Sender-<span style="color: #007800;">$pkgver</span>
<span style="color: #007800;">PERL_MM_USE_DEFAULT</span>=<span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL <span style="color: #007800;">INSTALLDIRS</span>=vendor <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'.packlist'</span> <span style="color: #660033;">-delete</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.pod'</span> <span style="color: #660033;">-delete</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

</table>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2009/03/%e6%8a%98%e8%85%beperl%e8%84%9a%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>project temporarily name italk preview</title>
		<link>http://www.lerosua.org/2007/07/project-temporarily-name-italk-preview/</link>
		<comments>http://www.lerosua.org/2007/07/project-temporarily-name-italk-preview/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 04:54:00 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[iTalk]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://lerosua.wordpress.com/2007/07/31/project-temporarily-name-italk-preview/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://3.bp.blogspot.com/_R2A-LDioh3M/Rq7A1zDD0yI/AAAAAAAAAFo/t0jrlFrF3o4/s1600-h/Screenshot-6.png"><img style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" src="http://3.bp.blogspot.com/_R2A-LDioh3M/Rq7A1zDD0yI/AAAAAAAAAFo/t0jrlFrF3o4/s320/Screenshot-6.png" alt="" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2007/07/project-temporarily-name-italk-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pgrep can&#8217;t search string which out of 15 chars</title>
		<link>http://www.lerosua.org/2007/07/pgrep-cant-search-string-which-out-of-15-chars/</link>
		<comments>http://www.lerosua.org/2007/07/pgrep-cant-search-string-which-out-of-15-chars/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 04:37:00 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://lerosua.wordpress.com/2007/07/31/pgrep-cant-search-string-which-out-of-15-chars/</guid>
		<description><![CDATA[pgrep can&#8217;t search string which out of 15 chars pgrep is a Linux command tool. it can search process id by its name.one day , pypcjs tell it can&#8217;t search process name which out of 15 chars. it means :$pgrep hello1234567890it return nothing. i say , it may not a bug, just not necessarily. anyway [...]]]></description>
			<content:encoded><![CDATA[<p>pgrep can&#8217;t search string which out of 15 chars</p>
<p>pgrep is a Linux command tool. it can search process id by its name.<br />one day , pypcjs tell it can&#8217;t search process name which out of 15 chars.</p>
<p>it means :<br />$pgrep hello1234567890<br />it return nothing.</p>
<p>i say , it may not a bug, just not necessarily. anyway , just remand it .</p>
<p>By the way , my company will move to a biger place. maybe it is<br />a good thing.</p>
<p>Good luck for anybody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2007/07/pgrep-cant-search-string-which-out-of-15-chars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>稍微汉化了一点txt2regex</title>
		<link>http://www.lerosua.org/2007/04/%e7%a8%8d%e5%be%ae%e6%b1%89%e5%8c%96%e4%ba%86%e4%b8%80%e7%82%b9txt2regex/</link>
		<comments>http://www.lerosua.org/2007/04/%e7%a8%8d%e5%be%ae%e6%b1%89%e5%8c%96%e4%ba%86%e4%b8%80%e7%82%b9txt2regex/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 04:27:00 +0000</pubDate>
		<dc:creator>lerosua</dc:creator>
				<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://lerosua.wordpress.com/2007/04/23/%e7%a8%8d%e5%be%ae%e6%b1%89%e5%8c%96%e4%ba%86%e4%b8%80%e7%82%b9txt2regex/</guid>
		<description><![CDATA[昨天在 linuxtoy 上看到一个脚本：txt2regex,正则表达式编写向导发现这东西实在太好用了。因为每种工具的正则表达式都有些微的不同。每次我都记不住 。当到用时就恨恨地~昨晚花时间研究了下。并且编写了一个简单的语言包，zh_CN.po ，以使它比较中文化一些。但本人在翻译上天份有限。因为对于字词把握有点出入。本人努力改进中。当然如果你英文好就不必下载了。如果你的英文和Wind一样的话，不妨下载来看看吧。地址： txt2regex （包含zh_CN.po的打包）解压后只需 sudo make install]]></description>
			<content:encoded><![CDATA[<div>昨天在 linuxtoy 上看到一个脚本：<a href='http://linuxtoy.org/archives/txt2regex.html'>txt2regex,正则表达式编写向导</a><br /></br>发现这东西实在太好用了。因为每种工具的正则表达式都有些微的不同。每次我都记不住 。<br /></br>当到用时就恨恨地~<br /></br><br /></br>昨晚花时间研究了下。并且编写了一个简单的语言包，zh_CN.po ，以使它比较中文化一些。<br /></br>但本人在翻译上天份有限。因为对于字词把握有点出入。本人努力改进中。<br /></br><br /></br>当然如果你英文好就不必下载了。<br /></br>如果你的英文和Wind一样的话，不妨下载来看看吧。<br /></br>地址：<a href='http://lerosua.googlepages.com/txt2regex-0.8.tar.gz'> txt2regex</a> （包含zh_CN.po的打包）<br /></br><br /></br>解压后只需 sudo make install <br /></br></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lerosua.org/2007/04/%e7%a8%8d%e5%be%ae%e6%b1%89%e5%8c%96%e4%ba%86%e4%b8%80%e7%82%b9txt2regex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

