--- a/configure.in +++ b/configure.in @@ -37,13 +37,9 @@ AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode Enables debug symbols and disables optimizations [default=no]], [ enable_maintainer_mode=yes ]) -if test "$enable_maintainer_mode" = "yes"; then - CFLAGS="-O0 -g3 --pipe -Wall" - LDFLAGS="-lncurses" -else - CFLAGS="$CFLAGS -pipe -Wall" - LDFLAGS="-s -lncurses" -fi +CXXFLAGS="$CXXFLAGS -Wall" + +PKG_CHECK_MODULES([NCURSES], [ncurses]) AC_OUTPUT(Makefile) #AC_CONFIG_FILES([Makefile]) --- a/Makefile.in +++ b/Makefile.in @@ -6,24 +6,30 @@ mandir= @mandir@ +CC = @CC@ CXX = @CXX@ CFLAGS = @CFLAGS@ +CXXFLAGS = @CXXFLAGS@ + LDFLAGS = @LDFLAGS@ +CPPFLAGS += @NCURSES_CFLAGS@ +LIBS = @NCURSES_LIBS@ + #LDLIBS = -levent ### Add to taste: -# CFLAGS = -g +# CXXFLAGS = -g # LDFLAGS = -g -# CFLAGS += -DPROC_DIR=\"extra2/\" +# CXXFLAGS += -DPROC_DIR=\"extra2/\" -# CFLAGS += -DDEBUG +# CXXFLAGS += -DDEBUG # LDLIBS += -ldmalloc -# CFLAGS += -pg +# CXXFLAGS += -pg # LDFLAGS = -pg ### End of configurable options. @@ -44,10 +50,10 @@ cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \ lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \ Makefile - $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS) #procinfo.o: procinfo.cpp procinfo.h -# $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o +# $(CXX) $(CXXFLAGS) procinfo.cpp -o procinfo.o install: procinfo procinfo.8 -mkdir -p $(DESTDIR)/$(prefix)/bin