[英]configure and makefile
I want du extend my makefile.am with an option like this: 我想用以下选项扩展我的makefile.am:
This is the original part from the makefile.am: 这是makefile.am的原始部分:
OPTIONS := -Wl,-rpath,/usr/local/lib
if DEBUGGING
OPTIONS += -O0 -g3 -Wall
and this ist what I want to add 这就是我要添加的
OPTIONS := -Wl,-rpath,/usr/local/lib
if WIN
OPTIONS += -static-libgcc -static-libstdc++
if DEBUGGING
OPTIONS += -O0 -g3 -Wall
so that I can pass --enable-win to ./configure and the "if WIN" part will be used. 这样我就可以将--enable-win传递给./configure,并且将使用“ if WIN”部分。 As I can see I have to add this Option to the configure.ac file, but I don't know how. 如我所见,我必须将此选项添加到configure.ac文件,但是我不知道如何。
You should use macro AC_ARG_ENABLE in configure.ac file. 您应该在configure.ac文件中使用宏AC_ARG_ENABLE。
AC_ARG_ENABLE allows you to define another command line option. AC_ARG_ENABLE允许您定义另一个命令行选项。 Examples: 例子:
AC_ARG_ENABLE(debug-rwlock,
[ --enable-debug-rwlock Enable an RWLock that prints debug notices \
on the screen. This is a debugging feature which should not be \
usually enabled],
[ debug_rwlock=yes
])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.