最近移植一些第三方库,学习了configure配置文件生成Makefile。configure文件一般由autoMake工具生成,但是一些软件包的configure文件并不是由automake生成,需要察看帮助说明。
- root@ubuntu:/work/SKIA/3rdparty/jpeg-8b# ./configure --help
- `configure' configures libjpeg 8.0.2 to adapt to many kinds of systems.
-
- Usage: ./configure [OPTION]... [VAR=VALUE]...
-
- To assign environment variables (e.g., CC, CFLAGS...), specify them as
- VAR=VALUE. See below for descriptions of some of the useful variables.
-
- Defaults for the options are specified in brackets.
-
- Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print `checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for `--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or `..']
-
- Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [/usr/local]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
- By default, `make install' will install all the files in
- `/usr/local/bin', `/usr/local/lib' etc. You can specify
- an installation prefix other than `/usr/local' using `--prefix',
- for instance `--prefix=$HOME'.
-
- For better control, use the options below.
-
- Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/libjpeg]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-
- Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
- System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-
- Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --enable-ld-version-script
- enable linker version script (default is enabled
- when possible)
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --enable-maxmem=N enable use of temp files, set max mem usage to N MB
-
- Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-
- Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
- Use these variables to override the choices made by `configure' or to help
- it to find libraries and programs with nonstandard names/locations.
-
- Report bugs to the package provider.
下面来自网络:
--cache-file=FILE
'configure'会在你的系统上测试存在的特性(或者bug!).为了加速随后进行的配置,测试的结果会存储在一个cache file里.当configure一个每个子树里都有'configure'脚本的复杂的源码树时,一个很好的cache file的存在会有很大帮助.
--help
输出帮助信息.即使是有经验的用户也偶尔需要使用使用'--help'选项,因为一个复杂的项目会包含附加的选项.例如,GCC包里的'configure'脚本就包含了允许你控制是否生成和在GCC中使用GNU汇编器的选项.
--no-create
'configure'中的一个主要函数会制作输出文件.此选项阻止'configure'生成这个文件.你可以认为这是一种演习(dry run),尽管缓存(cache)仍然被改写了.
--quiet/--silent
当'configure'进行他的测试时,会输出简要的信息来告诉用户正在作什么.这样作是因为'configure'可能会比较慢,没有这种输出的话 用户将会被扔在一旁疑惑正在发生什么.使用这两个选项中的任何一个都会把你扔到一旁.(译注:这两句话比较有意思,原文是这样的:If there was no such output, the user would be left wondering what is happening. By using this option, you too can be left wondering!)
--version
打印用来产生'configure'脚本的Autoconf的版本号.
--prefix=PEWFIX
'--prefix'是最常用的选项.制作出的'Makefile'会查看随此选项传递的参数,当一个包在安装时可以彻底的重新安置他的结构独立部分. 举一个例子,当安装一个包,例如说Emacs,下面的命令将会使Emacs Lisp file被安装到"/opt/gnu/share": $ ./configure --prefix=/opt/gnu
--exec-prefix=EPREFIX
与'--prefix'选项类似,但是他是用来设置结构倚赖的文件的安装位置.编译好的'emacs'二进制文件就是这样一个问件.如果没有设置这个选项的话,默认使用的选项值将被设为和'--prefix'选项值一样.
--bindir=DIR
指定二进制文件的安装位置.这里的二进制文件定义为可以被用户直接执行的程序.
--sbindir=DIR
指定超级二进制文件的安装位置.这是一些通常只能由超级用户执行的程序.
--libexecdir=DIR
指定可执行支持文件的安装位置.与二进制文件相反,这些文件从来不直接由用户执行,但是可以被上面提到的二进制文件所执行.
--datadir=DIR
指定通用数据文件的安装位置.
--sysconfdir=DIR
指定在单个机器上使用的只读数据的安装位置.
--sharedstatedir=DIR
指定可以在多个机器上共享的可写数据的安装位置.
--localstatedir=DIR
指定只能单机使用的可写数据的安装位置.
--libdir=DIR
指定库文件的安装位置.
--includedir=DIR
指定C头文件的安装位置.其他语言如C++的头文件也可以使用此选项.
--oldincludedir=DIR
指定为除GCC外编译器安装的C头文件的安装位置.
--infodir=DIR
指定Info格式文档的安装位置.Info是被GNU工程所使用的文档格式.
--mandir=DIR
指定手册页的安装位置.
--srcdir=DIR
这个选项对安装没有作用.他会告诉'configure'源码的位置.一般来说不用指定此选项,因为'configure'脚本一般和源码文件在同一个目录下.
--program-prefix=PREFIX
指定将被加到所安装程序的名字上的前缀.例如,使用'--program-prefix=g'来configure一个名为'tar'的程序将会使安装的程序被命名为'gtar'.当和其他的安装选项一起使用时,这个选项只有当他被XXXX文件使用时才会工作.
--program-suffix=SUFFIX
指定将被加到所安装程序的名字上的后缀.
--program-transform-name=PROGRAM
这里的PROGRAM是一个sed脚本.当一个程序被安装时,他的名字将经过`sed -e PROGRAM'来产生安装的名字.
--build=BUILD
指定软件包安装的系统平台.如果没有指定,默认值将是'--host'选项的值.
--host=HOST
指定软件运行的系统平台.如果没有指定,将会运行`config.guess'来检测.
--target=GARGET
指定软件面向(target to)的系统平台.这主要在程序语言工具如编译器和汇编器上下文中起作用.如果没有指定,默认将使用'--host'选项的值.
--disable-FEATURE
一些软件包可以选择这个选项来提供为大型选项的编译时配置,例如使用Kerberos认证系统或者一个实验性的编译器最优配置.如果默认是提供这些特 性,可以使用'--disable-FEATURE'来禁用它,这里'FEATURE'是特性的名字.例如: $ ./configure --disable-gui
-enable-FEATURE[=ARG]
相反的,一些软件包可能提供了一些默认被禁止的特性,可以使用'--enable-FEATURE'来起用它.这里'FEATURE'是特性的名字.一 个特性可能会接受一个可选的参数.例如: $ ./configure --enable-buffers=128 `--enable-FEATURE=no'与上面提到的'--disable-FEATURE'是同义的.
--with-PACKAGE[=ARG]
在自由软件社区里,有使用已有软件包和库的优秀传统.当用'configure'来配置一个源码树时,可以提供其他已经安装的软件包的信息.例如, 倚赖于Tcl和Tk的BLT器件工具包.要配置BLT,可能需要给'configure'提供一些关于我们把Tcl和Tk装的何处的信息: $ ./configure --with-tcl=/usr/local --with-tk=/usr/local '--with-PACKAGE=no'与下面将提到的'--without-PACKAGE'是同义的.
--without-PACKAGE
有时候你可能不想让你的软件包与系统已有的软件包交互.例如,你可能不想让你的新编译器使用GNU ld.通过使用这个选项可以做到这一点: $ ./configure --without-gnu-ld
--x-includes=DIR
这个选项是'--with-PACKAGE'选项的一个特例.在Autoconf最初被开发出来时,流行使用'configure'来作为 Imake的一个变通方法来制作运行于X的软件.'--x-includes'选项提供了向'configure'脚本指明包含X11头文件的目录的方 法.
--x-libraries=DIR
阅读(799) | 评论(0) | 转发(0) |
0
上一篇:shell学习
下一篇:vim中如何用鼠标跨窗口粘贴复制。
相关热门文章
- linux 常见服务端口
- xmanager 2.0 for linux配置
- 【ROOTFS搭建】busybox的httpd...
- openwrt中luci学习笔记
- 什么是shell
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...