diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-28 21:13:08 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-28 21:13:08 +0200 |
commit | 3352e561e2ad4be506c829711a3ef71a18c0c859 (patch) | |
tree | 531d67e3b814b5afed6a39f741db0ef1379cb109 | |
parent | c9b45ab56674d97c56eb1c3cde4872a7e0f09984 (diff) | |
download | osc-graphics-3352e561e2ad4be506c829711a3ef71a18c0c859.tar.gz |
fixed using compat/ headers if BSD headers are not detected during configure
could have also used HAVE_BSD_SYS_QUEUE_H define but setting up the build system appropriately is cleaner
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/Makefile.am | 5 |
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 \ |