diff options
Diffstat (limited to 'ld/configure.in')
-rw-r--r-- | ld/configure.in | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ld/configure.in b/ld/configure.in index 12efccc..69c8355 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -30,6 +30,41 @@ AC_ARG_ENABLE(64-bit-bfd, *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; esac],[want64=false])dnl +AC_ARG_WITH(sysroot, +[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.], +[ + case ${with_sysroot} in + yes) AC_ERROR(with-sysroot must specify path) ;; + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' + use_sysroot=yes + + if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + case ${TARGET_SYSTEM_ROOT} in + ${test_prefix}*) + t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" + TARGET_SYSTEM_ROOT_DEFINE="$t" + ;; + esac +], [ + use_sysroot=no + TARGET_SYSTEM_ROOT= + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' +]) +AC_SUBST(use_sysroot) +AC_SUBST(TARGET_SYSTEM_ROOT) +AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_ARG_ENABLE(build-warnings, [ --enable-build-warnings enable build-time compiler warnings if gcc is used], |