aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--src/Makefile.am5
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index f45d081..d12f2b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,9 +74,8 @@ AC_CHECK_LIB([m], [ceilf])
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
-AC_CHECK_HEADERS([bsd/sys/queue.h], , [
- CFLAGS="$CFLAGS -Icompat"
-])
+AC_CHECK_HEADERS([bsd/sys/queue.h])
+AM_CONDITIONAL(NEED_COMPAT, [test $ac_cv_header_bsd_sys_queue_h = no])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
diff --git a/src/Makefile.am b/src/Makefile.am
index eaa9dda..4e57b90 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,9 @@
AM_CXXFLAGS = -Wall
+AM_CPPFLAGS =
+
+if NEED_COMPAT
+AM_CPPFLAGS += -I@top_srcdir@/compat
+endif
bin_PROGRAMS = osc-graphics
osc_graphics_SOURCES = main.cpp osc_graphics.h \