OLD | NEW |
1 dnl Autoconf configure script for GDB, the GNU debugger. | 1 dnl Autoconf configure script for GDB, the GNU debugger. |
2 dnl Copyright (C) 1995-2012 Free Software Foundation, Inc. | 2 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. |
3 dnl | 3 dnl |
4 dnl This file is part of GDB. | 4 dnl This file is part of GDB. |
5 dnl | 5 dnl |
6 dnl This program is free software; you can redistribute it and/or modify | 6 dnl This program is free software; you can redistribute it and/or modify |
7 dnl it under the terms of the GNU General Public License as published by | 7 dnl it under the terms of the GNU General Public License as published by |
8 dnl the Free Software Foundation; either version 3 of the License, or | 8 dnl the Free Software Foundation; either version 3 of the License, or |
9 dnl (at your option) any later version. | 9 dnl (at your option) any later version. |
10 dnl | 10 dnl |
11 dnl This program is distributed in the hope that it will be useful, | 11 dnl This program is distributed in the hope that it will be useful, |
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 dnl GNU General Public License for more details. | 14 dnl GNU General Public License for more details. |
15 dnl | 15 dnl |
16 dnl You should have received a copy of the GNU General Public License | 16 dnl You should have received a copy of the GNU General Public License |
17 dnl along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 dnl along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 |
19 dnl Process this file with autoconf to produce a configure script. | 19 dnl Process this file with autoconf to produce a configure script. |
20 | 20 |
21 AC_PREREQ(2.59)dnl | 21 AC_PREREQ(2.59)dnl |
22 AC_INIT(main.c) | 22 AC_INIT(main.c) |
23 AC_CONFIG_HEADER(config.h:config.in) | 23 AC_CONFIG_HEADER(config.h:config.in) |
24 AM_MAINTAINER_MODE | 24 AM_MAINTAINER_MODE |
25 | 25 |
26 # Provide more thorough testing by -lmcheck. | 26 # Set the 'development' global. |
27 # Set it to 'true' for development snapshots, 'false' for releases or | 27 . $srcdir/development.sh |
28 # pre-releases. | |
29 development=false | |
30 | 28 |
31 AC_PROG_CC | 29 AC_PROG_CC |
32 AC_USE_SYSTEM_EXTENSIONS | 30 AC_USE_SYSTEM_EXTENSIONS |
33 ACX_LARGEFILE | 31 ACX_LARGEFILE |
34 AM_PROG_CC_STDC | 32 AM_PROG_CC_STDC |
35 | 33 |
36 AC_CONFIG_AUX_DIR(..) | 34 AC_CONFIG_AUX_DIR(..) |
37 AC_CANONICAL_SYSTEM | 35 AC_CANONICAL_SYSTEM |
38 AC_ARG_PROGRAM | 36 AC_ARG_PROGRAM |
39 | 37 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 else | 194 else |
197 gdb_native=no | 195 gdb_native=no |
198 fi | 196 fi |
199 | 197 |
200 . $srcdir/configure.host | 198 . $srcdir/configure.host |
201 | 199 |
202 # Accumulate some settings from configure.tgt over all enabled targets | 200 # Accumulate some settings from configure.tgt over all enabled targets |
203 | 201 |
204 TARGET_OBS= | 202 TARGET_OBS= |
205 all_targets= | 203 all_targets= |
| 204 HAVE_NATIVE_GCORE_TARGET= |
206 | 205 |
207 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` | 206 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
208 do | 207 do |
209 if test "$targ_alias" = "all"; then | 208 if test "$targ_alias" = "all"; then |
210 all_targets=true | 209 all_targets=true |
211 else | 210 else |
212 # Canonicalize the secondary target names. | 211 # Canonicalize the secondary target names. |
213 result=`$ac_config_sub $targ_alias 2>/dev/null` | 212 result=`$ac_config_sub $targ_alias 2>/dev/null` |
214 if test -n "$result"; then | 213 if test -n "$result"; then |
215 targ=$result | 214 targ=$result |
(...skipping 13 matching lines...) Expand all Loading... |
229 *) | 228 *) |
230 TARGET_OBS="$TARGET_OBS ${i}" | 229 TARGET_OBS="$TARGET_OBS ${i}" |
231 ;; | 230 ;; |
232 esac | 231 esac |
233 done | 232 done |
234 | 233 |
235 # Check whether this target needs 64-bit CORE_ADDR | 234 # Check whether this target needs 64-bit CORE_ADDR |
236 if test x${want64} = xfalse; then | 235 if test x${want64} = xfalse; then |
237 . ${srcdir}/../bfd/config.bfd | 236 . ${srcdir}/../bfd/config.bfd |
238 fi | 237 fi |
| 238 |
| 239 # Check whether this target is native and supports gcore. |
| 240 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ |
| 241 && $gdb_have_gcore; then |
| 242 HAVE_NATIVE_GCORE_TARGET=1 |
| 243 fi |
239 fi | 244 fi |
240 done | 245 done |
241 | 246 |
242 if test x${all_targets} = xtrue; then | 247 if test x${all_targets} = xtrue; then |
243 | 248 |
244 # We want all 64-bit targets if we either: | 249 # We want all 64-bit targets if we either: |
245 # - run on a 64-bit host or | 250 # - run on a 64-bit host or |
246 # - already require 64-bit support for some other target or | 251 # - already require 64-bit support for some other target or |
247 # - the --enable-64-bit-bfd option was supplied | 252 # - the --enable-64-bit-bfd option was supplied |
248 # Otherwise we only support all 32-bit targets. | 253 # Otherwise we only support all 32-bit targets. |
249 # | 254 # |
250 # NOTE: This test must be in sync with the corresponding | 255 # NOTE: This test must be in sync with the corresponding |
251 # tests in BFD! | 256 # tests in BFD! |
252 | 257 |
253 if test x${want64} = xfalse; then | 258 if test x${want64} = xfalse; then |
254 AC_CHECK_SIZEOF(long) | 259 AC_CHECK_SIZEOF(long) |
255 if test "x${ac_cv_sizeof_long}" = "x8"; then | 260 if test "x${ac_cv_sizeof_long}" = "x8"; then |
256 want64=true | 261 want64=true |
257 fi | 262 fi |
258 fi | 263 fi |
259 if test x${want64} = xtrue; then | 264 if test x${want64} = xtrue; then |
260 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | 265 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' |
261 else | 266 else |
262 TARGET_OBS='$(ALL_TARGET_OBS)' | 267 TARGET_OBS='$(ALL_TARGET_OBS)' |
263 fi | 268 fi |
264 fi | 269 fi |
265 | 270 |
266 AC_SUBST(TARGET_OBS) | 271 AC_SUBST(TARGET_OBS) |
| 272 AC_SUBST(HAVE_NATIVE_GCORE_TARGET) |
267 | 273 |
268 # For other settings, only the main target counts. | 274 # For other settings, only the main target counts. |
269 gdb_sim= | 275 gdb_sim= |
270 gdb_osabi= | 276 gdb_osabi= |
271 build_gdbserver= | 277 build_gdbserver= |
272 targ=$target; . ${srcdir}/configure.tgt | 278 targ=$target; . ${srcdir}/configure.tgt |
273 | 279 |
274 # Fetch the default architecture and default target vector from BFD. | 280 # Fetch the default architecture and default target vector from BFD. |
275 targ=$target; . $srcdir/../bfd/config.bfd | 281 targ=$target; . $srcdir/../bfd/config.bfd |
276 | 282 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 AC_PROG_AWK | 477 AC_PROG_AWK |
472 AC_PROG_INSTALL | 478 AC_PROG_INSTALL |
473 AC_PROG_LN_S | 479 AC_PROG_LN_S |
474 AC_PROG_RANLIB | 480 AC_PROG_RANLIB |
475 AC_PROG_YACC | 481 AC_PROG_YACC |
476 | 482 |
477 AC_CHECK_TOOL(AR, ar) | 483 AC_CHECK_TOOL(AR, ar) |
478 AC_CHECK_TOOL(DLLTOOL, dlltool) | 484 AC_CHECK_TOOL(DLLTOOL, dlltool) |
479 AC_CHECK_TOOL(WINDRES, windres) | 485 AC_CHECK_TOOL(WINDRES, windres) |
480 | 486 |
481 # Needed for GNU/Hurd. | 487 case $host_os in |
482 AC_CHECK_TOOL(MIG, mig) | 488 gnu*) |
| 489 # Needed for GNU Hurd hosts. |
| 490 AC_CHECK_TOOL(MIG, mig) |
| 491 if test x"$MIG" = x; then |
| 492 AC_MSG_ERROR([MIG not found but required for $host hosts]) |
| 493 fi |
| 494 ;; |
| 495 esac |
483 | 496 |
484 # ---------------------- # | 497 # ---------------------- # |
485 # Checks for libraries. # | 498 # Checks for libraries. # |
486 # ---------------------- # | 499 # ---------------------- # |
487 | 500 |
488 # We might need to link with -lm; most simulators need it. | 501 # We might need to link with -lm; most simulators need it. |
489 AC_CHECK_LIB(m, main) | 502 AC_CHECK_LIB(m, main) |
490 | 503 |
491 # We need to link with -lw to get `wctype' on Solaris before Solaris | 504 # We need to link with -lw to get `wctype' on Solaris before Solaris |
492 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | 505 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 READLINE='$(READLINE_DIR)/libreadline.a' | 651 READLINE='$(READLINE_DIR)/libreadline.a' |
639 READLINE_DEPS='$(READLINE)' | 652 READLINE_DEPS='$(READLINE)' |
640 READLINE_CFLAGS='-I$(READLINE_SRC)/..' | 653 READLINE_CFLAGS='-I$(READLINE_SRC)/..' |
641 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' | 654 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
642 fi | 655 fi |
643 AC_SUBST(READLINE) | 656 AC_SUBST(READLINE) |
644 AC_SUBST(READLINE_DEPS) | 657 AC_SUBST(READLINE_DEPS) |
645 AC_SUBST(READLINE_CFLAGS) | 658 AC_SUBST(READLINE_CFLAGS) |
646 AC_SUBST(READLINE_TEXI_INCFLAG) | 659 AC_SUBST(READLINE_TEXI_INCFLAG) |
647 | 660 |
648 dnl -lmcheck provides cheap enough memory mangling for debugging purposes. | |
649 if $development; then | |
650 AC_CHECK_LIB(mcheck, main) | |
651 fi | |
652 | |
653 # Generate jit-reader.h | 661 # Generate jit-reader.h |
654 | 662 |
655 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | 663 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h |
656 TARGET_PTR= | 664 TARGET_PTR= |
657 | 665 |
658 AC_CHECK_SIZEOF(unsigned long long) | 666 AC_CHECK_SIZEOF(unsigned long long) |
659 AC_CHECK_SIZEOF(unsigned long) | 667 AC_CHECK_SIZEOF(unsigned long) |
660 AC_CHECK_SIZEOF(unsigned __int128) | 668 AC_CHECK_SIZEOF(unsigned __int128) |
661 | 669 |
662 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | 670 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 AC_MSG_WARN([expat is missing or unusable; some features may be unavailabl
e.]) | 705 AC_MSG_WARN([expat is missing or unusable; some features may be unavailabl
e.]) |
698 fi | 706 fi |
699 else | 707 else |
700 save_LIBS=$LIBS | 708 save_LIBS=$LIBS |
701 LIBS="$LIBS $LIBEXPAT" | 709 LIBS="$LIBS $LIBEXPAT" |
702 AC_CHECK_FUNCS(XML_StopParser) | 710 AC_CHECK_FUNCS(XML_StopParser) |
703 LIBS=$save_LIBS | 711 LIBS=$save_LIBS |
704 fi | 712 fi |
705 fi | 713 fi |
706 | 714 |
| 715 # --------------------- # |
| 716 # Check for libpython. # |
| 717 # --------------------- # |
| 718 |
707 dnl Utility to simplify finding libpython. | 719 dnl Utility to simplify finding libpython. |
708 dnl $1 = pythonX.Y | 720 dnl $1 = pythonX.Y |
709 dnl $2 = the shell variable to assign the result to | 721 dnl $2 = the shell variable to assign the result to |
710 dnl If libpython is found we store $version here. | 722 dnl If libpython is found we store $version here. |
711 dnl $3 = additional flags to add to CPPFLAGS | 723 dnl $3 = additional flags to add to CPPFLAGS |
712 dnl $4 = additional flags to add to LIBS | 724 dnl $4 = additional flags to add to LIBS |
713 | 725 |
714 AC_DEFUN([AC_TRY_LIBPYTHON], | 726 AC_DEFUN([AC_TRY_LIBPYTHON], |
715 [ | 727 [ |
716 version=$1 | 728 version=$1 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 fi | 999 fi |
988 | 1000 |
989 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | 1001 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: |
990 # #if _SGIAPI | 1002 # #if _SGIAPI |
991 # #define siginfo __siginfo | 1003 # #define siginfo __siginfo |
992 # #endif | 1004 # #endif |
993 # The problem is that including Python causes some XOPEN macros to be | 1005 # The problem is that including Python causes some XOPEN macros to be |
994 # unilaterally defined, and that in turn causes _SGIAPI to evaluate | 1006 # unilaterally defined, and that in turn causes _SGIAPI to evaluate |
995 # to false. So, we work around this issue by defining siginfo ourself | 1007 # to false. So, we work around this issue by defining siginfo ourself |
996 # though the command-line. | 1008 # though the command-line. |
| 1009 # |
| 1010 # On x64 Windows, Python's include headers, and pyconfig.h in |
| 1011 # particular, rely on MS_WIN64 macro to detect that it's a 64bit |
| 1012 # version of Windows. Unfortunately, MS_WIN64 is only defined if |
| 1013 # _MSC_VER, a Microsoft-specific macro, is defined. So, when |
| 1014 # building on x64 Windows with GCC, we define MS_WIN64 ourselves. |
| 1015 # The issue was reported to the Python community, but still isn't |
| 1016 # solved as of 2012-10-02 (http://bugs.python.org/issue4709). |
| 1017 |
997 case "$gdb_host" in | 1018 case "$gdb_host" in |
998 irix*) if test "${GCC}" = yes; then | 1019 irix*) if test "${GCC}" = yes; then |
999 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | 1020 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" |
1000 fi | 1021 fi |
1001 ;; | 1022 ;; |
| 1023 mingw64) |
| 1024 if test "${GCC}" = yes; then |
| 1025 CPPFLAGS="$CPPFLAGS -DMS_WIN64" |
| 1026 fi |
| 1027 ;; |
1002 esac | 1028 esac |
| 1029 |
| 1030 # Note that "python -m threading" cannot be used to check for |
| 1031 # threading support due to a bug in Python 2.7.3 |
| 1032 # (http://bugs.python.org/issue15567). |
| 1033 AC_MSG_CHECKING(whether python supports threads) |
| 1034 saved_CPPFLAGS="${CPPFLAGS}" |
| 1035 CPPFLAGS="${PYTHON_CPPFLAGS}" |
| 1036 # Note that the test is reversed so that python_has_threads=yes on |
| 1037 # unexpected failures. |
| 1038 AC_PREPROC_IFELSE(AC_LANG_SOURCE([[ |
| 1039 #include <Python.h> |
| 1040 #ifdef WITH_THREAD |
| 1041 # error |
| 1042 #endif |
| 1043 ]]), [python_has_threads=no], [python_has_threads=yes]) |
| 1044 AC_MSG_RESULT(${python_has_threads}) |
| 1045 CPPFLAGS="${saved_CPPFLAGS}" |
1003 else | 1046 else |
1004 # Even if Python support is not compiled in, we need to have these files | 1047 # Even if Python support is not compiled in, we need to have these files |
1005 # included. | 1048 # included. |
1006 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | 1049 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" |
1007 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | 1050 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ |
1008 python/py-prettyprint.c python/py-auto-load.c" | 1051 python/py-prettyprint.c python/py-auto-load.c" |
1009 fi | 1052 fi |
1010 AC_SUBST(PYTHON_CFLAGS) | 1053 AC_SUBST(PYTHON_CFLAGS) |
1011 AC_SUBST(PYTHON_CPPFLAGS) | 1054 AC_SUBST(PYTHON_CPPFLAGS) |
1012 AC_SUBST(PYTHON_LIBS) | 1055 AC_SUBST(PYTHON_LIBS) |
1013 | 1056 |
| 1057 # --------------------- # |
| 1058 # Check for libmcheck. # |
| 1059 # --------------------- # |
| 1060 |
| 1061 # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
| 1062 # but turn it off if Python is enabled with threads, since -lmcheck is |
| 1063 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), |
| 1064 # and for releases. |
| 1065 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
| 1066 && $development; then |
| 1067 libmcheck_default=yes |
| 1068 else |
| 1069 libmcheck_default=no |
| 1070 fi |
| 1071 GDB_AC_LIBMCHECK(${libmcheck_default}) |
| 1072 |
| 1073 if test "$ENABLE_LIBMCHECK" = "yes" \ |
| 1074 -a "${have_libpython}" != "no" \ |
| 1075 -a "${python_has_threads}" = "yes" ; then |
| 1076 AC_MSG_WARN(--enable-libmcheck may lead to spurious crashes if threads are use
d in python) |
| 1077 fi |
| 1078 |
1014 # ------------------------- # | 1079 # ------------------------- # |
1015 # Checks for header files. # | 1080 # Checks for header files. # |
1016 # ------------------------- # | 1081 # ------------------------- # |
1017 | 1082 |
1018 AC_HEADER_DIRENT | |
1019 AC_HEADER_STAT | |
1020 AC_HEADER_STDC | 1083 AC_HEADER_STDC |
1021 # elf_hp.h is for HP/UX 64-bit shared library support. | 1084 # elf_hp.h is for HP/UX 64-bit shared library support. |
1022 # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
1023 # unconditionally, so what's the point in checking these? | |
1024 AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | 1085 AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ |
1025 thread_db.h signal.h stddef.h \ | 1086 thread_db.h \ |
1026 » » stdlib.h string.h memory.h strings.h sys/fault.h \ | 1087 » » sys/fault.h \ |
1027 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | 1088 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
1028 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | 1089 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ |
1029 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | 1090 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ |
1030 » » sys/types.h sys/wait.h wait.h termios.h termio.h \ | 1091 » » termios.h termio.h \ |
1031 » » sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ | 1092 » » sgtty.h elf_hp.h \ |
1032 » » dlfcn.h sys/socket.h sys/un.h]) | 1093 » » dlfcn.h]) |
1033 AC_CHECK_HEADERS(link.h, [], [], | |
1034 [#if HAVE_SYS_TYPES_H | |
1035 # include <sys/types.h> | |
1036 #endif | |
1037 #if HAVE_NLIST_H | |
1038 # include <nlist.h> | |
1039 #endif | |
1040 ]) | |
1041 AC_CHECK_HEADERS(sys/proc.h, [], [], | 1094 AC_CHECK_HEADERS(sys/proc.h, [], [], |
1042 [#if HAVE_SYS_PARAM_H | 1095 [#if HAVE_SYS_PARAM_H |
1043 # include <sys/param.h> | 1096 # include <sys/param.h> |
1044 #endif | 1097 #endif |
1045 ]) | 1098 ]) |
1046 AC_CHECK_HEADERS(sys/user.h, [], [], | 1099 AC_CHECK_HEADERS(sys/user.h, [], [], |
1047 [#if HAVE_SYS_PARAM_H | 1100 [#if HAVE_SYS_PARAM_H |
1048 # include <sys/param.h> | 1101 # include <sys/param.h> |
1049 #endif | 1102 #endif |
1050 ]) | 1103 ]) |
(...skipping 13 matching lines...) Expand all Loading... |
1064 AC_CHECK_HEADERS(term.h, [], [], | 1117 AC_CHECK_HEADERS(term.h, [], [], |
1065 [#if HAVE_CURSES_H | 1118 [#if HAVE_CURSES_H |
1066 # include <curses.h> | 1119 # include <curses.h> |
1067 #endif | 1120 #endif |
1068 ]) | 1121 ]) |
1069 | 1122 |
1070 # ------------------------- # | 1123 # ------------------------- # |
1071 # Checks for declarations. # | 1124 # Checks for declarations. # |
1072 # ------------------------- # | 1125 # ------------------------- # |
1073 | 1126 |
1074 AC_CHECK_DECLS([free, malloc, realloc, strerror, strstr, getopt, | 1127 AC_CHECK_DECLS([free, malloc, realloc, snprintf]) |
1075 snprintf, vsnprintf]) | |
1076 AM_LC_MESSAGES | 1128 AM_LC_MESSAGES |
1077 | 1129 |
1078 # ----------------------- # | 1130 # ----------------------- # |
1079 # Checks for structures. # | 1131 # Checks for structures. # |
1080 # ----------------------- # | 1132 # ----------------------- # |
1081 | 1133 |
1082 AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize]) | 1134 AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize]) |
1083 | 1135 |
1084 # ------------------ # | 1136 # ------------------ # |
1085 # Checks for types. # | 1137 # Checks for types. # |
(...skipping 16 matching lines...) Expand all Loading... |
1102 # ------------------------------ # | 1154 # ------------------------------ # |
1103 # Checks for library functions. # | 1155 # Checks for library functions. # |
1104 # ------------------------------ # | 1156 # ------------------------------ # |
1105 | 1157 |
1106 AC_FUNC_ALLOCA | 1158 AC_FUNC_ALLOCA |
1107 AC_FUNC_MMAP | 1159 AC_FUNC_MMAP |
1108 AC_FUNC_VFORK | 1160 AC_FUNC_VFORK |
1109 AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid getgid \ | 1161 AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid getgid \ |
1110 pipe poll pread pread64 pwrite readlink resize_term \ | 1162 pipe poll pread pread64 pwrite readlink resize_term \ |
1111 sbrk setpgid setpgrp setsid \ | 1163 sbrk setpgid setpgrp setsid \ |
1112 » » sigaction sigprocmask sigsetmask socketpair syscall \ | 1164 » » sigaction sigprocmask sigsetmask socketpair \ |
1113 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | 1165 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1114 » » setrlimit getrlimit posix_madvise waitpid lstat]) | 1166 » » setrlimit getrlimit posix_madvise waitpid lstat \ |
| 1167 » » ptrace64]) |
1115 AM_LANGINFO_CODESET | 1168 AM_LANGINFO_CODESET |
| 1169 GDB_AC_COMMON |
1116 | 1170 |
1117 # Check the return and argument types of ptrace. No canned test for | 1171 # Check the return and argument types of ptrace. No canned test for |
1118 # this, so roll our own. | 1172 # this, so roll our own. |
1119 gdb_ptrace_headers=' | 1173 gdb_ptrace_headers=' |
1120 #if HAVE_SYS_TYPES_H | 1174 #include <sys/types.h> |
1121 # include <sys/types.h> | |
1122 #endif | |
1123 #if HAVE_SYS_PTRACE_H | 1175 #if HAVE_SYS_PTRACE_H |
1124 # include <sys/ptrace.h> | 1176 # include <sys/ptrace.h> |
1125 #endif | 1177 #endif |
1126 #if HAVE_UNISTD_H | 1178 #if HAVE_UNISTD_H |
1127 # include <unistd.h> | 1179 # include <unistd.h> |
1128 #endif | 1180 #endif |
1129 ' | 1181 ' |
1130 # There is no point in checking if we don't have a prototype. | 1182 # There is no point in checking if we don't have a prototype. |
1131 AC_CHECK_DECLS(ptrace, [], [ | 1183 AC_CHECK_DECLS(ptrace, [], [ |
1132 : ${gdb_cv_func_ptrace_ret='int'} | 1184 : ${gdb_cv_func_ptrace_ret='int'} |
(...skipping 12 matching lines...) Expand all Loading... |
1145 AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret, | 1197 AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret, |
1146 [Define as the return type of ptrace.]) | 1198 [Define as the return type of ptrace.]) |
1147 # Check argument types. | 1199 # Check argument types. |
1148 AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [ | 1200 AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [ |
1149 AC_TRY_COMPILE($gdb_ptrace_headers, | 1201 AC_TRY_COMPILE($gdb_ptrace_headers, |
1150 [extern long ptrace (enum __ptrace_request, ...);], | 1202 [extern long ptrace (enum __ptrace_request, ...);], |
1151 [gdb_cv_func_ptrace_args='int,int,long,long'],[ | 1203 [gdb_cv_func_ptrace_args='int,int,long,long'],[ |
1152 for gdb_arg1 in 'int' 'long'; do | 1204 for gdb_arg1 in 'int' 'long'; do |
1153 for gdb_arg2 in 'pid_t' 'int' 'long'; do | 1205 for gdb_arg2 in 'pid_t' 'int' 'long'; do |
1154 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | 1206 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
1155 for gdb_arg4 in 'int' 'long'; do | 1207 for gdb_arg4 in 'int' 'long' 'void *'; do |
1156 AC_TRY_COMPILE($gdb_ptrace_headers, [ | 1208 AC_TRY_COMPILE($gdb_ptrace_headers, [ |
1157 extern $gdb_cv_func_ptrace_ret | 1209 extern $gdb_cv_func_ptrace_ret |
1158 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | 1210 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
1159 ], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | 1211 ], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
1160 break 4;]) | 1212 break 4;]) |
1161 for gdb_arg5 in 'int *' 'int' 'long'; do | 1213 for gdb_arg5 in 'int *' 'int' 'long'; do |
1162 AC_TRY_COMPILE($gdb_ptrace_headers, [ | 1214 AC_TRY_COMPILE($gdb_ptrace_headers, [ |
1163 extern $gdb_cv_func_ptrace_ret | 1215 extern $gdb_cv_func_ptrace_ret |
1164 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | 1216 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
1165 ], [ | 1217 ], [ |
1166 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | 1218 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
1167 break 5;]) | 1219 break 5;]) |
1168 done | 1220 done |
1169 done | 1221 done |
1170 done | 1222 done |
1171 done | 1223 done |
1172 done | 1224 done |
1173 # Provide a safe default value. | 1225 # Provide a safe default value. |
1174 : ${gdb_cv_func_ptrace_args='int,int,long,long'} | 1226 : ${gdb_cv_func_ptrace_args='int,int,long,long'} |
1175 ])]) | 1227 ])]) |
1176 ac_save_IFS=$IFS; IFS=',' | 1228 ac_save_IFS=$IFS; IFS=',' |
1177 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | 1229 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` |
1178 IFS=$ac_save_IFS | 1230 IFS=$ac_save_IFS |
1179 shift | 1231 shift |
1180 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3], | 1232 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3], |
1181 [Define to the type of arg 3 for ptrace.]) | 1233 [Define to the type of arg 3 for ptrace.]) |
| 1234 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG4, $[4], |
| 1235 [Define to the type of arg 4 for ptrace.]) |
1182 if test -n "$[5]"; then | 1236 if test -n "$[5]"; then |
1183 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5], | 1237 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5], |
1184 [Define to the type of arg 5 for ptrace.]) | 1238 [Define to the type of arg 5 for ptrace.]) |
1185 fi | 1239 fi |
1186 | 1240 |
1187 dnl AC_FUNC_SETPGRP does not work when cross compiling | 1241 dnl AC_FUNC_SETPGRP does not work when cross compiling |
1188 dnl Instead, assume we will have a prototype for setpgrp if cross compiling. | 1242 dnl Instead, assume we will have a prototype for setpgrp if cross compiling. |
1189 if test "$cross_compiling" = no; then | 1243 if test "$cross_compiling" = no; then |
1190 AC_FUNC_SETPGRP | 1244 AC_FUNC_SETPGRP |
1191 else | 1245 else |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 #include <sys/ptrace.h>], | 1381 #include <sys/ptrace.h>], |
1328 [PT_GETXMMREGS;], | 1382 [PT_GETXMMREGS;], |
1329 [gdb_cv_have_pt_getxmmregs=yes], | 1383 [gdb_cv_have_pt_getxmmregs=yes], |
1330 [gdb_cv_have_pt_getxmmregs=no])]) | 1384 [gdb_cv_have_pt_getxmmregs=no])]) |
1331 AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs) | 1385 AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs) |
1332 if test $gdb_cv_have_pt_getxmmregs = yes; then | 1386 if test $gdb_cv_have_pt_getxmmregs = yes; then |
1333 AC_DEFINE(HAVE_PT_GETXMMREGS, 1, | 1387 AC_DEFINE(HAVE_PT_GETXMMREGS, 1, |
1334 [Define if sys/ptrace.h defines the PT_GETXMMREGS request.]) | 1388 [Define if sys/ptrace.h defines the PT_GETXMMREGS request.]) |
1335 fi | 1389 fi |
1336 | 1390 |
1337 # Detect which type of /proc is in use, such as for Unixware or Solaris. | 1391 # Detect which type of /proc is in use, such as for Solaris. |
1338 | 1392 |
1339 if test "${target}" = "${host}"; then | 1393 if test "${target}" = "${host}"; then |
1340 case "${host}" in | 1394 case "${host}" in |
1341 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | 1395 *-*-sysv4.2* | *-*-sysv5* ) |
1342 AC_DEFINE(NEW_PROC_API, 1, | 1396 AC_DEFINE(NEW_PROC_API, 1, |
1343 [Define if you want to use new multi-fd /proc interface | 1397 [Define if you want to use new multi-fd /proc interface.]) |
1344 (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros).]) | |
1345 ;; | 1398 ;; |
1346 *-*-solaris2.[[6789]] | *-*-solaris2.1[[0-9]]*) | 1399 *-*-solaris2.[[6789]] | *-*-solaris2.1[[0-9]]*) |
1347 AC_DEFINE(NEW_PROC_API, 1, | 1400 AC_DEFINE(NEW_PROC_API, 1, |
1348 [Define if you want to use new multi-fd /proc interface | 1401 [Define if you want to use new multi-fd /proc interface.]) |
1349 (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros).]) | |
1350 ;; | 1402 ;; |
1351 mips-sgi-irix5*) | 1403 mips-sgi-irix5*) |
1352 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | 1404 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. |
1353 AC_DEFINE([_KMEMUSER], 1, | 1405 AC_DEFINE([_KMEMUSER], 1, |
1354 [Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works | 1406 [Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works |
1355 around a <sys/proc.h> problem on IRIX 5.]) | 1407 around a <sys/proc.h> problem on IRIX 5.]) |
1356 ;; | 1408 ;; |
1357 esac | 1409 esac |
1358 fi | 1410 fi |
1359 | 1411 |
1360 if test "$ac_cv_header_sys_procfs_h" = yes; then | 1412 if test "$ac_cv_header_sys_procfs_h" = yes; then |
1361 BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) | |
1362 BFD_HAVE_SYS_PROCFS_TYPE(prrun_t) | |
1363 BFD_HAVE_SYS_PROCFS_TYPE(gregset_t) | 1413 BFD_HAVE_SYS_PROCFS_TYPE(gregset_t) |
1364 BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t) | 1414 BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t) |
1365 BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t) | 1415 BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t) |
1366 BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t) | 1416 BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t) |
1367 BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t) | 1417 BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t) |
1368 BFD_HAVE_SYS_PROCFS_TYPE(prfpregset32_t) | |
1369 BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t) | 1418 BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t) |
1370 BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) | 1419 BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) |
1371 BFD_HAVE_SYS_PROCFS_TYPE(prsysent_t) | 1420 BFD_HAVE_SYS_PROCFS_TYPE(prsysent_t) |
1372 BFD_HAVE_SYS_PROCFS_TYPE(pr_sigset_t) | 1421 BFD_HAVE_SYS_PROCFS_TYPE(pr_sigset_t) |
1373 BFD_HAVE_SYS_PROCFS_TYPE(pr_sigaction64_t) | 1422 BFD_HAVE_SYS_PROCFS_TYPE(pr_sigaction64_t) |
1374 BFD_HAVE_SYS_PROCFS_TYPE(pr_siginfo64_t) | 1423 BFD_HAVE_SYS_PROCFS_TYPE(pr_siginfo64_t) |
1375 | 1424 |
1376 | 1425 |
1377 dnl Check for broken prfpregset_t type | 1426 dnl Check for broken prfpregset_t type |
1378 | 1427 |
(...skipping 14 matching lines...) Expand all Loading... |
1393 }], | 1442 }], |
1394 gdb_cv_prfpregset_t_broken=no, | 1443 gdb_cv_prfpregset_t_broken=no, |
1395 gdb_cv_prfpregset_t_broken=yes, | 1444 gdb_cv_prfpregset_t_broken=yes, |
1396 gdb_cv_prfpregset_t_broken=yes)]) | 1445 gdb_cv_prfpregset_t_broken=yes)]) |
1397 AC_MSG_RESULT($gdb_cv_prfpregset_t_broken) | 1446 AC_MSG_RESULT($gdb_cv_prfpregset_t_broken) |
1398 if test $gdb_cv_prfpregset_t_broken = yes; then | 1447 if test $gdb_cv_prfpregset_t_broken = yes; then |
1399 AC_DEFINE(PRFPREGSET_T_BROKEN, 1, | 1448 AC_DEFINE(PRFPREGSET_T_BROKEN, 1, |
1400 [Define if the prfpregset_t type is broken.]) | 1449 [Define if the prfpregset_t type is broken.]) |
1401 fi | 1450 fi |
1402 fi | 1451 fi |
1403 | |
1404 dnl Check for PIOCSET ioctl entry | |
1405 | |
1406 AC_MSG_CHECKING(for PIOCSET ioctl entry in sys/procfs.h) | |
1407 AC_CACHE_VAL(gdb_cv_have_procfs_piocset, | |
1408 [AC_TRY_COMPILE([#include <unistd.h> | |
1409 #include <sys/types.h> | |
1410 #include <sys/procfs.h> | |
1411 ], [ | |
1412 int dummy;; | |
1413 dummy = ioctl(0, PIOCSET, &dummy); | |
1414 ], | |
1415 gdb_cv_have_procfs_piocset=yes, gdb_cv_have_procfs_piocset=no)]) | |
1416 AC_MSG_RESULT($gdb_cv_have_procfs_piocset) | |
1417 if test $gdb_cv_have_procfs_piocset = yes; then | |
1418 AC_DEFINE(HAVE_PROCFS_PIOCSET, 1, | |
1419 [Define if ioctl argument PIOCSET is available.]) | |
1420 fi | |
1421 fi | |
1422 | |
1423 dnl For native ports (host == target), check to see what kind of | |
1424 dnl legacy link.h support is needed. (See solib-legacy.c.) | |
1425 if test ${host} = ${target} ; then | |
1426 dnl Check for struct link_map with l_ members which are indicative | |
1427 dnl of SVR4-like shared libraries | |
1428 | |
1429 AC_MSG_CHECKING(for member l_addr in struct link_map) | |
1430 AC_CACHE_VAL(gdb_cv_have_struct_link_map_with_l_members, | |
1431 [AC_TRY_COMPILE([#include <link.h>], | |
1432 [struct link_map lm; (void) lm.l_addr;], | |
1433 gdb_cv_have_struct_link_map_with_l_members=yes, | |
1434 gdb_cv_have_struct_link_map_with_l_members=no)]) | |
1435 AC_MSG_RESULT($gdb_cv_have_struct_link_map_with_l_members) | |
1436 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
1437 AC_DEFINE(HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS,1, | |
1438 [Define if <link.h> exists and defines struct link_map which has | |
1439 members with an ``l_'' prefix. (For Solaris, SVR4, and | |
1440 SVR4-like systems.)]) | |
1441 fi | |
1442 | |
1443 dnl Check for struct link_map with lm_ members which are indicative | |
1444 dnl of SunOS-like shared libraries | |
1445 | |
1446 AC_MSG_CHECKING(for member lm_addr in struct link_map) | |
1447 AC_CACHE_VAL(gdb_cv_have_struct_link_map_with_lm_members, | |
1448 [AC_TRY_COMPILE([#include <sys/types.h> | |
1449 #include <link.h>], | |
1450 [struct link_map lm; (void) lm.lm_addr;], | |
1451 gdb_cv_have_struct_link_map_with_lm_members=yes, | |
1452 gdb_cv_have_struct_link_map_with_lm_members=no)]) | |
1453 AC_MSG_RESULT($gdb_cv_have_struct_link_map_with_lm_members) | |
1454 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
1455 AC_DEFINE(HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS, 1, | |
1456 [Define if <link.h> exists and defines struct link_map which has | |
1457 members with an ``lm_'' prefix. (For SunOS.)]) | |
1458 fi | |
1459 | |
1460 dnl Check for struct so_map with som_ members which are found on | |
1461 dnl some *BSD systems. | |
1462 | |
1463 AC_MSG_CHECKING(for member som_addr in struct so_map) | |
1464 AC_CACHE_VAL(gdb_cv_have_struct_so_map_with_som_members, | |
1465 [AC_TRY_COMPILE([#include <sys/types.h> | |
1466 #ifdef HAVE_NLIST_H | |
1467 #include <nlist.h> | |
1468 #endif | |
1469 #include <link.h>], | |
1470 [struct so_map lm; (void) lm.som_addr;], | |
1471 gdb_cv_have_struct_so_map_with_som_members=yes, | |
1472 gdb_cv_have_struct_so_map_with_som_members=no)]) | |
1473 AC_MSG_RESULT($gdb_cv_have_struct_so_map_with_som_members) | |
1474 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
1475 AC_DEFINE(HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS, 1, | |
1476 [Define if <link.h> exists and defines a struct so_map which has | |
1477 members with an ``som_'' prefix. (Found on older *BSD systems.)]) | |
1478 fi | |
1479 | |
1480 dnl Check for struct link_map32 type, which allows a 64-bit Solaris | |
1481 dnl debugger to debug a 32-bit Solaris app with 32-bit shared libraries. | |
1482 | |
1483 AC_MSG_CHECKING(for struct link_map32 in sys/link.h) | |
1484 AC_CACHE_VAL(gdb_cv_have_struct_link_map32, | |
1485 [AC_TRY_COMPILE([#define _SYSCALL32 | |
1486 #include <sys/link.h>], [struct link_map32 l;], | |
1487 gdb_cv_have_struct_link_map32=yes, | |
1488 gdb_cv_have_struct_link_map32=no)]) | |
1489 AC_MSG_RESULT($gdb_cv_have_struct_link_map32) | |
1490 if test $gdb_cv_have_struct_link_map32 = yes; then | |
1491 AC_DEFINE(HAVE_STRUCT_LINK_MAP32, 1, | |
1492 [Define if <sys/link.h> has struct link_map32]) | |
1493 AC_DEFINE(_SYSCALL32, 1, | |
1494 [Define if <sys/link.h> has link_map32 (solaris sparc-64 target)]) | |
1495 fi | |
1496 fi | 1452 fi |
1497 | 1453 |
1498 # Check if the compiler supports the `long long' type. | 1454 # Check if the compiler supports the `long long' type. |
1499 | 1455 |
1500 AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long, | 1456 AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long, |
1501 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | 1457 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
1502 [[extern long long foo;]], | 1458 [[extern long long foo;]], |
1503 [[switch (foo & 2) { case 0: return 1; }]])], | 1459 [[switch (foo & 2) { case 0: return 1; }]])], |
1504 gdb_cv_c_long_long=yes, | 1460 gdb_cv_c_long_long=yes, |
1505 gdb_cv_c_long_long=no)]) | 1461 gdb_cv_c_long_long=no)]) |
1506 if test $gdb_cv_c_long_long = yes; then | 1462 if test $gdb_cv_c_long_long != yes; then |
1507 AC_DEFINE(CC_HAS_LONG_LONG, 1, | 1463 # libdecnumber requires long long. |
1508 [Define to 1 if the compiler supports long long.]) | 1464 AC_MSG_ERROR([Compiler must support long long for GDB.]) |
1509 fi | 1465 fi |
1510 | 1466 |
1511 # Check if the compiler and runtime support printing long longs. | 1467 # Check if the compiler and runtime support printing long longs. |
1512 | 1468 |
1513 AC_CACHE_CHECK([for long long support in printf], | 1469 AC_CACHE_CHECK([for long long support in printf], |
1514 gdb_cv_printf_has_long_long, | 1470 gdb_cv_printf_has_long_long, |
1515 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], | 1471 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], |
1516 [[char buf[32]; | 1472 [[char buf[32]; |
1517 long long l = 0; | 1473 long long l = 0; |
1518 l = (l << 16) + 0x0123; | 1474 l = (l << 16) + 0x0123; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 LDFLAGS="$LDFLAGS $RDYNAMIC" | 1583 LDFLAGS="$LDFLAGS $RDYNAMIC" |
1628 if test "${have_libpython}" = no; then | 1584 if test "${have_libpython}" = no; then |
1629 AC_TRY_LINK([], [], [dynamic_list=true]) | 1585 AC_TRY_LINK([], [], [dynamic_list=true]) |
1630 else | 1586 else |
1631 # Workaround http://bugs.python.org/issue4434 where static | 1587 # Workaround http://bugs.python.org/issue4434 where static |
1632 # libpythonX.Y.a would get its symbols required for | 1588 # libpythonX.Y.a would get its symbols required for |
1633 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | 1589 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. |
1634 # Problem does not happen for the recommended libpythonX.Y.so linkage. | 1590 # Problem does not happen for the recommended libpythonX.Y.so linkage. |
1635 old_CFLAGS="$CFLAGS" | 1591 old_CFLAGS="$CFLAGS" |
1636 CFLAGS="$CFLAGS $PYTHON_CFLAGS" | 1592 CFLAGS="$CFLAGS $PYTHON_CFLAGS" |
| 1593 old_LIBS="$LIBS" |
| 1594 LIBS="$LIBS $PYTHON_LIBS" |
1637 AC_RUN_IFELSE( | 1595 AC_RUN_IFELSE( |
1638 AC_LANG_PROGRAM( | 1596 AC_LANG_PROGRAM( |
1639 [#include "]${have_libpython}[/Python.h"], | 1597 [#include "]${have_libpython}[/Python.h"], |
1640 [int err; | 1598 [int err; |
1641 Py_Initialize (); | 1599 Py_Initialize (); |
1642 err = PyRun_SimpleString ("import itertools\n"); | 1600 err = PyRun_SimpleString ("import itertools\n"); |
1643 Py_Finalize (); | 1601 Py_Finalize (); |
1644 return err == 0 ? 0 : 1;]), | 1602 return err == 0 ? 0 : 1;]), |
1645 [dynamic_list=true], [], [true]) | 1603 [dynamic_list=true], [], [true]) |
| 1604 LIBS="$old_LIBS" |
1646 CFLAGS="$old_CFLAGS" | 1605 CFLAGS="$old_CFLAGS" |
1647 fi | 1606 fi |
1648 LDFLAGS="$old_LDFLAGS" | 1607 LDFLAGS="$old_LDFLAGS" |
1649 fi | 1608 fi |
1650 if $dynamic_list; then | 1609 if $dynamic_list; then |
1651 found="-Wl,--dynamic-list" | 1610 found="-Wl,--dynamic-list" |
1652 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | 1611 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' |
1653 else | 1612 else |
1654 found="-rdynamic" | 1613 found="-rdynamic" |
1655 RDYNAMIC="-rdynamic" | 1614 RDYNAMIC="-rdynamic" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 gdb_cv_sys_syscall_h_has_tkill, | 1734 gdb_cv_sys_syscall_h_has_tkill, |
1776 AC_TRY_COMPILE( | 1735 AC_TRY_COMPILE( |
1777 [#include <sys/syscall.h>], | 1736 [#include <sys/syscall.h>], |
1778 [int i = __NR_tkill;], | 1737 [int i = __NR_tkill;], |
1779 gdb_cv_sys_syscall_h_has_tkill=yes, | 1738 gdb_cv_sys_syscall_h_has_tkill=yes, |
1780 gdb_cv_sys_syscall_h_has_tkill=no | 1739 gdb_cv_sys_syscall_h_has_tkill=no |
1781 ) | 1740 ) |
1782 ) | 1741 ) |
1783 fi | 1742 fi |
1784 dnl See if we can issue tkill syscall. | 1743 dnl See if we can issue tkill syscall. |
1785 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscal
l" = "xyes"; then | 1744 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then |
1786 AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.]) | 1745 AC_CHECK_FUNC(syscall, |
| 1746 AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.]) |
| 1747 ) |
1787 fi | 1748 fi |
1788 | 1749 |
1789 dnl Check if we can disable the virtual address space randomization. | 1750 dnl Check if we can disable the virtual address space randomization. |
1790 dnl The functionality of setarch -R. | 1751 dnl The functionality of setarch -R. |
1791 AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>]) | 1752 AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>]) |
1792 define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [ | 1753 define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [ |
1793 # if !HAVE_DECL_ADDR_NO_RANDOMIZE | 1754 # if !HAVE_DECL_ADDR_NO_RANDOMIZE |
1794 # define ADDR_NO_RANDOMIZE 0x0040000 | 1755 # define ADDR_NO_RANDOMIZE 0x0040000 |
1795 # endif | 1756 # endif |
1796 /* Test the flag could be set and stays set. */ | 1757 /* Test the flag could be set and stays set. */ |
1797 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | 1758 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); |
1798 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | 1759 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) |
1799 return 1])]) | 1760 return 1])]) |
1800 AC_RUN_IFELSE([PERSONALITY_TEST], | 1761 AC_RUN_IFELSE([PERSONALITY_TEST], |
1801 [have_personality=true], | 1762 [have_personality=true], |
1802 [have_personality=false], | 1763 [have_personality=false], |
1803 [AC_LINK_IFELSE([PERSONALITY_TEST], | 1764 [AC_LINK_IFELSE([PERSONALITY_TEST], |
1804 [have_personality=true], | 1765 [have_personality=true], |
1805 [have_personality=false])]) | 1766 [have_personality=false])]) |
1806 if $have_personality | 1767 if $have_personality |
1807 then | 1768 then |
1808 AC_DEFINE([HAVE_PERSONALITY], 1, | 1769 AC_DEFINE([HAVE_PERSONALITY], 1, |
1809 [Define if you support the personality syscall.]) | 1770 [Define if you support the personality syscall.]) |
1810 fi | 1771 fi |
1811 | 1772 |
| 1773 dnl Set the host's .gdbinit filename. |
| 1774 case $host_os in |
| 1775 go32* | *djgpp*) |
| 1776 gdbinit=gdb.ini |
| 1777 ;; |
| 1778 *) |
| 1779 gdbinit=.gdbinit |
| 1780 ;; |
| 1781 esac |
| 1782 AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) |
| 1783 |
1812 dnl Handle optional features that can be enabled. | 1784 dnl Handle optional features that can be enabled. |
1813 | 1785 |
1814 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, | 1786 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
1815 # except that the argument to --with-sysroot is optional. | 1787 # except that the argument to --with-sysroot is optional. |
1816 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | 1788 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. |
1817 if test "x$with_sysroot" = xyes; then | 1789 if test "x$with_sysroot" = xyes; then |
1818 with_sysroot="${exec_prefix}/${target_alias}/sys-root" | 1790 with_sysroot="${exec_prefix}/${target_alias}/sys-root" |
1819 fi | 1791 fi |
1820 AC_ARG_WITH(sysroot, | 1792 AC_ARG_WITH(sysroot, |
1821 AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], | 1793 AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], |
(...skipping 19 matching lines...) Expand all Loading... |
1841 # Enable -Werror by default when using gcc. Turn it off for releases. | 1813 # Enable -Werror by default when using gcc. Turn it off for releases. |
1842 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | 1814 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
1843 ERROR_ON_WARNING=yes | 1815 ERROR_ON_WARNING=yes |
1844 fi | 1816 fi |
1845 | 1817 |
1846 WERROR_CFLAGS="" | 1818 WERROR_CFLAGS="" |
1847 if test "${ERROR_ON_WARNING}" = yes ; then | 1819 if test "${ERROR_ON_WARNING}" = yes ; then |
1848 WERROR_CFLAGS="-Werror" | 1820 WERROR_CFLAGS="-Werror" |
1849 fi | 1821 fi |
1850 | 1822 |
1851 # The entries after -Wno-pointer-sign are disabled warnings which may | |
1852 # be enabled in the future, which can not currently be used to build | |
1853 # GDB. | |
1854 # NOTE: If you change this list, remember to update | |
1855 # gdb/doc/gdbint.texinfo. | |
1856 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ | 1823 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
1857 -Wformat-nonliteral -Wno-pointer-sign \ | 1824 -Wpointer-sign \ |
1858 -Wno-unused -Wunused-value -Wunused-function \ | 1825 -Wno-unused -Wunused-value -Wunused-function \ |
1859 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ | 1826 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
1860 -Wdeclaration-after-statement" | 1827 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ |
| 1828 -Wold-style-declaration -Wold-style-definition" |
1861 | 1829 |
1862 # Enable -Wno-format by default when using gcc on mingw since many | 1830 # Enable -Wno-format by default when using gcc on mingw since many |
1863 # GCC versions complain about %I64. | 1831 # GCC versions complain about %I64. |
1864 case "${host}" in | 1832 case "${host}" in |
1865 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | 1833 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; |
| 1834 *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
1866 esac | 1835 esac |
1867 | 1836 |
1868 AC_ARG_ENABLE(build-warnings, | 1837 AC_ARG_ENABLE(build-warnings, |
1869 AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings i
f gcc is used]), | 1838 AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings i
f gcc is used]), |
1870 [case "${enableval}" in | 1839 [case "${enableval}" in |
1871 yes) ;; | 1840 yes) ;; |
1872 no) build_warnings="-w";; | 1841 no) build_warnings="-w";; |
1873 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | 1842 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
1874 build_warnings="${build_warnings} ${t}";; | 1843 build_warnings="${build_warnings} ${t}";; |
1875 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | 1844 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1909 CFLAGS="$saved_CFLAGS" | 1878 CFLAGS="$saved_CFLAGS" |
1910 esac | 1879 esac |
1911 done | 1880 done |
1912 AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS}) | 1881 AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS}) |
1913 fi | 1882 fi |
1914 AC_SUBST(WARN_CFLAGS) | 1883 AC_SUBST(WARN_CFLAGS) |
1915 AC_SUBST(WERROR_CFLAGS) | 1884 AC_SUBST(WERROR_CFLAGS) |
1916 | 1885 |
1917 # In the Cygwin environment, we need some additional flags. | 1886 # In the Cygwin environment, we need some additional flags. |
1918 AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin, | 1887 AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin, |
1919 [AC_EGREP_CPP(lose, [ | 1888 [AC_EGREP_CPP(^lose$, [ |
1920 #if defined (__CYGWIN__) || defined (__CYGWIN32__) | 1889 #if defined (__CYGWIN__) || defined (__CYGWIN32__) |
1921 lose | 1890 lose |
1922 #endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])]) | 1891 #endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])]) |
1923 | 1892 |
1924 | 1893 |
1925 dnl Figure out which of the many generic ser-*.c files the _host_ supports. | 1894 dnl Figure out which of the many generic ser-*.c files the _host_ supports. |
1926 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" | 1895 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
1927 case ${host} in | 1896 case ${host} in |
1928 *go32* ) SER_HARDWIRE=ser-go32.o ;; | 1897 *go32* ) SER_HARDWIRE=ser-go32.o ;; |
1929 *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | 1898 *djgpp* ) SER_HARDWIRE=ser-go32.o ;; |
(...skipping 18 matching lines...) Expand all Loading... |
1948 [Define if we should use the Windows API, instead of the | 1917 [Define if we should use the Windows API, instead of the |
1949 POSIX API. On Windows, we use the Windows API when | 1918 POSIX API. On Windows, we use the Windows API when |
1950 building for MinGW, but the POSIX API when building | 1919 building for MinGW, but the POSIX API when building |
1951 for Cygwin.]) | 1920 for Cygwin.]) |
1952 WIN32LIBS="$WIN32LIBS -lws2_32" | 1921 WIN32LIBS="$WIN32LIBS -lws2_32" |
1953 ;; | 1922 ;; |
1954 esac | 1923 esac |
1955 AC_SUBST(WIN32LIBS) | 1924 AC_SUBST(WIN32LIBS) |
1956 | 1925 |
1957 # Add ELF support to GDB, but only if BFD includes ELF support. | 1926 # Add ELF support to GDB, but only if BFD includes ELF support. |
1958 OLD_CFLAGS=$CFLAGS | 1927 GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_elf, |
1959 OLD_LDFLAGS=$LDFLAGS | 1928 [bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h) |
1960 OLD_LIBS=$LIBS | |
1961 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
1962 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
1963 # always want our bfd. | |
1964 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
1965 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
1966 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
1967 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
1968 if test "$plugins" = "yes"; then | |
1969 LIBS="-ldl $LIBS" | |
1970 fi | |
1971 LIBS="-lbfd -liberty $intl $LIBS" | |
1972 AC_CACHE_CHECK([for ELF support in BFD], gdb_cv_var_elf, | |
1973 [AC_TRY_LINK( | |
1974 [#include <stdlib.h> | |
1975 #include "bfd.h" | |
1976 #include "elf-bfd.h" | |
1977 ], | |
1978 [bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); ], | |
1979 gdb_cv_var_elf=yes, gdb_cv_var_elf=no)]) | |
1980 if test $gdb_cv_var_elf = yes; then | 1929 if test $gdb_cv_var_elf = yes; then |
1981 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" | 1930 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
1982 AC_DEFINE(HAVE_ELF, 1, | 1931 AC_DEFINE(HAVE_ELF, 1, |
1983 [Define if ELF support should be included.]) | 1932 [Define if ELF support should be included.]) |
1984 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | 1933 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
1985 if test "$plugins" = "yes"; then | 1934 if test "$plugins" = "yes"; then |
1986 OLD_LIBS="-ldl $OLD_LIBS" | 1935 AC_SEARCH_LIBS(dlopen, dl) |
1987 fi | 1936 fi |
1988 fi | 1937 fi |
1989 CFLAGS=$OLD_CFLAGS | 1938 |
1990 LDFLAGS=$OLD_LDFLAGS | 1939 # Add macho support to GDB, but only if BFD includes it. |
1991 LIBS=$OLD_LIBS | 1940 GDB_AC_CHECK_BFD([for Mach-O support in BFD], gdb_cv_var_macho, |
| 1941 [bfd_mach_o_lookup_command (NULL, 0, NULL)], mach-o.h) |
| 1942 if test $gdb_cv_var_macho = yes; then |
| 1943 CONFIG_OBS="$CONFIG_OBS machoread.o" |
| 1944 fi |
| 1945 |
| 1946 # Add SOM support to GDB, but only if BFD includes it. |
| 1947 GDB_AC_CHECK_BFD([for SOM support in BFD], gdb_cv_var_som, |
| 1948 [bfd_som_attach_aux_hdr (NULL, 0, NULL)], som.h) |
| 1949 if test $gdb_cv_var_som = yes; then |
| 1950 CONFIG_OBS="$CONFIG_OBS somread.o" |
| 1951 fi |
1992 | 1952 |
1993 # Add any host-specific objects to GDB. | 1953 # Add any host-specific objects to GDB. |
1994 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | 1954 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" |
1995 | 1955 |
| 1956 # If building on ELF, look for lzma support for embedded compressed debug info. |
| 1957 if test $gdb_cv_var_elf = yes; then |
| 1958 AC_ARG_WITH(lzma, |
| 1959 AS_HELP_STRING([--with-lzma], [support lzma compression (auto/yes/no)]), |
| 1960 [], [with_lzma=auto]) |
| 1961 AC_MSG_CHECKING([whether to use lzma]) |
| 1962 AC_MSG_RESULT([$with_lzma]) |
| 1963 |
| 1964 if test "${with_lzma}" != no; then |
| 1965 AC_LIB_HAVE_LINKFLAGS([lzma], [], [#include "lzma.h"], |
| 1966 [lzma_index_iter iter; |
| 1967 lzma_index_iter_init (&iter, 0); |
| 1968 lzma_mf_is_supported (LZMA_MF_HC3);]) |
| 1969 if test "$HAVE_LIBLZMA" != yes; then |
| 1970 if test "$with_lzma" = yes; then |
| 1971 AC_MSG_ERROR([missing liblzma for --with-lzma]) |
| 1972 fi |
| 1973 fi |
| 1974 fi |
| 1975 fi |
| 1976 |
1996 LIBGUI="../libgui/src/libgui.a" | 1977 LIBGUI="../libgui/src/libgui.a" |
1997 GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | 1978 GUI_CFLAGS_X="-I${srcdir}/../libgui/src" |
1998 AC_SUBST(LIBGUI) | 1979 AC_SUBST(LIBGUI) |
1999 AC_SUBST(GUI_CFLAGS_X) | 1980 AC_SUBST(GUI_CFLAGS_X) |
2000 | 1981 |
2001 WIN32LDAPP= | 1982 WIN32LDAPP= |
2002 AC_SUBST(WIN32LIBS) | 1983 AC_SUBST(WIN32LIBS) |
2003 AC_SUBST(WIN32LDAPP) | 1984 AC_SUBST(WIN32LDAPP) |
2004 | 1985 |
2005 case "${host}" in | 1986 case "${host}" in |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2239 AC_MSG_RESULT(no) | 2220 AC_MSG_RESULT(no) |
2240 fi | 2221 fi |
2241 fi | 2222 fi |
2242 | 2223 |
2243 # If the user explicitly request the gdbserver to be built, verify that | 2224 # If the user explicitly request the gdbserver to be built, verify that |
2244 # we were in fact able to enable it. | 2225 # we were in fact able to enable it. |
2245 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | 2226 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then |
2246 AC_MSG_ERROR(Automatic gdbserver build is not supported for this configuration
) | 2227 AC_MSG_ERROR(Automatic gdbserver build is not supported for this configuration
) |
2247 fi | 2228 fi |
2248 | 2229 |
| 2230 # Check for babeltrace and babeltrace-ctf |
| 2231 AC_ARG_WITH(babeltrace, |
| 2232 AC_HELP_STRING([--with-babeltrace], [include babeltrace support (auto/yes/no)]
), |
| 2233 [], [with_babeltrace=auto]) |
| 2234 AC_MSG_CHECKING([whether to use babeltrace]) |
| 2235 AC_MSG_RESULT([$with_babeltrace]) |
| 2236 |
| 2237 if test "x$with_babeltrace" = "xno"; then |
| 2238 AC_MSG_WARN([babletrace support disabled; GDB is unable to read CTF data.]) |
| 2239 else |
| 2240 # Append -Werror to CFLAGS so that configure can catch the warning |
| 2241 # "assignment from incompatible pointer type", which is related to |
| 2242 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works |
| 2243 # in GDB, while babeltrace 1.0.3 is broken. |
| 2244 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be |
| 2245 # safe to save and restore CFLAGS here. |
| 2246 saved_CFLAGS=$CFLAGS |
| 2247 CFLAGS="$CFLAGS -Werror" |
| 2248 AC_LIB_HAVE_LINKFLAGS([babeltrace], [babeltrace-ctf], |
| 2249 [#include <babeltrace/babeltrace.h> |
| 2250 #include <babeltrace/ctf/events.h> |
| 2251 #include <babeltrace/ctf/iterator.h>], |
| 2252 [struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_i
ter (NULL)); |
| 2253 struct bt_ctf_event *event = NULL; |
| 2254 const struct bt_definition *scope; |
| 2255 |
| 2256 scope = bt_ctf_get_top_level_scope (event, |
| 2257 BT_STREAM_EVENT_HEADE
R); |
| 2258 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")
); |
| 2259 ]) |
| 2260 CFLAGS=$saved_CFLAGS |
| 2261 |
| 2262 if test "$HAVE_LIBBABELTRACE" != yes; then |
| 2263 if test "$with_babeltrace" = yes; then |
| 2264 AC_MSG_ERROR([babeltrace is missing or unusable]) |
| 2265 else |
| 2266 AC_MSG_WARN([babeltrace is missing or unusable; GDB is unable to read CTF
data.]) |
| 2267 fi |
| 2268 fi |
| 2269 fi |
| 2270 |
2249 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link | 2271 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2250 # to an empty version. | 2272 # to an empty version. |
2251 | 2273 |
2252 files= | 2274 files= |
2253 links= | 2275 links= |
2254 | 2276 |
2255 rm -f nm.h | 2277 rm -f nm.h |
2256 if test "${nativefile}" != ""; then | 2278 if test "${nativefile}" != ""; then |
2257 case "${nativefile}" in | 2279 case "${nativefile}" in |
2258 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | 2280 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; |
2259 * ) GDB_NM_FILE="${nativefile}" | 2281 * ) GDB_NM_FILE="${nativefile}" |
2260 esac | 2282 esac |
2261 files="${files} ${GDB_NM_FILE}" | 2283 files="${files} ${GDB_NM_FILE}" |
2262 links="${links} nm.h" | 2284 links="${links} nm.h" |
2263 AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}", [nativefile]) | 2285 AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}", [nativefile]) |
2264 fi | 2286 fi |
2265 AC_SUBST(GDB_NM_FILE) | 2287 AC_SUBST(GDB_NM_FILE) |
2266 | 2288 |
2267 AC_LINK_FILES($files, $links) | 2289 AC_LINK_FILES($files, $links) |
2268 | 2290 |
2269 dnl Check for exe extension set on certain hosts (e.g. Win32) | 2291 dnl Check for exe extension set on certain hosts (e.g. Win32) |
2270 AC_EXEEXT | 2292 AC_EXEEXT |
2271 | 2293 |
2272 dnl Detect the character set used by this host. | 2294 dnl Detect the character set used by this host. |
2273 dnl At the moment, we just assume it's UTF-8. | 2295 dnl At the moment, we just assume it's UTF-8. |
2274 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8", | 2296 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8", |
2275 [Define to be a string naming the default host character set.]) | 2297 [Define to be a string naming the default host character set.]) |
2276 | 2298 |
| 2299 # Undo the $ec_script escaping suitable for Makefile. |
| 2300 transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'` |
| 2301 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` |
| 2302 if test "x$GDB_TRANSFORM_NAME" = x; then |
| 2303 GDB_TRANSFORM_NAME=gdb |
| 2304 fi |
| 2305 AC_SUBST(GDB_TRANSFORM_NAME) |
| 2306 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` |
| 2307 if test "x$GCORE_TRANSFORM_NAME" = x; then |
| 2308 GCORE_TRANSFORM_NAME=gcore |
| 2309 fi |
| 2310 AC_SUBST(GCORE_TRANSFORM_NAME) |
| 2311 AC_CONFIG_FILES([gcore], [chmod +x gcore]) |
| 2312 |
2277 AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile, | 2313 AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile, |
2278 [ | 2314 [ |
2279 case x$CONFIG_HEADERS in | 2315 case x$CONFIG_HEADERS in |
2280 xconfig.h:config.in) | 2316 xconfig.h:config.in) |
2281 echo > stamp-h ;; | 2317 echo > stamp-h ;; |
2282 esac | 2318 esac |
2283 ]) | 2319 ]) |
2284 | 2320 |
2285 exit 0 | 2321 exit 0 |
OLD | NEW |