MAC下安装automake autoconf工具

I noticed today that while Mac OS 10.6 (specifically, 10.6.2) comes with automake and autoconf, the versions are a little bit dated. Normally I wouldn’t care, but I ran into an issue when trying to generate a portable distribution using those tools on my mac, and then configure, compile, and install the result on a linux box. What I discovered is that the version of autoconf and automake on OSX can generate a “configure” file which doesn’t work as expected on linux (at least one with gcc 4.3) — specifically, the step “checking for working mktime…” can hang and eventually return “no”, when that is not the correct result. Apparently you need at least autoconf 2.62 in order to avoid this bug.

I figured as long as I was updating autoconf i’d update automake, m4, and libtool as well. Here’s the quick script (as always, I assume you prefer the installation prefix /usr/local as i do). It’s nothing too fancy, but the sequence of the installs is important:

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local # ironic, isn‘t it?
make
sudo make install
cd ..
# here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script
curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr/local
make
sudo make install
and now, (assuming you have /usr/local in your path), when you use autotools your distribution should be correctly portable (at least in regards to this mktime bug).

时间: 2024-12-18 14:23:24

MAC下安装automake autoconf工具的相关文章

mac下安装mongoDB

方式一:命令行 MongoDB的安装有好多种安装方法,有普通青年的HomeBrew方式,也有文艺青年的源码编译方式.我只想快速的装起来用一下,所以我选最简单的HomeBrew. 请参考官方文档 : http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ 更新Homebrew的package数据库,在Mac的终端中输入: $ brew update 然后耐心等待,这个没有任何显示,估计要几分钟,取决于网络的速度.然后就列出了

Mac下安装LNMP(Nginx+PHP5.6)环境

Mac下安装LNMP(Nginx+PHP5.6)环境 安装Homebrew 最近工作环境切换到Mac,所以以OS X Yosemite(10.10.1)为例,记录一下从零开始安装Mac下LNMP环境的过程 确保系统已经安装xcode,然后使用一行命令安装依赖管理工具Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 之后就可以使用 brew

在mac下安装了MySqL + MySQLWorkbench + PyCharm

今天在mac下安装了MySqL  +   MySQLWorkbench + PyCharm 安装这些东西没有在windows下熟悉. 在Mac下安装程序真的不是很适应,感觉很不爽!!!安装完成后还是蛮高兴,后面可以做自己要做的事情了. 通过查阅各种各样的资料,去安装这些东东.最后经过一番周折终于安装完成.下面是对安装过程和遇到的问题做个简单记录. 一.下载MySQL和MySQL Workbench http://dev.mysql.com/downloads/mysql/ 选择合适自己Mac 版

mac下安装启动Mongodb

本人最近才上手mac,在使用mac上面有很多不熟悉的地方,慢慢摸索,记录下来,以供后续翻阅与参考: 在Mac下安装MongoDB方式 第一种.用浏览器或者第三方工具下载当前版本的下载地址: http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.6.tgz 第二种.通过homebrew安装mongodb,terminal下运行以下指令就可以了 这里,我只讲通过homebrew来安装. 在Mac下安装MongoDB,通过homebrew 1.

Mac下安装HBase及详解

Mac下安装HBase及详解 1. 千篇一律的HBase简介 HBase是Hadoop的数据库, 而Hive数据库的管理工具, HBase具有分布式, 可扩展及面向列存储的特点(基于谷歌BigTable). HBase可以使用本地文件系统和HDFS文件存储系统, 存储的是松散的数据(key-value的映射关系). HBase位于HDFS的上层, 向下提供存储, 向上提供运算 2. HBase安装 HBase有单机, 伪分布式, 全分布式运行模式 依赖: 匹配HBase的Hadoop版本 Jav

mac下安装LuaSocket

安装LuaSocket LuaSocket 是 Lua 的网络模块库,它可以很方便地提供 TCP.UDP.DNS.FTP.HTTP.SMTP.MIME 等多种网络协议的访问操作.它由两部分组成:一部分是用 C 写的核心,提供对 TCP 和 UDP 传输层的访问支持.另外一部分是用 Lua 写的,负责应用功能的网络接口处理. 安装LuaSocket Homebrew安装(如果已经安装略过此步) 首先你要安装Homebrew.安装 Homebrew 很简单,只需在终端上输入一行 Ruby 脚本(所以

个人建站&mac下安装hexo

title: 个人建站&mac下安装hexo date: 2018-04-18 16:34:02 tags: [mac,blog,个人建站,markdown] --- 这两天使用了markdown来写文章,发觉甚是好用.条理清晰,排版清爽.so,萌生了使用支持markdown的hexo来进行个人建站. setup 1 安装node.js: hexo的serv是基于node.js的,所以首先我们要安装node.js. 已经安装的可以跳过. 安装 Node.js 的最佳方式是使用 nvm. nvm是

MAC下安装Homebrew 和 @权限的问题

MAC下安装Homebrew和 @权限的问题 1.Homebrew简介: Homebrew是一个包管理器,用于安装Apple没有预装但你需要的UNIX工具.(比如著名的wget). Homebrew会将软件包安装到独立目录(/usr/local/Cellar),并将其文件软链接至/usr/local. Homebrew不会将文件安装到它本身目录之外,所以您可将Homebrew安装到任意位置. Homebrew使macOS更完整.使用gem来安装gems.用brew来安装那些依赖包. 安装: /u

mac下安装配置java开发环境

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica; color: #000000 } p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica; color: #000000; min-height: 13.0px } p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #