[英]configure and makefile
我想用以下選項擴展我的makefile.am:
這是makefile.am的原始部分:
OPTIONS := -Wl,-rpath,/usr/local/lib
if DEBUGGING
OPTIONS += -O0 -g3 -Wall
這就是我要添加的
OPTIONS := -Wl,-rpath,/usr/local/lib
if WIN
OPTIONS += -static-libgcc -static-libstdc++
if DEBUGGING
OPTIONS += -O0 -g3 -Wall
這樣我就可以將--enable-win傳遞給./configure,並且將使用“ if WIN”部分。 如我所見,我必須將此選項添加到configure.ac文件,但是我不知道如何。
您應該在configure.ac文件中使用宏AC_ARG_ENABLE。
AC_ARG_ENABLE允許您定義另一個命令行選項。 例子:
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.