- 主题:编译libxml2遇到的问题
跳出了下面这些信息,那个缺少的pkg.m4怎么安装?
$ ./autogen.sh
I am going to run ./configure with no arguments - if you wish
to pass any to it, please specify them on the ./autogen.sh command line.
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:13: installing `./config.guess'
configure.ac:13: installing `./config.sub'
configure.ac:58: installing `./install-sh'
configure.ac:58: installing `./missing'
doc/examples/Makefile.am: installing `./depcomp'
Couldn't find pkg.m4 from pkg-config. Install the appropriate package for
your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
--
FROM 116.231.61.*
忽略掉上面的错误,我强行配置。报错下面的信息,
编译libxml2还需要zlib的依赖吗?
$ ./configure
checking whether to disable maintainer-specific portions of Makefiles... yes
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether ln -s works... no, using cp -p
checking how to run the C preprocessor... gcc -E
checking for mv... /bin/mv
checking for tar... /bin/tar
checking for perl... /bin/perl
checking for wget... /usr/bin/wget
checking for xmllint... /usr/bin/xmllint
checking for xsltproc... /usr/bin/xsltproc
./configure: line 4490: PKG_PROG_PKG_CONFIG: command not found
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /mingw/bin/ld
checking if the linker (/mingw/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm -B
checking the name lister (/mingw/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format...
func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_c
onvert_file_msys_to_w32
checking for /mingw/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/mingw/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
Checking zlib
./configure: line 12284: syntax error near unexpected token `Z,zlib,'
./configure: line 12284: ` PKG_CHECK_MODULES(Z,zlib,'
【 在 javame (yimin) 的大作中提到: 】
: 跳出了下面这些信息,那个缺少的pkg.m4怎么安装?
: $ ./autogen.sh
: I am going to run ./configure with no arguments - if you wish
: ...................
--
FROM 116.231.61.*
libxml 2.9.8的版本和libxml 2.9.9的版本配置
起来是有点不一样的。
github最新的版本配置起来,就会报我上面的错误。
【 在 JulyClyde (我的月份又来了) 的大作中提到: 】
: 明摆着要你还问?
--
FROM 124.78.13.*
我下的pkg-config里面没有pkg.m4
github我搜到一个pkgconf里面倒有这个文件。
【 在 s3aker (s3aker) 的大作中提到: 】
: pkg.m4属于pkg-config。
--
FROM 124.78.13.*
m4是perl脚本,是不是我把github上的那个pkg.m4放到指定路径就可以了?
网上搜了一下,pkg-config的安装包都没有pkg.m4这个文件。
【 在 s3aker (s3aker) 的大作中提到: 】
: pkg.m4属于pkg-config。
--
FROM 124.78.13.*