天道酬勤,学无止境

autoconf

What is ltmain.sh, and why does automake say it is missing? What is a good auto (make/conf/etc) generator?

I just want to develop a C app in linux with the auto(make/conf/...) stuff automatically generated. I tried generating it with ede and anjuta, but it doesn't seem to generate Makefile.am. So, I tried running automake, and it says "ltmain.sh" isn't found. Is there some easy to generate the basic build files for linux C/C++ apps. What is the standard practice? Do most people write these files themselves?

2021-11-29 00:25:43    分类:问答    emacs   autoconf   automake   anjuta

How to point autoconf/automake to non-standard packages

I'm trying to build ZooKeeper on a RedHat Linux box. (Exactly what ZooKeeper is is probably not important :-) When I follow the package instructions, I get: $ autoreconf -if aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 I can't install CPPPUNIT in the standard

2021-11-28 09:07:50    分类:问答    autoconf   configure   automake   apache-zookeeper

How to include .m4 files in Autoconf?

I have downloaded a macro from Autoconf Archive, and I want to use it. What do I have to put in my configure.ac file to make use this macro?

2021-11-28 04:08:17    分类:问答    autoconf

Incorrect @libdir@ when building *.pc using config.site?

I'm working on Fedora x86_64. It uses /lib64, /usr/lib64 and friends. I have the following *.pc.in file: $ cat libcryptopp.pc.in prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ ... My config.site has the following. It was copied from Fedora's config.site at /usr/share/config.site. The copy was used because of config.site for vendor libs on Fedora x86_64. $ cat /usr/local/share/config.site ... # Note: This file includes also RHEL/Fedora fix for installing libraries into # "/lib/lib64" on 64bit systems. if test -n "$host"; then # skip when cross-compiling return

2021-11-26 06:26:47    分类:问答    configuration   libraries   autoconf

How do I combine AC_SUBST and AC_DEFINE?

I've a configure.ac file containing lines like: AC_DEFINE(CONF_XDISP, ":8", "X screen number") These constants are used in the C source for setting compile defaults. I also have a configuration file conf/bumblebee.conf in which these defaults need to be set. I'm told that AC_SUBST can be used to get @CONF_XDISP@ substituted for ":8" such that the below line: VGL_DISPLAY=@CONF_XDISP@ becomes: VGL_DISPLAY=":8" Making an AC_SUBST line for each AC_DEFINE does not look the best way to me as it includes a lot duplication of lines. How can I combine these options, such that I can use something like

2021-11-24 21:24:00    分类:问答    autoconf

config.site for vendor libs on Fedora x86_64

I'm having trouble building a few Autotool-based libraries on Fedora 26, x86_64. The 64-bit Fedora puts third party and vendor libraries in /usr/local/lib64. Ubuntu 17 uses /usr/local/lib so the same projects build OK. I've been using --libdir=/usr/local/lib64 but three libraries resist it. I lack a config.site for /usr/local so I am trying to add one. The Autoconf manual on Site Defaults is a tad bit confusing to me when it discusses usr/local's config.site. It says: [discussion of /usr version of confg.site] ... Likewise, on platforms where 64-bit libraries are built by default, then

2021-11-18 23:33:36    分类:问答    x86-64   fedora   autotools   autoconf

Autotools 检查 C++11(Autotools check for C++11)

问题 我使用AX_CXX_COMPILE_STDCXX_0X (可以查看 autoconf-archive)来检查编译器的 c++11 功能。 它正确地确定需要-std=c++0x ,但没有将其添加到CXXFLAGS 。 我查看了宏源,它实际上进行了检查,但随后恢复了以前的标志。 我应该怎么做才能将CXXFLAGS设置为能够编译 c++11 源代码? 仅将-std=c++0x添加到AM_CXXFLAGS并不是一个好的解决方案,因为我想将编译器在 C++11 模式下编译的负担交给 autoconf 开发人员,而不是我。 回答1 您要查找的内容已经作为 AX_CXX_COMPILE_STDCXX_11 制作,它是 autoconf-archive 的一部分。 它将向环境添加所需的选项(以前通过CXXFLAGS ,现在通过CXX )并在没有 C++11 支持时出错。 回答2 一般来说,您可以编译一个简单的代码并根据编译结果设置一个变量 DIALECT="-std=c++14" echo 'int main() {return 0;}' > ./log.cpp && $CXX -std=c++14 ./log.cpp || $DIALECT="no" if test $DILAECT = no; then AC_MSG_ERROR([c++ compiler does not

2021-11-18 17:39:33    分类:技术分享    c++   c++11   autotools   autoconf

Autotools check for C++11

I use AX_CXX_COMPILE_STDCXX_0X(can look on autoconf-archive) to check for c++11 capabilities of the compiler. It correctly determines that -std=c++0x required, but does not add it to CXXFLAGS. I took a look at the macro source and it actually checks but then restores previous flags. What should I do to get CXXFLAGS set to be able to compile c++11 source? Just adding -std=c++0x to AM_CXXFLAGS is not nice solution, because I'd like to put the burden of making the compiler compile in C++11 mode on the autoconf developers, not me.

2021-11-15 14:30:42    分类:问答    c++   c++11   autotools   autoconf

在amd64上编译gcc,在i686上运行,目标是mips(Compile gcc on amd64, for running on i686, and target is mips)

问题 我想为 MIPS 目标编译 gcc 和 binutils。 我正在 64 位 (amd64) 机器上工作。 并且想要获得能够在 i686(不是 amd64)架构上运行的二进制文件? 我应该如何配置和构建 gcc? 如果我将 --host=i686-linux-gnu 添加到 ./configure 脚本,那么它会抱怨没有 i686-xxxx 工具。 如果我添加 CFLAGS=-m32,那么我可以构建 binutils,但不能构建 gcc,因为以下错误: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -o build/genconstants \ build/genconstants.o build

2021-11-15 04:04:20    分类:技术分享    gcc   cross-compiling   x86-64   configure   autoconf

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend Server community edition before running these commands and have CFLAGS='-arch i386 -arch x86_64' environment variables set. So please help with what I need to do 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

2021-11-14 18:01:00    分类:问答    php   macos   installation   autoconf   pecl