T
T
TriKrista2017-09-05 20:10:52
linux
TriKrista, 2017-09-05 20:10:52

How to add a key to configure and include additional packages?

How to correctly add a key to configure and include additional packages?
I do it something like this:
in the configure.ac file I add the following:

AC_ARG_WITH([foo],
  [AS_HELP_STRING([--with-foo],
  [enable foo (default=no)])],
  [enable_foo=$withval],
  [enable_foo=no])

#-----
AM_CONDITIONAL([ENABLE_FOO],[test x$enable_foo = xyes])

further, in MakeFile.am I include additional packages:
if ENABLE_FOO
include Makefile.foo.include
endif

but when building with the --with-foo option, additional packages are not added.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2017-09-05
@jcmvbkbc

I did exactly what you described ( https://gist.github.com/jcmvbkbc/f8d64eadb76b83ecf... ), everything works.
Questions:
- Makefile.foo.include is the same kind of file as Makefile.am, right?
- autoreconf performed after editing configure.ac and Makefile.am?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question