https://www.jianshu.com/p/81916fba741c
例解 autoconf 和 automake 生成 Makefile 文件
https://www.ibm.com/developerworks/cn/linux/l-makefile/
#安装m4 wget 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 && make install cd .. #安装autoconf wget 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 make && make install cd .. #安装automake wget 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 && make install cd .. #安装libtool wget 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 && make install cd ..
cmake添加-fPIC
add_compile_options(-fPIC)
configure添加-fPIC
--enable-shared --enable-static CFLAGS=-fPIC