Skip to content

Instantly share code, notes, and snippets.

@ottomata
Created August 23, 2012 20:47
Show Gist options
  • Save ottomata/3441517 to your computer and use it in GitHub Desktop.
Save ottomata/3441517 to your computer and use it in GitHub Desktop.
diff --git a/Makefile.am b/Makefile.am
index 2e33aa9..85b31d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,9 +5,6 @@ bin_PROGRAMS = collector filter
collector_SOURCES = collector.c collector.h export.c export.h
filter_SOURCES = filter.c filter.h
-#AM_LDFLAGS=-ldb -lpthread
-
-
if DEBUG
CFLAGS = -g3 -O0 -Wall -pedantic
CPPFLAGS = -g3 -O0 -Wall -pedantic
@@ -17,16 +14,12 @@ else
endif
-CFLAGS = -g3 -O0 -Wall -pedantic -ldb -lpthread
-
-#AM_CFLAGS=-ldb -lpthread
-#AM_LDFLAGS=-ldb -lpthread
-
-
LIBS = $(DEPS_LIBS)
INCLUDES = $(DEPS_CFLAGS)
AM_CPPFLAGS = $(DEPS_CFLAGS)
+ACLOCAL_AMFLAGS = -I m4
+
all: collector filter
diff --git a/configure.ac b/configure.ac
index 1795f8d..61bf7f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,11 @@ AM_CONDITIONAL(DEBUG, test "$enable_debug" = yes)
AC_PROG_CC
AC_PROG_MAKE_SET
-
+# Need -ldb and -lpthread
+# NOTE: This is probably not the correct way to set CFLAGS,
+# but Diederik and Otto had a hard time getting AM_CFLAGS
+# to work correctly.
+CFLAGS="-ldb -lpthread"
# Checks for libraries.
# FIXME: Replace `main' with a function in `-ldb':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment