From 839e535f731e65ae597ec85bb0ed02419bcda680 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Thu, 27 Feb 2014 01:06:44 +0100 Subject: [PATCH] Add /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS This allows to avoid extra options for BSDs and strangle Linux systems, where some libraries may be installed under "/usr/local" prefix. --- configure | 4 ++++ configure.ac | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure b/configure index a8fbb6a..0a54e9f 100755 --- a/configure +++ b/configure @@ -3171,6 +3171,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# BSD locations for headers and libraries from packages, Linux locations for self-compiled stuff. +CPPFLAGS="$CPPFLAGS -I/usr/local/include" +LDFLAGS="$LDFLAGS -L/usr/local/lib" + # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 diff --git a/configure.ac b/configure.ac index 61465b0..6b0f5d7 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,10 @@ m4_include([ax_lua.m4]) # Checks for programs. AC_PROG_CC +# BSD locations for headers and libraries from packages, Linux locations for self-compiled stuff. +CPPFLAGS="$CPPFLAGS -I/usr/local/include" +LDFLAGS="$LDFLAGS -L/usr/local/lib" + # Checks for libraries. AC_CHECK_LIB([m], [sqrt]) AC_SEARCH_LIBS([clock_gettime], [rt])