获得代码:
git clone https://bitbucket.org/mituharu/emacs-mac.git
阅读 INSTALL.REPO
,要求安装
- autoconf
- git
- makeinfo
macOS 已经自带了 git 和 makeinfo,只需要安装 autoconf
brew install autoconf
生成 configure:
./autogen.sh
配置:
./configure --with-modules
报错:
configure: error: The following required libraries were not found: gnutls Maybe some development libraries/packages are missing? If you don’t want to link with them give –with-gnutls=no as options to configure
重新配置:
./configure --with-modules --with-gnutls=no
编译:
make
测试;
open -n mac/Emacs.app --args -Q
问题:
(eww "https://emacs-china.org")
Opening TLS connection to `emacs-china.org’… Opening TLS connection with `gnutls-cli –x509cafile /etc/ssl/cert.pem -p 443 emacs-china.org’…failed Opening TLS connection with `gnutls-cli –x509cafile /etc/ssl/cert.pem -p 443 emacs-china.org –protocols ssl3’…failed Opening TLS connection to `emacs-china.org’…failed url-http: Could not create connection to emacs-china.org:443
安装 gnutls
brew install gnutls
重新配置
./configure --with-modules
依旧包找不到 gnutls
configure: error: The following required libraries were not found: gnutls Maybe some development libraries/packages are missing? If you don’t want to link with them give –with-gnutls=no as options to configur
安装 pkg-config (Homebrew 的 emacs 需要这个)
brew install pkg-config
重新配置
./configure --with-modules
安装
make
测试 HTTPS,正常
(eww "https://emacs-china.org")
安装的所有包
brew ls
其中 autoconf gnutls pkg-config 是主动安装的,其余的都是依赖