0

I want du extend my makefile.am with an option like this:

This is the original part from the 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. As I can see I have to add this Option to the configure.ac file, but I don't know how.

MindlessMaik
  • 271
  • 2
  • 5
  • 16

1 Answers1

0

You should use macro AC_ARG_ENABLE in configure.ac file.

AC_ARG_ENABLE allows you to define another command line option. 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
 ])
wuliang
  • 749
  • 5
  • 7