autoconf

Build m4, autoconf, automake, libtool on unix

拟墨画扇 提交于 2019-12-10 19:59:49
问题 I'm trying to setup PHP, apache environment on HP-UX server. While install i'm using usual commands of "./configur, make, make install". Here when I'm trying to install PCRE I got an error like follows. CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/ubuntu/softwares/m4-1.4.17/build-aux/missing aclocal-1.14 -I m4 /home/ubuntu/softwares/m4-1.4.17/build-aux/missing: line 81: aclocal-1.14: command not found WARNING: 'aclocal-1.14' is missing on your system. You should only need it if you

Changing *FLAGS in configure.ac vs. caching with subprojects

耗尽温柔 提交于 2019-12-10 18:08:04
问题 Say I wish to add a specific flag to CFLAGS within my configure script, that should propagate to all subprojects' configure scripts: CFLAGS+=" -Dfoobar" export CFLAGS AC_CONFIG_SUBDIRS([sub]) This works when configure is invoked trivially. As soon as one of the following happens: CFLAGS is exported in the environment when configure is invoked CFLAGS is set on configure command-line caching is used ( configure -C ) This approach no longer works. In the first two cases, the exported CFLAGS is

How to regenerate configure file using autoconf?

百般思念 提交于 2019-12-10 16:16:08
问题 I use autoconf to regenerate the configure file, it works. But when I execute the generated configure file by ./configure , there are some error messages like ./configure: line 3713: syntax error near unexpected token `blas' ./configure: line 3713: ` withval=$with_blas; R_ARG_USE(blas)' I googled and found that blas is a library, but it still gives the error messages after installing. I have the autoconf with version " autoconf (GNU Autoconf) 2.69 " installed on my Mac, and what I am trying

Autoconf/Automake conditionals and dist rules

為{幸葍}努か 提交于 2019-12-10 15:56:49
问题 I recently started using autoconf and automake for a project I'm working on. The project's documentation is written in LaTeX. Since I don't want to have LaTeX as a dependency I want to check the presence of the pdflatex binary with autoconf and then use that information in the Makefile.am to decide whether to simply copy the .tex file to the documentation directory, or to generate the PDF and copy both. This is the relevant section in configure.ac : # Check for presence of pdfLaTeX AC_CHECK

./configure、make、make install 命令

大城市里の小女人 提交于 2019-12-10 14:48:18
这些都是典型的使用GNU的AUTOCONF和AUTOMAKE产生的程序的安装步骤 一、基本信息   1、./configure 是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本。   2、make 是用来编译的,它从Makefile中读取指令,然后编译。   3、make install是用来安装的,它也从Makefile中读取指令,安装到指定的位置。   注意:AUTOMAKE和AUTOCONF是非常有用的用来发布C程序的东西。 二、详细解释   1、configure命令   这一步一般用来生成 Makefile,为下一步的编译做准备,你可以通过在 configure 后加上参数来对安装进行控制,比如代码:./configure –prefix=/usr 意思是将该软件安装在 /usr 下面,执行文件就会安装在 /usr/bin (而不是默认的 /usr/local/bin),资源文件就会安装在 /usr/share(而不是默认的/usr/local/share)。同时一些软件的配置文件你可以通过指定 –sys-config= 参数进行设定。有一些软件还可以加上 –with、–enable、–without、–disable 等等参数对编译加以控制,你可以通过允许 ./configure –help

What is the best way to set compilation flags for individual source files using GCC and autotools?

做~自己de王妃 提交于 2019-12-10 07:28:03
问题 I need to disable optimization flag for a individual file using autotools. What is the best way to do it? 回答1: Do you mean an individual source file or an individual executable? To disable optimization for an executable is simple: bin_PROGRAMS = myprog myprog_SOURCES = foo.c bar.c myprog_CFLAGS = -O0 If you mean that you want to disable the optimization for a single source file temporarily , say for debugging purposes, you can just remake that file at the prompt: (example from the automake

Autotools library and object file output control

大兔子大兔子 提交于 2019-12-09 17:30:08
问题 My goal is to have all object files built in a .objs directory instead of the root of the Makefile, and to have the binaries (and libraries) copied into the project's bin/ directory. But I have been unable to find any resources to explain how to do this. How would I go about doing this? Here is my configure.ac and src/Makefile.am - I have similar Makefile.am files for two shared libraries that are referenced. They compile, and after copying them to the bin/ directory work as they should. I'm

Autoconf check for program and fail if not found

一曲冷凌霜 提交于 2019-12-09 14:21:45
问题 I'm creating a project and using GNU Autoconf tools to do the configuring and making. I've set up all my library checking and header file checking but can't seem to figure out how to check if an executable exists on the system and fail if it doesn't exist. I've tried: AC_CHECK_PROG(TEST,testprogram,testprogram,AC_MSG_ERROR(Cannot find testprogram.)) When I configure it runs and outputs: Checking for testprogram... find: `testprogram. 15426 5 ': No such file or directory but does not fail. 回答1

Portably include GLib headers in autoconf/automake

不羁岁月 提交于 2019-12-09 11:22:38
问题 I need to include the GLib headers for a project that is built with an autoconf-based system for portability. How can I safely import the GLib headers in a portable manner? I know about pkg-config, but that is not entirely portable (since some systems don't have it and I would prefer to only rely on autoconf for configuration). 回答1: The GLib 2.22 INSTALL file states that pkg-config is a requirement for installing this library. I am not being GLib (pun intended!); statement of this requirement

autoconf complains “C compiler cannot create executables” on Linux Mint

元气小坏坏 提交于 2019-12-09 06:58:30
问题 I am trying to do an installations of Linux Mint 16 'petra' on both 32 and 64 bit installs. I have no internet connection on my pc so have to install all additional software manually. Being a developer I thought I would attempt to install codeblocks with wxWidgets so followed the instructions found at: http://wiki.codeblocks.org/index.php?ti In order to perform the installation it appeared that i would need pre-requistites so following instructions found on https://developer.gnome.org/gtk3