autoconf

Linux Makefile自动生成--config.h

倖福魔咒の 提交于 2020-03-02 03:48:01
Linux Makefile自动生成--总体流程 Linux Makefile自动生成--实例 Linux Makefile自动生成--config.h config.h主要用于代码移植,产生可移植代码。 有些函数只适用于特定的系统,并不通用,如gettimeofday。只能在特定的系统上使用,这样就不能移植了。 可以在可以使用的系统上使用gettimeofday,而不能使用的系统上使用另一种方式。 1. 代码如下: #include <stdio.h> #include <sys/time.h> #include <time.h> #include "config.h" double get_epoch() { double sec; #ifdef HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, NULL); sec = tv.tv_sec; sec += tv.tv_usec / 1000000.0; #else sec = time(NULL); #endif return sec; } int main(int argc, char* argv[]) { printf("%f\n", get_epoch()); return 0; } 上述config.h为生成的文件。通过#ifdef来采用某些代码。 2.

nginx-1.13.0安装说明.txt

[亡魂溺海] 提交于 2020-02-27 18:47:51
1.上传nginx-1.13.0.tar.gz到/tmp路径下(因为我设置权限了,所以先放到tmp路径下,然后再复制到/usr/local路径下) 2.进入/usr/local/路径下,复制按照文件到此路径下 cp /tmp/nginx-1.13.0.tar.gz ./ 3.解压 tar -zxvf nginx-1.13.0.tar.gz 4.进入 nginx-1.13.0 输入 cd nginx-1.13.0 5.安装各种依赖 yum install gd-devel yum install gcc-c++ yum -y install gcc gcc-c++ autoconf automake make yum -y install zlib zlib-developenssl openssl-devel pcre pcre-devel yum install libgd2-devel yum install libpcre-devel yum install libcurl-devel yum install gd-devel 6.配置过后在当前使用过./configure的目录下使用命令(带了https和图片处理插件,真实IP插件) ./configure --prefix=/usr/local/nginx --with-http_stub_status_module -

centos 运行Django项目,sqlite报错:SQLite 3.8.3 or later is required (found 3.7.17)

笑着哭i 提交于 2020-02-25 16:15:39
centos 运行Django项目,sqlite报错:SQLite 3.8.3 or later is required (found 3.7.17) 一、解决方法1:给django降级 Django降级 # 卸载django: pip uninstall django 安装低版本: pip install django==2.1.8 一、解决方法2:升级SQLite 1.查看系统的sqlte3的版本 # sqlite3 --version Centos系统自带的sqlite3版本偏低,在上面的错误提示中要求需要SQLite 3.8.3 or later,那么就需要去升级 SQlite 的版本了。 2.Centos7安装最新的sqlite3并设置更新python库版本 # #更新SQLite 3 #获取源代码(在主目录中运行) [root@djangoServer ~]# cd ~ [root@djangoServer ~]# wget https://www.sqlite.org/2019/sqlite-autoconf-3270200.tar.gz [root@djangoServer ~]# tar -zxvf sqlite-autoconf-3270200.tar.gz #构建并安装 [root@djangoServer ~]# cd sqlite-autoconf

Where to put helper-scripts with GNU autoconf/automake?

只愿长相守 提交于 2020-01-21 08:58:32
问题 I'm working on a project that will be distributed with GNU autoconf/automake, and I have a set of bash scripts which call awk scripts. I would like the bash scripts to end up in the $PATH, but not the awk scripts. How should I insert these into the project? Should they be put in with other binaries? Also, is there a way to determine the final location of the file after installation? I presume that /usr/local/bin isn't always where the executables end up... 回答1: Add something like this to

Compile gcc on amd64, for running on i686, and target is mips

孤者浪人 提交于 2020-01-17 00:46:29
问题 I want to compile gcc and binutils for MIPS target. I am working on 64-bit (amd64) machine. And want to obtain binary which is able to run on i686 (not amd64) arhitecture? How should I condigure and build gcc? If I am adding --host=i686-linux-gnu to ./configure script, then it complains on absence of i686-xxxx tools. If I am adding CFLAGS=-m32, then I can build binutils, but not gcc, because of following error: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti

Compile gcc on amd64, for running on i686, and target is mips

落爺英雄遲暮 提交于 2020-01-17 00:43:06
问题 I want to compile gcc and binutils for MIPS target. I am working on 64-bit (amd64) machine. And want to obtain binary which is able to run on i686 (not amd64) arhitecture? How should I condigure and build gcc? If I am adding --host=i686-linux-gnu to ./configure script, then it complains on absence of i686-xxxx tools. If I am adding CFLAGS=-m32, then I can build binutils, but not gcc, because of following error: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti

Makefile.am: How to use curl-config and xml2-config in configure.ac?

纵然是瞬间 提交于 2020-01-13 15:00:10
问题 I want to set include and lib paths given an existing Makefile (below) in configure.ac. But I don't know how can I use $(shell XYZ-config --libs) command in configure.ac. Could anyone help please? Thanks!! # -------------------------------------------------------------------------- # Acquire configuration information for libraries that libs3 depends upon ifndef CURL_LIBS CURL_LIBS := $(shell curl-config --libs) endif ifndef CURL_CFLAGS CURL_CFLAGS := $(shell curl-config --cflags) endif ifndef

Can you “un-precious” a configure variable (inverse of AC_ARG_VAR)?

谁说胖子不能爱 提交于 2020-01-07 03:04:49
问题 The AC_ARG_VAR macro declares a variable precious which has certain cache-checking implications. Some configure macros declare certain variables precious, and I would like to undo that. For example, AC_PROG_CC will declare CFLAGS as precious, and I need to make it non-precious. Motivation Doing this would allow me to modify CFLAGS in a top-level configure and allow sub-package configures to execute without clashing with cached CFLAGS value. See this question for more background. 回答1: AC_DEFUN

how to add a new files to existing makefile project

瘦欲@ 提交于 2020-01-07 02:55:27
问题 I am trying to add some functionality to existing makefile project. I wrote some .c and .h files. After some googling time I found that Makefile.am should be modified and run autoreconf will do what I need. Can some one please explain how to do this exactly? Thank you. FYI I am trying to compile http://sipe.sourceforge.net/ 回答1: You need to modify the Makefile.am found under the directory where you've kept you .c and .h files. Take a look at this file if you've .c file under telepathy

why i failed to build autoconf with autoconf2.6x, its version is newer than 2.6 anyhow

狂风中的少年 提交于 2020-01-04 06:39:08
问题 my system is centos based. the reason i try to build autoconf is that someone told me i can try to build it in order to solve the other problem, you may find the motivation with this link why autogen.sh failed even with the correct autoconf? [mirror@home auto]$ cd autoconf/ [mirror@home autoconf]$ ls AUTHORS cfg.mk ChangeLog.3 COPYINGv3 lib man README-hacking bin ChangeLog.0 configure.ac doc m4 NEWS tests BUGS ChangeLog.1 COPYING GNUmakefile maint.mk README THANKS build-aux ChangeLog.2