From a39ebdde055e1fe976ed91a08b7f49887c4e90c3 Mon Sep 17 00:00:00 2001 From: Klaus Goger Date: Tue, 10 Oct 2017 15:23:04 +0200 Subject: [PATCH] Set CPPFLAGS and LDFLAGS for OpenBSD On OpenBSD iconv headers were not found: from gcc-local(1) on OpenBSD gcc does not search under /usr/local for include files nor for libraries: as a system compiler, it only searches the system paths by default. Set CPPFLAGS and LDFLAGS based on os_host set by AC_CANONICAL_HOST. Signed-off-by: Klaus Goger --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index a696b0d..16f6f9c 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,16 @@ AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_LN_S +AC_CANONICAL_HOST +case "$host_os" in + openbsd*) + CPPFLAGS="$CFLAGS -I/usr/local/include" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + ;; + *) + ;; +esac + AC_SEARCH_LIBS(iconv, iconv) PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)