1.下载
wget http://prdownloads.sourceforge.net/zthread/ZThread-2.3.2.tar.gz
2.解压
tar -zxvf ZThread-2.3.2.tar.gz
3. 进入源码目录
cd ZThread-2.3.2/src
libtoolize --copy --force
4.进入构建目录即ZThread-2.3.2目录下
cd ..
aclocal -I share/
autoconf
automake
如果有报错
configure.ac:56: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see:
configure.ac:56: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:56: error: required file './missing' not found
configure.ac:56: 'automake --add-missing' can install 'missing'
src/Makefile.am:21: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: error: required file './depcomp' not found
src/Makefile.am: 'automake --add-missing' can install 'depcomp'
按照提示执行 automake --add-missing
automake --add-missing
4.make 和 make install
./configure --prefix=<绝对路径>/ZThread-2.3.2 CXXFLAGS="$CXXFLAGS -fpermissive"
5.如果还有如下报错:
../libtool: line 852: X--tag=CXX: command not found
../libtool: line 885: libtool: ignoring unknown tag : command not found
../libtool: line 852: X--mode=compile: command not found
../libtool: line 1002: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1003: *** Future versions of Libtool will require -mode=MODE be specified.: command not found
../libtool: line 1146: Xg++: command not found
../libtool: line 1146: X-DHAVE_CONFIG_H: command not found
../libtool: line 1146: X-I.: command not found
../libtool: line 1146: X-I../include: No such file or directory
../libtool: line 1146: X-fpermissive: command not found
../libtool: line 1146: X-Wall: command not found
../libtool: line 1146: X-DNDEBUG: command not found
../libtool: line 1146: X-fpermissive: command not found
../libtool: line 1146: X-Wall: command not found
../libtool: line 1146: X-DNDEBUG: command not found
../libtool: line 1146: X-MT: command not found
../libtool: line 1146: XAtomicCount.lo: command not found
../libtool: line 1146: X-MD: command not found
../libtool: line 1146: X-MP: command not found
../libtool: line 1146: X-MF: command not found
../libtool: line 1146: X.deps/AtomicCount.Tpo: No such file or directory
../libtool: line 1146: X-c: command not found
../libtool: line 1194: XAtomicCount.lo: command not found
../libtool: line 1199: libtool: compile: cannot determine name of library object from `': command not found
再重新执行下libtoolize --copy --force