标签: autoconf

"./configure"选项"--build"," - host"和"--target"的区别是什么?

该脚本./configure接受3个选项--build,--host--target.我混淆了他们的角色.它们的区别和语义是什么?

autoconf configure cross-compiling option

112
推荐指数
2
解决办法
7万
查看次数

尝试安装pecl扩展时,mac os x 10.7.3上的$ PHP_AUTOCONF错误

我正在尝试使用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)

php macos installation autoconf pecl

107
推荐指数
4
解决办法
9万
查看次数

可能是未定义的宏:AC_MSG_ERROR

我在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)

autoconf autotools

106
推荐指数
8
解决办法
12万
查看次数

CFLAGS与CPPFLAGS

我知道CFLAGS(或CXXFLAGS for C++)是针对编译器的,而CPPFLAGS是由预处理器使用的.

但我仍然不明白其中的区别.

我需要为#include包含的头文件指定一个包含路径 - 因为#include是一个预处理器指令,是我唯一关心的预处理器(CPPFLAGS)吗?

在什么情况下我需要给编译器一个额外的包含路径?

通常,如果预处理器找到并包含所需的头文件,为什么需要告知额外的包含目录?CFLAGS有什么用?

(在我的情况下,我实际上发现这两个允许我编译我的程序,这增加了混乱...我可以使用CFLAGS CPPFLAGS来实现我的目标(至少在autoconf上下文中.)给出了什么?)

autoconf makefile autotools cflags

92
推荐指数
2
解决办法
11万
查看次数

如何添加include和lib路径来配置/ make循环?

我需要一个地方在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但它似乎不起作用.

bash linker autoconf makefile configure

71
推荐指数
3
解决办法
18万
查看次数

找不到autoconf.请检查您在CentOS中的autoconf安装Xampp

在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环境变量.然后,重新运行此脚本.

怎么解决呢?

php xampp autoconf memcached centos

67
推荐指数
4
解决办法
5万
查看次数

GNU autotools:调试/发布目标?

我一直在寻找这个:我目前正在将一个中型程序转换为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

c++ automake autoconf autotools

58
推荐指数
3
解决办法
4万
查看次数

Autoconf和Autotools的替代品?

我是GNU Autotools的常用用户(主要是Autoconf,偶尔也是Libtool).我正在开展一个可移植性将成为关键点的项目.然而,团队的其他成员只是不习惯使用m4.我得到这个在我的收件箱从不是一个,而是四个人:

m4不是lisp,该死!

无论如何,也许有人可以推荐基于Python或PHP的东西?我正在研究一棵更大的树的C端; 我可以肯定会出现Python或PHP 5,因为它们是先决条件.

c autoconf autotools

54
推荐指数
5
解决办法
2万
查看次数

Autoconf:dnl vs.#

Autoconfig手册指出注释行可以以dnl或开头#.

他们之间有什么区别,在任何情况下使用一个而不是另一个的理由是什么?或者纯粹是品味问题?

autoconf

38
推荐指数
2
解决办法
1万
查看次数

安装了libtool但找不到libtoolize

我试图在我的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工作?

macos autoconf autotools libxml2 libtool

34
推荐指数
3
解决办法
5万
查看次数