From 3f3cddf146bb20f8222ce6ed8c8ffc6ee9c59124 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Nov 2011 04:32:01 +0000 Subject: * configure.ac: Add --with-lib-path option. Define LIB_PATH and NATIVE_LINKER. * Makefile.am (AM_CPPFLAGS): Define TOOLLIBDIR. * options.cc (General_options::finalize): Use library search path from configure script if specified. If not native and no sysroot, only search TOOLLIBDIR. * options.h (Search_directory::Search_directory): Change name to const std::string&. (General_options::add_to_library_path_with_sysroot): Change arg to const std::string&. * configure, Makefile.in, config.in: Rebuild. --- gold/configure | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gold/configure') diff --git a/gold/configure b/gold/configure index 708f540..3dddec6 100755 --- a/gold/configure +++ b/gold/configure @@ -775,6 +775,7 @@ enable_gold enable_threads enable_plugins enable_targets +with_lib_path enable_dependency_tracking enable_nls enable_werror @@ -1435,6 +1436,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-sysroot=DIR search for usr/lib et al within DIR + --with-lib-path=dir1:dir2... set default LIB_PATH --with-gold-ldflags=FLAGS additional link flags for gold --with-gold-ldadd=LIBS additional libraries for gold @@ -3535,6 +3537,29 @@ cat >>confdefs.h <<_ACEOF _ACEOF + +# Check whether --with-lib-path was given. +if test "${with_lib_path+set}" = set; then : + withval=$with_lib_path; case "$withval" in + yes) LIB_PATH='"/lib:/usr/lib"' ;; + no) LIB_PATH='""' ;; + *) LIB_PATH='"'"$withval"'"' ;; + esac +else + LIB_PATH='"::DEFAULT::"' +fi + + +cat >>confdefs.h <<_ACEOF +#define LIB_PATH $LIB_PATH +_ACEOF + +if test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias"; then + +$as_echo "#define NATIVE_LINKER 1" >>confdefs.h + +fi + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. set dummy ${ac_tool_prefix}nm; ac_word=$2 -- cgit v1.1