Explicit locations: introduce explicit locations
[deliverable/binutils-gdb.git] / ld / configure.ac
index 043c597794f3396fd1efc266db6f4bea69c31f49..62aed09aed9bae99b98626e846ce6e5d0e6a916a 100644 (file)
@@ -31,6 +31,7 @@ AM_MAINTAINER_MODE
 
 AC_PROG_CC
 AC_PROG_CXX
+AC_PROG_GREP
 AC_GNU_SOURCE
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_INSTALL
@@ -195,6 +196,9 @@ AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid)
 AC_CHECK_FUNCS(open lseek close)
 AC_HEADER_DIRENT
 
+dnl AC_CHECK_HEADERS(sys/mman.h)
+AC_FUNC_MMAP
+
 AC_SEARCH_LIBS([dlopen], [dl])
 AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])
 
@@ -236,10 +240,6 @@ BFD_BINARY_FOPEN
 
 AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
 
-# Link in zlib if we can.  This is needed only for the bootstrap tests
-# right now, since those tests use libbfd, which depends on zlib.
-AM_ZLIB
-
 # When converting linker scripts into strings for use in emulation
 # files, use astring.sed if the compiler supports ANSI string
 # concatenation, or ostring.sed otherwise.  This is to support the
@@ -282,10 +282,16 @@ if test x${want64} = xfalse; then
   fi
 fi
 
+elf_list_options=FALSE
+elf_shlib_list_options=FALSE
+elf_plt_unwind_list_options=FALSE
 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
 do
   if test "$targ_alias" = "all"; then
     all_targets=true
+    elf_list_options=TRUE
+    elf_shlib_list_options=TRUE
+    elf_plt_unwind_list_options=TRUE
   else
     # Canonicalize the secondary target names.
     result=`$ac_config_sub $targ_alias 2>/dev/null`
@@ -318,6 +324,25 @@ do
          eval result=\$tdir_$i
          test -z "$result" && result=$targ_alias
          echo tdir_$i=$result >> tdirs
+         case "${i}" in
+         *elf*)
+           elf_list_options=TRUE
+           ;;
+         *)
+           if $GREP "TEMPLATE_NAME=elf32" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
+             elf_list_options=TRUE
+           fi
+           ;;
+         esac
+         if test "$elf_list_options" = "TRUE"; then
+           . ${srcdir}/emulparams/${i}.sh
+           if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
+             elf_shlib_list_options=TRUE
+           fi
+           if test x${PLT_UNWIND} = xyes; then
+             elf_plt_unwind_list_options=TRUE
+           fi
+         fi
          ;;
        esac
     done
@@ -347,6 +372,9 @@ do
   fi
 done
 
+AC_SUBST(elf_list_options)
+AC_SUBST(elf_shlib_list_options)
+AC_SUBST(elf_plt_unwind_list_options)
 AC_SUBST(EMUL)
 
 TDIRS=tdirs
This page took 0.058088 seconds and 4 git commands to generate.