0

次のようなオプションを使用して、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 ファイルに追加する必要がありますが、方法がわかりません。

4

1 に答える 1

0

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
 ])
于 2012-05-08T14:08:12.273 に答える