Chinaunix首页 | 论坛 | 博客
  • 博客访问: 454855
  • 博文数量: 89
  • 博客积分: 1126
  • 博客等级: 少尉
  • 技术积分: 1432
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-11 23:37
文章分类

全部博文(89)

文章存档

2016年(6)

2015年(2)

2014年(1)

2013年(3)

2012年(23)

2011年(54)

分类: LINUX

2011-04-24 11:37:45

最近移植一些第三方库,学习了configure配置文件生成Makefile。configure文件一般由autoMake工具生成,但是一些软件包的configure文件并不是由automake生成,需要察看帮助说明。

  1. root@ubuntu:/work/SKIA/3rdparty/jpeg-8b# ./configure --help
  2. `configure' configures libjpeg 8.0.2 to adapt to many kinds of systems.

  3. Usage: ./configure [OPTION]... [VAR=VALUE]...

  4. To assign environment variables (e.g., CC, CFLAGS...), specify them as
  5. VAR=VALUE. See below for descriptions of some of the useful variables.

  6. Defaults for the options are specified in brackets.

  7. Configuration:
  8.   -h, --help display this help and exit
  9.       --help=short display options specific to this package
  10.       --help=recursive display the short help of all the included packages
  11.   -V, --version display version information and exit
  12.   -q, --quiet, --silent do not print `checking...' messages
  13.       --cache-file=FILE cache test results in FILE [disabled]
  14.   -C, --config-cache alias for `--cache-file=config.cache'
  15.   -n, --no-create do not create output files
  16.       --srcdir=DIR find the sources in DIR [configure dir or `..']

  17. Installation directories:
  18.   --prefix=PREFIX install architecture-independent files in PREFIX
  19.                           [/usr/local]
  20.   --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  21.                           [PREFIX]

  22. By default, `make install' will install all the files in
  23. `/usr/local/bin', `/usr/local/lib' etc. You can specify
  24. an installation prefix other than `/usr/local' using `--prefix',
  25. for instance `--prefix=$HOME'.

  26. For better control, use the options below.

  27. Fine tuning of the installation directories:
  28.   --bindir=DIR user executables [EPREFIX/bin]
  29.   --sbindir=DIR system admin executables [EPREFIX/sbin]
  30.   --libexecdir=DIR program executables [EPREFIX/libexec]
  31.   --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  32.   --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  33.   --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  34.   --libdir=DIR object code libraries [EPREFIX/lib]
  35.   --includedir=DIR C header files [PREFIX/include]
  36.   --oldincludedir=DIR C header files for non-gcc [/usr/include]
  37.   --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  38.   --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  39.   --infodir=DIR info documentation [DATAROOTDIR/info]
  40.   --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  41.   --mandir=DIR man documentation [DATAROOTDIR/man]
  42.   --docdir=DIR documentation root [DATAROOTDIR/doc/libjpeg]
  43.   --htmldir=DIR html documentation [DOCDIR]
  44.   --dvidir=DIR dvi documentation [DOCDIR]
  45.   --pdfdir=DIR pdf documentation [DOCDIR]
  46.   --psdir=DIR ps documentation [DOCDIR]

  47. Program names:
  48.   --program-prefix=PREFIX prepend PREFIX to installed program names
  49.   --program-suffix=SUFFIX append SUFFIX to installed program names
  50.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names

  51. System types:
  52.   --build=BUILD configure for building on BUILD [guessed]
  53.   --host=HOST cross-compile to build programs to run on HOST [BUILD]
  54.   --target=TARGET configure for building compilers for TARGET [HOST]

  55. Optional Features:
  56.   --disable-option-checking ignore unrecognized --enable/--with options
  57.   --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  58.   --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  59.   --enable-silent-rules less verbose build output (undo: `make V=1')
  60.   --disable-silent-rules verbose build output (undo: `make V=0')
  61.   --disable-dependency-tracking speeds up one-time build
  62.   --enable-dependency-tracking do not reject slow dependency extractors
  63.   --enable-maintainer-mode enable make rules and dependencies not useful
  64.              (and sometimes confusing) to the casual installer
  65.   --enable-ld-version-script
  66.                           enable linker version script (default is enabled
  67.                           when possible)
  68.   --enable-shared[=PKGS] build shared libraries [default=yes]
  69.   --enable-static[=PKGS] build static libraries [default=yes]
  70.   --enable-fast-install[=PKGS]
  71.                           optimize for fast installation [default=yes]
  72.   --disable-libtool-lock avoid locking (might break parallel builds)
  73.   --enable-maxmem=N enable use of temp files, set max mem usage to N MB

  74. Optional Packages:
  75.   --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  76.   --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  77.   --with-pic try to use only PIC/non-PIC objects [default=use
  78.                           both]
  79.   --with-gnu-ld assume the C compiler uses GNU ld [default=no]

  80. Some influential environment variables:
  81.   CC C compiler command
  82.   CFLAGS C compiler flags
  83.   LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  84.               nonstandard directory <lib dir>
  85.   LIBS libraries to pass to the linker, e.g. -l<library>
  86.   CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  87.               you have headers in a nonstandard directory <include dir>
  88.   CPP C preprocessor

  89. Use these variables to override the choices made by `configure' or to help
  90. it to find libraries and programs with nonstandard names/locations.

  91. 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

阅读(3095) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~