From 6320bb6219061713a6f18073342661662bc8b69a Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 16 Jan 2020 14:59:33 -0500 Subject: [PATCH] configure: Allow changing default search paths This changes the behavior of the --with-{inc,lib}s-from arguments to replace the default paths instead of adding to them. This is required when cross-compiling in a sysroot, since the default paths will include files from the host system which can have an incompatible architecture. --- configure.ac | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index fe0ba511..208e8acd 100644 --- a/configure.ac +++ b/configure.ac @@ -284,18 +284,14 @@ _bindir=`eval echo $_bindir` _libdir=`eval echo $libdir` _libdir=`eval echo $_libdir` -lib_search_path='-L${libdir}' - -inc_search_path='-I${includedir}' - dnl =============================================== dnl Specify paths to look for libraries and headers dnl =============================================== AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]), - [lib_search_path="$withval $lib_search_path"]) + [lib_search_path="$withval"], [lib_search_path='-L${libdir}']) AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]), - [inc_search_path="$withval $inc_search_path"]) + [inc_search_path="$withval"], [inc_search_path='-I${includedir}']) dnl Features Configuration