Transferred from: http://blog.csdn.net/darennet/article/details/9003005
Configure's parameters are numerous and generally include the following
--srcdir=dir
This option has no effect on the installation. He will tell the location of the ' configure ' source. In general, this option is not specified because the ' configure ' script is generally in the same directory as the source file.
--program-prefix=prefix
Specifies the prefix that will be added to the name of the installed program. For example, using '--program-prefix=g ' to configure a program called ' tar ' will cause the installed program to be named ' Gtar '. When used with other installation options, this option is only available when he is ' Makefile.in ' files will not work until they are used.
--program-suffix=suffix
Specifies the suffix that will be added to the name of the installed program.
--program-transform-name=program
The program here is an SED script. When an app is installed, his name will go through ' sed-e programs ' to produce the installed name.
--build=build
Specifies the system platform on which the package is installed. If not specified, the default value will be the value of the '--host ' option.
--host=host
Specifies the system platform on which the software runs. If not specified, ' config.guess ' will be run to detect.
--target=garget
Specifies the system platform that the software targets (target to). This is primarily useful in programming language tools such as compilers and assembler contexts. If not specified, the default value of the '--host ' option is used.
--disable-feature
Some packages can choose this option to provide compile-time configuration for large options, such as using a Kerberos authentication system or an experimental compiler optimal configuration. If you provide these features by default, you can disable it by using '--disable-feature ', where ' FEATURE ' is the name of the attribute. For example:
$./configure--disable-gui
-enable-feature[=arg]
Conversely, some packages may provide some default prohibited features that can be used with '--enable-feature '. Here ' FEATURE ' is the name of the feature. An attribute may accept an optional parameter. For example:
$./configure--enable-buffers=128
The '--enable-feature=no ' is synonymous with the above mentioned '--disable-feature '.
--with-package[=arg]
In the free software community, there is an excellent tradition of using existing packages and libraries. When you configure a source tree with ' Configure ', you can provide information about other packages that have already been installed. For example, the BLT Device Toolkit, which relies on Tcl and TK. To configure BLT, you may need to give ' configure ' To provide some information about where we have installed Tcl and TK:
$./configure--with-tcl=/usr/local--with-tk=/usr/local
'--with-package=no ' is synonymous with the '--without-package ' that will be mentioned below.
--without-package
Sometimes you may not want your package to interact with packages that are already in the system. For example, you might not want your new compiler to use the GNU ld. You can do this by using this option:
$./configure--without-gnu-ld
--x-includes=dir
This option is a special case of the '--with-package ' option. When Autoconf was first developed, it was popular to use ' configure ' as a workaround for Imake to make software running on X. ' The--x-includes ' option provides a way to indicate to the ' configure ' script the directory containing the X11 header file.
--x-libraries=dir
Similarly, the '--x-libraries ' option provides a way to indicate to the ' configure ' script the directory containing the X11 library.
==========================
Red highlight this parameter is the focus of our cross-compiling application
Configure--host=arm-linux This is the cross-compilation option for ARM
Configure--host=mipsel-linux This is Mipsel's cross-compilation option.
============================
Turn to a blog that helps me
Always use configure when cross-compiling--host=arm-linux hey, but there are a lot of test programs in configure that are not allowed to run on host: Error:cannot Run test program while Cross compiling
Similar error, you can use Cachefile to solve this problem, but also thanks to absurd brother's article for my guidance.
I am the first step to solve this problem: record the wrong place such as: Checking abstract socket namespace ... configure:error:cannot run test program while cross compiling
Notice that the abstract socket namespace looks for an abstract socket in configure to see a structure like this
echo "$as _me: $LINENO: Checking abstract socket namespace" >&5
echo $ECHO _n "Checking abstract socket namespace ... $ECHO _c" >&6
if test "${ac_cv_have_abstract_sockets+set}" = set; Then
echo $ECHO _n "(cached) $ECHO _c" >&6
Where ac_cv_have_abstract_sockets is the variable we're looking for.
Using the Echo Ac_cv_have_abstract_sockets=yes>arm-linux.cache
And then
./configure--host=arm-linux--cache-file=arm-linux.cache
K, it's done.
Other than that:
1:fedora/sbin/init 3 Close the graphical interface
Some configure rely on Lib compilation and require Pkg-config support, which may
You need to set the PKG_CONFIG_PATH environment variable, which points to the xxx.pc of the dependent Lib
Description file, xxx.pc describes the characteristics of LIB, such as
Prefix=/develop/upnp/mips_libupnp
Exec_prefix=${prefix}
Libdir=${exec_prefix}/lib
Includedir=/develop/upnp/mips_libupnp/include
Name:libupnp
Description:linux SDK for UPnP Devices
version:1.6.3
IBS:-l${libdir}-lupnp-lthreadutil-lixml
Cflags:-pthread-i${includedir}/upnp
2:configure script to determine if Lib is a method of compiling C files, so sometimes cross-compiling
You can pass the test by modifying the Configure file, specifically by adding-I or-l to indicate the location.
Some target platforms are specified via--host,--host=mipsel-linux (LIBUPNP)
Some are specified by--cross-prefix=mipsel-linux---cross-compile (Ushare),
Specifically available through configure--HELP/-H view
Linux Configure parameter setting "Go" About cross-compilation