该脚本./configure
接受3个选项--build
,--host
和--target
.我混淆了他们的角色.它们的区别和语义是什么?
我正在尝试使用pecl_http和memcache设置我的机器,在这两种情况下,我都会遇到类似的错误.这是在MAC OS X 10.7.3(狮子)上,我也安装了XCODE.我还在运行这些命令之前安装了Zend Server社区版,并设置了CFLAGS =' - arch i386 -arch x86_64'环境变量.所以请帮助我做我需要做的事情
bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
Run Code Online (Sandbox Code Playgroud) 我在configure.ac中有以下内容:
AC_CHECK_PROGS(MAKE,$MAKE make gmake,error)
if test "x$MAKE" = "xerror" ;then
AC_MSG_ERROR([cannot find a make command])
fi
Run Code Online (Sandbox Code Playgroud)
这已经在我们的项目中很长一段时间了,但在一些设置中,我得到这个错误:
configure.ac:45: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Run Code Online (Sandbox Code Playgroud)
最近在上面添加的行:
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释导致此错误的原因以及如何追踪问题?
编辑:添加有关差异的详细信息.
有效的盒子:
uname -a Linux host1 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
automake: 1.11.1
autoconf: 2.67
m4: 1.4.14
libtoolize: 2.2.6b
Run Code Online (Sandbox Code Playgroud)
不起作用的盒子:
Linux host2 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC …
Run Code Online (Sandbox Code Playgroud) 我知道CFLAGS(或CXXFLAGS for C++)是针对编译器的,而CPPFLAGS是由预处理器使用的.
但我仍然不明白其中的区别.
我需要为#include包含的头文件指定一个包含路径 - 因为#include是一个预处理器指令,是我唯一关心的预处理器(CPPFLAGS)吗?
在什么情况下我需要给编译器一个额外的包含路径?
通常,如果预处理器找到并包含所需的头文件,为什么需要告知额外的包含目录?CFLAGS有什么用?
(在我的情况下,我实际上发现这两个允许我编译我的程序,这增加了混乱...我可以使用CFLAGS 或 CPPFLAGS来实现我的目标(至少在autoconf上下文中.)给出了什么?)
我需要一个地方在linux盒子里安装库我没有su访问权限.我正在使用〜/ local [/ bin,/ lib,/ include],但我不知道如何告诉./configure在那里寻找库(特别是,我正在尝试编译emacs,这需要libgif ,这不是我的发行版).
我尝试添加
export PATH=$PATH:~/local/bin
export LD_LIBRARY_PATH=~/local/lib
export C_INCLUDE_PATH=~/local/include
export CPLUS_INCLUDE_PATH=~/local/include
Run Code Online (Sandbox Code Playgroud)
到.bashrc但它似乎不起作用.
在CentOS中的XAMPP中配置memcahed时出现另一个错误
# /opt/lampp/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
Run Code Online (Sandbox Code Playgroud)
找不到autoconf.请检查您的autoconf安装和$ PHP_AUTOCONF环境变量.然后,重新运行此脚本.
怎么解决呢?
我一直在寻找这个:我目前正在将一个中型程序转换为autotools,来自基于Eclipse的方法(带有makefile)
我总是习惯于进行"调试"构建,包含所有调试符号和没有优化,以及"发布"构建,没有调试符号和最佳优化.
现在我试图用autotools以某种方式复制它,所以我可以(也许)做类似的事情:
./configure
make debug
Run Code Online (Sandbox Code Playgroud)
哪个会有所有调试符号而没有优化,以及哪里:
./configure
make
Run Code Online (Sandbox Code Playgroud)
会导致"发布"版本(默认)
PS:我已经阅读了关于--enable-debug标志/功能的内容,但在我目前的(简单)设置中,使用它无法识别 configure
Autoconfig手册指出注释行可以以dnl
或开头#
.
他们之间有什么区别,在任何情况下使用一个而不是另一个的理由是什么?或者纯粹是品味问题?
我试图在我的mac上从源代码构建libxml2.
所以我使用mac ports安装了autoconf libtool和automake
autoconf和automake似乎正如预期的那样正常工作.
我首先尝试运行autogen.sh.
不幸的是,libtoolize --version给出了
-bash: libtoolize: command not found
Run Code Online (Sandbox Code Playgroud)
我尝试跑步(再次)
sudo port install libtool
---> Cleaning libtool
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
Run Code Online (Sandbox Code Playgroud)
我试试
locate libtool
Run Code Online (Sandbox Code Playgroud)
它似乎安装得很好
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1/libtool.1
/Applications/Xcode.app/Contents/Developer/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/usr/share/man/man1/libtool.1
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/mipsel-linux-binutils/files/110-uclibc-libtool-conf.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/files
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/files/ltmain.m4sh-allow-clang-stdlib.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool-devel
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool-devel/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/openslp/files/libtool-tags.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/t1lib/files/patch-libtool-tag.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/print/pdflib/files/patch-libtool.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/security/steghide/files/libtool-tag.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/apache2/files/libtool-tag.diff
/usr/bin/libtool
/usr/lib/php/build/libtool.m4
/usr/share/apr-1/build-1/libtool
/usr/share/man/man1/libtool.1
Run Code Online (Sandbox Code Playgroud)
我如何让libtoolize工作?