You are not logged in.

#1 2014-03-14 23:17:04

rh995
Member
Registered: 2012-03-09
Posts: 76

Automake with a separate include directory (also curses)

I am building a program, and I am trying (unsuccessfully) to add autotools support to it, for easier distribution.  However, because I chose to have a separate include/ directory for my header files, I am encountering innumerable difficulties.  I have a top level Makefile.am, and another in src/, and this one should be the one that does the including, I think.  Even if I specify the header files in sources, they are not included.  I do know about AM_CPPFLAGS, but somehow, this seems like the wrong thing to do.

I guess what I'm really wondering is there any way to include header files from a separate directory without using AM_CPPFLAGS="$AM_CPPFLAGS -I../include", which seems like it won't include the sources in the distribution, according to what I have read.

A separate problem I am having is that I am not able to include libraries with my program.  It depends on ncurses, so how do I specify the -lncurses option?  Again with AM_CPPFLAGS?  I would rather not.

Offline

#2 2014-03-15 12:27:00

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Automake with a separate include directory (also curses)

Maybe my old post will help, or at least move you along a bit: https://bbs.archlinux.org/viewtopic.php … 2#p1255512

Specifically, see my "configure.ac" file, the section for "AC_CHECK_LIB" is used to include a library (like ncurses).

Offline

Board footer

Powered by FluxBB