Constification of parse_linespec and fallout:
[deliverable/binutils-gdb.git] / gold / configure.ac
index 727078d428754b0fd7f761b4b23e10990dd8cabe..e3e10b3dbd1690d898774db04558cc43a924e295 100644 (file)
@@ -1,4 +1,22 @@
 dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl   Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+dnl   Free Software Foundation, Inc.
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3.  If not see
+dnl <http://www.gnu.org/licenses/>.
+dnl
 
 AC_PREREQ(2.59)
 
@@ -51,32 +69,20 @@ dnl "install_as_default" is true if the linker to be installed as the
 dnl default linker, ld.
 dnl "installed_linker" is the installed gold linker name.
 
-default_ld=
-AC_ARG_ENABLE(ld,
-[[  --enable-ld[=ARG]     build ld [ARG={default,yes,no}]]],
-[case "${enableval}" in
-  default)
-    default_ld=ld.bfd
-    ;;
-esac])
-
+installed_linker=ld.gold
 AC_ARG_ENABLE(gold,
 [[  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]]],
 [case "${enableval}" in
- yes|default)
-   if test x${default_ld} = x; then
+ default)
+   install_as_default=yes
+   ;;
+ yes)
+   if test x${enable_ld} = xno; then
      install_as_default=yes
    fi
-   installed_linker=ld.gold
-   ;;
- no)
-   ;;
- *)
-   AC_MSG_ERROR([invalid --enable-gold argument])
    ;;
  esac],
-[install_as_default=no
- installed_linker=ld.gold])
+[install_as_default=no])
 AC_SUBST(install_as_default)
 AC_SUBST(installed_linker)
 
@@ -200,6 +206,8 @@ for targ in $target $canon_targets; do
        AM_CONDITIONAL(DEFAULT_TARGET_SPARC, test "$targ_obj" = "sparc")
        AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$targ_obj" = "x86_64")
        AM_CONDITIONAL(DEFAULT_TARGET_TILEGX, test "$targ_obj" = "tilegx")
+       DEFAULT_TARGET=${targ_obj}
+       AC_SUBST(DEFAULT_TARGET)
       fi
     fi
   fi
@@ -500,6 +508,13 @@ AC_LANG_PUSH(C++)
 AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map)
 AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
 AC_CHECK_HEADERS(byteswap.h)
+
+dnl When plugins enabled dynamic loader interface is required. Check headers
+dnl which may provide this interface. In case of dlfcn.h add libdl to link.
+AC_CHECK_HEADERS(windows.h)
+AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""])
+AC_SUBST(DLOPEN_LIBS)
+
 AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)
 AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem])
 
@@ -529,7 +544,7 @@ std::tr1::hash<off_t> h;
 ],
 [gold_cv_hash_off_t=yes],
 [gold_cv_hash_off_t=no])
-CXXFLAGS=$CFLAGS_hold])
+CXXFLAGS=$CXXFLAGS_hold])
 if test "$gold_cv_hash_off_t" = "yes"; then
    AC_DEFINE(HAVE_TR1_HASH_OFF_T, 1,
             [Define if std::tr1::hash<off_t> is usable])
This page took 0.023868 seconds and 4 git commands to generate.