SlideShare une entreprise Scribd logo
1  sur  38
GNU Autoconf /
 Automake 工作坊
使用 Autoconf 來 build
    專案(上)

       依瑪貓/楊士青
<imacat@mail.imacat.idv.tw>
        2012/7/28
「使用 Autoconf 來 build 專案(上)」簡報由 依瑪貓╱楊士青 製作,
以 創用CC Attribution-ShareAlike 3.0 Unported 授權條款 釋出。
自我介紹
• 依瑪貓╱楊士青
• 2001 年起參與國內外自由軟體社群開發
• SourceForge vsntp 等專案
• 現為 Apache OpenOffice 開發團隊成員
Autoconf
我們先來看看 Autoconf 到底是什麼?
下載 autoconf




% wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
解壓縮 autoconf




% tar xzf autoconf-2.69.tar.gz
看看解壓縮出什麼東西



% ls
autoconf-2.69
%
只有一個「 autoconf-2.69 」資料夾
進入資料夾中




% cd autoconf-2.69
再看看資料夾中有什麼東西




% ls
再看看資料夾中有什麼東西


% ls
aclocal.m4   cfg.mk        ChangeLog.3         COPYINGv3     m4            NEWS
AUTHORS      ChangeLog     configure           doc           maint.mk      README
bin          ChangeLog.0   configure.ac        GNUmakefile   Makefile.am   tests
BUGS         ChangeLog.1   COPYING             INSTALL       Makefile.in   THANKS
build-aux    ChangeLog.2   COPYING.EXCEPTION   lib           man           TODO
%
Autoconf-2.69 資料夾中有
• README
• INSTALL
• 只有一個可執行檔 configure
README
讀一讀 README
% cat README
-*- text -*-


Autoconf


Autoconf is an extensible package of M4 macros that produce shell
scripts to automatically configure software source code packages.
These scripts can adapt the packages to many kinds of UNIX-like
systems without manual user intervention.   Autoconf creates a
configuration script for a package from a template file that lists the
operating system features that the package can use, in the form of M4
macro calls.


…
%
讀一讀 README



        大意好像是:
「 M4 巨集的套件,協助設定原始碼。」
INSTALL
讀一讀 INSTALL
% cat INSTALL
Installation Instructions
…
    Briefly, the shell commands './configure; make; make install' should
configure, build, and install this package.   The following
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package.   Some packages provide this
'INSTALL' file but do not implement all of the features documented
below.   The lack of an optional feature in a given package is not
necessarily a bug.   More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
…
%
讀一讀 INSTALL


            所以只要
./configure; make; make install
          就可以了!?
馬上來實作看看!
configure
資料夾裏唯一的可執行檔。
不管三七二十一,
就給它跑跑看吧!
執行 configure




% ./configure
執行 configure
% ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
…
checking for expr... /usr/bin/expr
checking for GNU M4 that supports accurate traces... configure: error:
no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
%
執行 configure




錯誤:找不到 M4 。
執行 configure
• README 有提到,   • Autoconf is an
  autoconf 是:     extensible
  「 M4 巨集的套件      package of M4
  ,協助設定原始         macros that
  碼。」             produce shell
                  scripts to
                  automatically
                  configure
                  software source
                  code packages.
先安裝 m4




% sudo apt-get install m4
再次執行 configure
% ./configure
…
checking for GNU M4 that supports accurate traces... /usr/bin/m4
…
configure: creating ./config.status
config.status: creating tests/Makefile
config.status: creating tests/atlocal
config.status: creating man/Makefile
config.status: creating lib/emacs/Makefile
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating lib/Makefile
config.status: creating lib/Autom4te/Makefile
config.status: creating lib/autoscan/Makefile
config.status: creating lib/m4sugar/Makefile
config.status: creating lib/autoconf/Makefile
config.status: creating lib/autotest/Makefile
config.status: creating bin/Makefile
config.status: executing tests/atconfig commands
%
再次執行 configure
• M4 成功檢查過了。




• 還產生了一堆新的檔案。
configure 的功能
• M4 成功檢查過了。
 – 檢查系統是否有某些需要的功能。




• 還產生了一堆新的檔案。
configure 的功能
• M4 成功檢查過了。
 – 檢查系統是否有某些需要的功能。




• 還產生了一堆新的檔案。
 – 依檢查結果,產生編譯需要的檔案。
configure 的功能 #1
   檢查系統功能
configure 的功能 #1
      檢查系統功能
• 檢查系統有沒有程式需要的特定功能、函
  式、函式庫等。
configure 的功能 #1
      檢查系統功能
• 檢查系統有沒有程式需要的特定功能、函
  式、函式庫等。
• 程式可以據此設定條件式編譯。
configure 的功能 #1
      檢查系統功能
• 檢查系統有沒有程式需要的特定功能、函
  式、函式庫等。
• 程式可以據此設定條件式編譯。
configure 的功能 #1
       檢查系統功能
• 檢查系統有沒有程式需要的特定功能、函
  式、函式庫等。
• 程式可以據此設定條件式編譯。
 – 程式有用到 mysql ,可是系統不一定有安裝
   mysql 。這時就可以用條件式編譯。在沒有
   mysql 的系統上,取消掉 mysql 的支援。
中場休息。
歡迎提出問題。

Contenu connexe

Tendances

Laravel - 系統全攻略(續)
Laravel - 系統全攻略(續)Laravel - 系統全攻略(續)
Laravel - 系統全攻略(續)Vincent Chi
 
View 與 Blade 樣板引擎
View 與 Blade 樣板引擎View 與 Blade 樣板引擎
View 與 Blade 樣板引擎Shengyou Fan
 
PHP 語法基礎與物件導向
PHP 語法基礎與物件導向PHP 語法基礎與物件導向
PHP 語法基礎與物件導向Shengyou Fan
 
Phpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniterPhpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniterBo-Yi Wu
 
makefile20141121
makefile20141121makefile20141121
makefile20141121Kevin Wu
 
Composer 套件管理
Composer 套件管理Composer 套件管理
Composer 套件管理Shengyou Fan
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧Chu-Siang Lai
 
AWS EC2 for beginner
AWS EC2 for beginnerAWS EC2 for beginner
AWS EC2 for beginnerazole Lai
 
開發環境建置
開發環境建置開發環境建置
開發環境建置Shengyou Fan
 
Lucene 全文检索实践
Lucene 全文检索实践Lucene 全文检索实践
Lucene 全文检索实践yiditushe
 
使用Lua提高开发效率
使用Lua提高开发效率使用Lua提高开发效率
使用Lua提高开发效率gowell
 
自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!hik_lhz
 
Package 安裝與使用
Package 安裝與使用Package 安裝與使用
Package 安裝與使用Shengyou Fan
 
Ruby on Rails 開發環境建置 for Ubuntu
Ruby on Rails 開發環境建置 for UbuntuRuby on Rails 開發環境建置 for Ubuntu
Ruby on Rails 開發環境建置 for UbuntuMarsZ Chen
 
Model 設定與 Seeding
Model 設定與 SeedingModel 設定與 Seeding
Model 設定與 SeedingShengyou Fan
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano旭 張
 
Ruby on Rails 開發環境建置 for Mac
Ruby on Rails 開發環境建置 for MacRuby on Rails 開發環境建置 for Mac
Ruby on Rails 開發環境建置 for MacMarsZ Chen
 

Tendances (20)

Laravel - 系統全攻略(續)
Laravel - 系統全攻略(續)Laravel - 系統全攻略(續)
Laravel - 系統全攻略(續)
 
使用者認證
使用者認證使用者認證
使用者認證
 
View 與 Blade 樣板引擎
View 與 Blade 樣板引擎View 與 Blade 樣板引擎
View 與 Blade 樣板引擎
 
PHP 語法基礎與物件導向
PHP 語法基礎與物件導向PHP 語法基礎與物件導向
PHP 語法基礎與物件導向
 
Phpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniterPhpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniter
 
makefile20141121
makefile20141121makefile20141121
makefile20141121
 
Composer 套件管理
Composer 套件管理Composer 套件管理
Composer 套件管理
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧現代 IT 人一定要知道的 Ansible 自動化組態技巧
現代 IT 人一定要知道的 Ansible 自動化組態技巧
 
AWS EC2 for beginner
AWS EC2 for beginnerAWS EC2 for beginner
AWS EC2 for beginner
 
開發環境建置
開發環境建置開發環境建置
開發環境建置
 
Lucene 全文检索实践
Lucene 全文检索实践Lucene 全文检索实践
Lucene 全文检索实践
 
CRUD 綜合運用
CRUD 綜合運用CRUD 綜合運用
CRUD 綜合運用
 
使用Lua提高开发效率
使用Lua提高开发效率使用Lua提高开发效率
使用Lua提高开发效率
 
自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!
 
Package 安裝與使用
Package 安裝與使用Package 安裝與使用
Package 安裝與使用
 
Ruby on Rails 開發環境建置 for Ubuntu
Ruby on Rails 開發環境建置 for UbuntuRuby on Rails 開發環境建置 for Ubuntu
Ruby on Rails 開發環境建置 for Ubuntu
 
Model 設定與 Seeding
Model 設定與 SeedingModel 設定與 Seeding
Model 設定與 Seeding
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano
 
使用 Controller
使用 Controller使用 Controller
使用 Controller
 
Ruby on Rails 開發環境建置 for Mac
Ruby on Rails 開發環境建置 for MacRuby on Rails 開發環境建置 for Mac
Ruby on Rails 開發環境建置 for Mac
 

En vedette

Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the AutotoolsScott Garman
 
GNU Autotools - Automake and Autoconf
GNU Autotools - Automake and AutoconfGNU Autotools - Automake and Autoconf
GNU Autotools - Automake and AutoconfAvneet Kaur
 
Friesen presentation
Friesen presentationFriesen presentation
Friesen presentationifcaonline
 
Lead Management in SugarCRM Series: Adding Leads
Lead Management in SugarCRM Series: Adding LeadsLead Management in SugarCRM Series: Adding Leads
Lead Management in SugarCRM Series: Adding LeadsAtcore Systems
 
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonable
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonableSamir rafla antiarrhythmic drug therapy in hf and af , what is reasonable
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonableAlexandria University, Egypt
 

En vedette (20)

Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the Autotools
 
GNU Autotools - Automake and Autoconf
GNU Autotools - Automake and AutoconfGNU Autotools - Automake and Autoconf
GNU Autotools - Automake and Autoconf
 
Autotools
AutotoolsAutotools
Autotools
 
Friesen presentation
Friesen presentationFriesen presentation
Friesen presentation
 
69 dorthe godsklarsen_veje ind i historiebevidstheden
69 dorthe godsklarsen_veje ind i historiebevidstheden69 dorthe godsklarsen_veje ind i historiebevidstheden
69 dorthe godsklarsen_veje ind i historiebevidstheden
 
Karen Rysgaard, Danmarks længste jernalderhus i 2012?
Karen Rysgaard, Danmarks længste jernalderhus i 2012?Karen Rysgaard, Danmarks længste jernalderhus i 2012?
Karen Rysgaard, Danmarks længste jernalderhus i 2012?
 
Lead Management in SugarCRM Series: Adding Leads
Lead Management in SugarCRM Series: Adding LeadsLead Management in SugarCRM Series: Adding Leads
Lead Management in SugarCRM Series: Adding Leads
 
Pueblo jis2
Pueblo jis2Pueblo jis2
Pueblo jis2
 
Samir rafla principles of cardiology pages 1 61
Samir rafla principles of cardiology pages 1 61 Samir rafla principles of cardiology pages 1 61
Samir rafla principles of cardiology pages 1 61
 
Martin Brandt Djupdræt, Den autentiske oplevelse
Martin Brandt Djupdræt, Den autentiske oplevelseMartin Brandt Djupdræt, Den autentiske oplevelse
Martin Brandt Djupdræt, Den autentiske oplevelse
 
Sophie Bruun, Kulturstyrelsens seminar om forskning – september 2012 - en ops...
Sophie Bruun, Kulturstyrelsens seminar om forskning – september 2012 - en ops...Sophie Bruun, Kulturstyrelsens seminar om forskning – september 2012 - en ops...
Sophie Bruun, Kulturstyrelsens seminar om forskning – september 2012 - en ops...
 
Thomas Berthelsen, Nationalmuseet, Danmarks Kirker 2012
Thomas Berthelsen, Nationalmuseet, Danmarks Kirker 2012Thomas Berthelsen, Nationalmuseet, Danmarks Kirker 2012
Thomas Berthelsen, Nationalmuseet, Danmarks Kirker 2012
 
Peter Mohr Christensen Motorvejen ved Silkeborg
Peter Mohr Christensen Motorvejen ved SilkeborgPeter Mohr Christensen Motorvejen ved Silkeborg
Peter Mohr Christensen Motorvejen ved Silkeborg
 
Ecg commentary from saudi arabia 2004 white
Ecg commentary from saudi arabia 2004 whiteEcg commentary from saudi arabia 2004 white
Ecg commentary from saudi arabia 2004 white
 
59 Flemming Just, Regional udvikling
59 Flemming Just, Regional udvikling59 Flemming Just, Regional udvikling
59 Flemming Just, Regional udvikling
 
10x7 07 Naturhistorisk Museum "Så kan de lære det"
10x7 07 Naturhistorisk Museum "Så kan de lære det"10x7 07 Naturhistorisk Museum "Så kan de lære det"
10x7 07 Naturhistorisk Museum "Så kan de lære det"
 
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonable
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonableSamir rafla antiarrhythmic drug therapy in hf and af , what is reasonable
Samir rafla antiarrhythmic drug therapy in hf and af , what is reasonable
 
28 kirsten christensen_bronzealderguld i boeslunde
28 kirsten christensen_bronzealderguld i boeslunde28 kirsten christensen_bronzealderguld i boeslunde
28 kirsten christensen_bronzealderguld i boeslunde
 
122 anders gaardboejensen_dansk globalkunsthistorie
122 anders gaardboejensen_dansk globalkunsthistorie122 anders gaardboejensen_dansk globalkunsthistorie
122 anders gaardboejensen_dansk globalkunsthistorie
 
Martin Rovang, At starte en samling
Martin Rovang, At starte en samlingMartin Rovang, At starte en samling
Martin Rovang, At starte en samling
 

Similaire à GNU Autoconf / Automake #1

Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Yiwei Ma
 
X64服务器 lamp服务器部署标准 new
X64服务器 lamp服务器部署标准 newX64服务器 lamp服务器部署标准 new
X64服务器 lamp服务器部署标准 newYiwei Ma
 
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理Jason Zheng
 
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理haiyuan ning
 
GNU Build System
GNU Build SystemGNU Build System
GNU Build Systemimacat .
 
Android系统移植技术详解
Android系统移植技术详解Android系统移植技术详解
Android系统移植技术详解zzc89522
 
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來Shengyou Fan
 
Openshift by mtchang
Openshift by mtchangOpenshift by mtchang
Openshift by mtchangChang Mt
 
使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率Zhen Li
 
使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率Zhen Li
 
unix toolbox 中文版
unix toolbox 中文版unix toolbox 中文版
unix toolbox 中文版Jie Bao
 
5, system admin
5, system admin5, system admin
5, system adminted-xu
 
Firefox OS Overview
Firefox OS OverviewFirefox OS Overview
Firefox OS OverviewYan-ren Tsai
 
Docker tutorial
Docker tutorialDocker tutorial
Docker tutorialazole Lai
 
Cfengine培训文档 刘天斯
Cfengine培训文档 刘天斯Cfengine培训文档 刘天斯
Cfengine培训文档 刘天斯liuts
 
康盛创想项目部Linux 服务器部署标准(最新版)
康盛创想项目部Linux 服务器部署标准(最新版)康盛创想项目部Linux 服务器部署标准(最新版)
康盛创想项目部Linux 服务器部署标准(最新版)Yiwei Ma
 

Similaire à GNU Autoconf / Automake #1 (20)

Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)
 
gnutool
gnutoolgnutool
gnutool
 
Linuxguide4f2e
Linuxguide4f2eLinuxguide4f2e
Linuxguide4f2e
 
LinuxGuide4F2E
LinuxGuide4F2ELinuxGuide4F2E
LinuxGuide4F2E
 
X64服务器 lamp服务器部署标准 new
X64服务器 lamp服务器部署标准 newX64服务器 lamp服务器部署标准 new
X64服务器 lamp服务器部署标准 new
 
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理
 
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理
 
GNU Build System
GNU Build SystemGNU Build System
GNU Build System
 
Android系统移植技术详解
Android系统移植技术详解Android系统移植技术详解
Android系统移植技术详解
 
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratchBuild Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
 
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
 
Openshift by mtchang
Openshift by mtchangOpenshift by mtchang
Openshift by mtchang
 
使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率
 
使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率使用Samba提升linux平台开发效率
使用Samba提升linux平台开发效率
 
unix toolbox 中文版
unix toolbox 中文版unix toolbox 中文版
unix toolbox 中文版
 
5, system admin
5, system admin5, system admin
5, system admin
 
Firefox OS Overview
Firefox OS OverviewFirefox OS Overview
Firefox OS Overview
 
Docker tutorial
Docker tutorialDocker tutorial
Docker tutorial
 
Cfengine培训文档 刘天斯
Cfengine培训文档 刘天斯Cfengine培训文档 刘天斯
Cfengine培训文档 刘天斯
 
康盛创想项目部Linux 服务器部署标准(最新版)
康盛创想项目部Linux 服务器部署标准(最新版)康盛创想项目部Linux 服务器部署标准(最新版)
康盛创想项目部Linux 服务器部署标准(最新版)
 

Plus de imacat .

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Ownimacat .
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機imacat .
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applicationsimacat .
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Pythonimacat .
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docsimacat .
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversityimacat .
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4imacat .
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Businessimacat .
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calcimacat .
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012imacat .
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calcimacat .
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3imacat .
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1imacat .
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4imacat .
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2imacat .
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4imacat .
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02imacat .
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01imacat .
 
Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4imacat .
 
OpenOffice UNO Application on Android
OpenOffice UNO Application on AndroidOpenOffice UNO Application on Android
OpenOffice UNO Application on Androidimacat .
 

Plus de imacat . (20)

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Own
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applications
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Python
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversity
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Business
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calc
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calc
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01
 
Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4
 
OpenOffice UNO Application on Android
OpenOffice UNO Application on AndroidOpenOffice UNO Application on Android
OpenOffice UNO Application on Android
 

GNU Autoconf / Automake #1

  • 1. GNU Autoconf / Automake 工作坊 使用 Autoconf 來 build 專案(上) 依瑪貓/楊士青 <imacat@mail.imacat.idv.tw> 2012/7/28
  • 2. 「使用 Autoconf 來 build 專案(上)」簡報由 依瑪貓╱楊士青 製作, 以 創用CC Attribution-ShareAlike 3.0 Unported 授權條款 釋出。
  • 3. 自我介紹 • 依瑪貓╱楊士青 • 2001 年起參與國內外自由軟體社群開發 • SourceForge vsntp 等專案 • 現為 Apache OpenOffice 開發團隊成員
  • 6. 下載 autoconf % wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
  • 7. 解壓縮 autoconf % tar xzf autoconf-2.69.tar.gz
  • 12. 再看看資料夾中有什麼東西 % ls aclocal.m4 cfg.mk ChangeLog.3 COPYINGv3 m4 NEWS AUTHORS ChangeLog configure doc maint.mk README bin ChangeLog.0 configure.ac GNUmakefile Makefile.am tests BUGS ChangeLog.1 COPYING INSTALL Makefile.in THANKS build-aux ChangeLog.2 COPYING.EXCEPTION lib man TODO %
  • 13. Autoconf-2.69 資料夾中有 • README • INSTALL • 只有一個可執行檔 configure
  • 15. 讀一讀 README % cat README -*- text -*- Autoconf Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of M4 macro calls. … %
  • 16. 讀一讀 README 大意好像是: 「 M4 巨集的套件,協助設定原始碼。」
  • 18. 讀一讀 INSTALL % cat INSTALL Installation Instructions … Briefly, the shell commands './configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. … %
  • 19. 讀一讀 INSTALL 所以只要 ./configure; make; make install 就可以了!?
  • 25. 執行 configure % ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p … checking for expr... /usr/bin/expr checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH. GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended. GNU M4 1.4.15 uses a buggy replacement strstr on some systems. Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug. %
  • 27. 執行 configure • README 有提到, • Autoconf is an autoconf 是: extensible 「 M4 巨集的套件 package of M4 ,協助設定原始 macros that 碼。」 produce shell scripts to automatically configure software source code packages.
  • 28. 先安裝 m4 % sudo apt-get install m4
  • 29. 再次執行 configure % ./configure … checking for GNU M4 that supports accurate traces... /usr/bin/m4 … configure: creating ./config.status config.status: creating tests/Makefile config.status: creating tests/atlocal config.status: creating man/Makefile config.status: creating lib/emacs/Makefile config.status: creating Makefile config.status: creating doc/Makefile config.status: creating lib/Makefile config.status: creating lib/Autom4te/Makefile config.status: creating lib/autoscan/Makefile config.status: creating lib/m4sugar/Makefile config.status: creating lib/autoconf/Makefile config.status: creating lib/autotest/Makefile config.status: creating bin/Makefile config.status: executing tests/atconfig commands %
  • 30. 再次執行 configure • M4 成功檢查過了。 • 還產生了一堆新的檔案。
  • 31. configure 的功能 • M4 成功檢查過了。 – 檢查系統是否有某些需要的功能。 • 還產生了一堆新的檔案。
  • 32. configure 的功能 • M4 成功檢查過了。 – 檢查系統是否有某些需要的功能。 • 還產生了一堆新的檔案。 – 依檢查結果,產生編譯需要的檔案。
  • 33. configure 的功能 #1 檢查系統功能
  • 34. configure 的功能 #1 檢查系統功能 • 檢查系統有沒有程式需要的特定功能、函 式、函式庫等。
  • 35. configure 的功能 #1 檢查系統功能 • 檢查系統有沒有程式需要的特定功能、函 式、函式庫等。 • 程式可以據此設定條件式編譯。
  • 36. configure 的功能 #1 檢查系統功能 • 檢查系統有沒有程式需要的特定功能、函 式、函式庫等。 • 程式可以據此設定條件式編譯。
  • 37. configure 的功能 #1 檢查系統功能 • 檢查系統有沒有程式需要的特定功能、函 式、函式庫等。 • 程式可以據此設定條件式編譯。 – 程式有用到 mysql ,可是系統不一定有安裝 mysql 。這時就可以用條件式編譯。在沒有 mysql 的系統上,取消掉 mysql 的支援。