I am having a bit of a problem with a project I am writing which uses ncurses: When I compile it manually it works perfectly fine(gcc -o binary main.c -lncurses), but I am trying to use autotools and I don't seem to get to pass the -lncurses flag. I didn't find much help either, apart from making it check if I have ncurses installed during the ./configure. When I do a make, it uses the command: "gcc -g -O2 -o Blood main.o", which fails.
This is so far my configure.ac
Code:
AC_PREREQ([2.69])
AC_INIT([Blood], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
#CPPFLAGS=lncurses
AC_CHECK_HEADERS(ncurses.h)
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
I experimented with both CPPFLAGS and CXXFLAGS as I understood from the man page, but none of those seem to serve to pass the required flag.... What am I missing?
Thank you in advance