data distribution simulator install

data distribution simulator install


基本安装


configure

  • 系统变量->用于为包中的每个目录创建makefile
  • 创建’.h’包含系统变量
  • shell script ‘config.status’->用于重新创建当前配置
  • 程序autoconf用configure.ac创建configure
  • 简单编译该包的方式
    • cd 源目录
    • ./configure
    • make
    • make check
    • make install
    • make clean: 用于移走二进制和目标文件
    • make distclean:用于移走’configure’创建的文件(因此可以为不同类型的计算机编译该软件包)
    • make maintainer-clean:用于包开发者,如果使用它,代表你可能不得不使用各种其他程序来重新生成发行版附带的文件

编译器和选择


  • ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
  • ./configure --help

为多个架构编译


make版本需要支持’VPATH’变量,例如GNU ‘make’

如果没有’VPATH’,则在为了一种架构安装包之后,为另一种架构重配置的时候,需要使用’make disclean’

安装名字


  • Make install:
    • `/usr/local/bin’
    • `/usr/local/include’
    • 可以通过’configure’选择’–prefix=PREFIX’来指定非’/usr/local’的安装前缀
    • 可以为特定于体系结构的文件和体系结构无关的文件指定单独的安装前缀。如果你将选项——exec-prefix=PREFIX 传递给configure ,该包使用PREFIX作为安装程序和库的前缀。文档和其他数据文件仍然使用常规前缀。
    • 此外,如果你使用不寻常的目录布局,你可以提供像——bindir=DIR 这样的选项来为特定类型的文件指定不同的值。运行configure——help 获取你可以设置的目录列表以及它们包含的文件类型。
    • 如果程序包支持它,你可以通过给configure 选项——program-prefix= prefix ——program-suffix= suffix ,使程序在其名称上安装一个额外的前缀或后缀。

可选特征


  • 针对X window system,configure如果不能自动找到X include和library文件,可以使用’configure’的--x-includes=DIR' and–x-libraries=DIR’来指定他们的位置

指定系统类型


  • 一些’configure’不能自动明白的特征,需要根据运行包的机器类型来确定
  • 如果’configure’输出it cannot guess the machine type,给定’–build=TYPE’, TYPE的值可以参考’configure.sub’
  • ‘–target=TYPE’: building compiler tools for cross-compiling
  • ‘–host=TYPE’: use a cross compiler

共享默认


  • 'configure.site’是一个site shell script,用于给定’configure’脚本共享的默认值

定义变量


没有在site shell脚本中定义的变量可以在传递给configure 的环境中设置。

一般方式是:

  • ‘configure’ command line, using `VAR=value’
    • ./configure CC=/usr/local2/bin/gcc(gcc被使用作为C编译器,除非在site shell script中被重覆盖)
    • /bin/bash ./configure CONFIG_SHELL=/bin/bash(这里的CONFIG_SHELL=/bin/bash 操作数会导致后续的配置相关脚本被/bin/bash 执行)

‘configure’ Invocation


`configure’ recognizes the following options to control how it operates.

`–help’

`-h’

​ Print a summary of the options to `configure’, and exit.

`–version’

`-V’

​ Print the version of Autoconf used to generate the `configure’

​ script, and exit.

`–cache-file=FILE’

​ Enable the cache: use and save the results of the tests in FILE,

​ traditionally config.cache'. FILE defaults to /dev/null’ to

​ disable caching.

`–config-cache’

`-C’

​ Alias for `–cache-file=config.cache’.

`–quiet’

`–silent’

`-q’

​ Do not print messages saying which checks are being made. To

​ suppress all normal output, redirect it to `/dev/null’ (any error

​ messages will still be shown).

`–srcdir=DIR’

​ Look for the package’s source code in directory DIR. Usually

​ `configure’ can determine that directory automatically.

`configure’ also accepts some other, not widely useful, options. Run

`configure --help’ for more details.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值