2003-01-04 08:43:24 +08:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2020-01-01 14:20:01 +08:00
|
|
|
# Copyright 2002-2020 Free Software Foundation, Inc.
|
2003-01-04 08:43:24 +08:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-08-24 01:58:44 +08:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2003-01-04 08:43:24 +08:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-24 01:58:44 +08:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-01-04 08:43:24 +08:00
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
AC_INIT(gdb.base)
|
|
|
|
|
2003-01-04 08:43:24 +08:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2006-06-21 21:57:21 +08:00
|
|
|
ACX_NONCANONICAL_TARGET
|
|
|
|
|
2014-12-05 19:56:19 +08:00
|
|
|
# Enable gdbtk.
|
|
|
|
AC_ARG_ENABLE(gdbtk,
|
|
|
|
[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
|
|
|
|
[if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then
|
|
|
|
enable_gdbtk=yes
|
|
|
|
else
|
|
|
|
enable_gdbtk=no
|
|
|
|
fi])
|
|
|
|
# We unconditionally disable gdbtk tests on selected platforms.
|
|
|
|
case $host_os in
|
|
|
|
go32* | windows*)
|
|
|
|
enable_gdbtk=no ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Add gdbtk tests when appropriate.
|
|
|
|
if test $enable_gdbtk = yes; then
|
|
|
|
AC_CONFIG_SUBDIRS(gdb.gdbtk)
|
|
|
|
fi
|
|
|
|
|
2003-01-04 08:43:24 +08:00
|
|
|
# Enable shared libraries.
|
1999-04-16 09:35:26 +08:00
|
|
|
AC_ARG_ENABLE(shared,
|
2003-01-04 08:43:24 +08:00
|
|
|
[ --enable-shared build shared libraries [deault=yes]],,
|
|
|
|
enable_shared=yes)
|
|
|
|
|
|
|
|
# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
|
|
|
|
# such that we can find the shared libraries in the build tree.
|
|
|
|
if test $enable_shared = no; then
|
|
|
|
# The variable `RPATH_ENVVAR' itself is not likely to be used on any
|
|
|
|
# platform.
|
|
|
|
RPATH_ENVVAR=RPATH_ENVVAR
|
|
|
|
else
|
|
|
|
# The variable `LD_LIBRARY_PATH' is used on most platforms.
|
|
|
|
RPATH_ENVVAR=LD_LIBRARY_PATH
|
|
|
|
# The following exceptions are taken from Libtool 1.4.3.
|
|
|
|
case $host_os in
|
|
|
|
aix*)
|
|
|
|
if test $host_cpu != ia64; then
|
|
|
|
RPATH_ENVVAR=LIBPATH
|
|
|
|
fi ;;
|
|
|
|
darwin* | rhapsody*)
|
|
|
|
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
1999-04-16 09:35:26 +08:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
AC_SUBST(RPATH_ENVVAR)
|
2000-02-07 08:19:45 +08:00
|
|
|
|
* configure.in: Call AC_CONFIG_HEADER. Don't call
AC_CONFIG_SUBDIRS on gdb.arch, gdb.asm, gdb.base gdb.c++ gdb.java,
gdb.disasm, gdb.mi, gdb.threads and gdb.trace. Call
AC_CHECK_HEADERS on pthread.h. Put Makefiles in the
aforementioned directories in the AC_OUPUT call.
* config.hin: New file.
* gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
gdb.mi/mi1-pthreads.exp, gdb.threads/gcore-thread.exp,
gdb.threads/killed.exp, gdb.threads/print-threads.exp,
gdb.threads/pthreads.exp, gdb.threads/schedlock.exp: Make sure we
pass -I$objdir instead of -I$objdir/$subdir in compilation.
* gdb.arch/configure.in, gdb.arch/configure, gdb.asm/configure.in,
gdb.asm/configure, gdb.base/configure.in, gdb.base/configure,
gdb.c++/configure.in, gdb.c++/configure, gdb.disasm/configure.in,
gdb.disasm/configure, gdb.java/configure.in, gdb.java/configure,
gdb.mi/configure.in, gdb.mi/configure, gdb.mi/config.in,
gdb.threads/configure.in, gdb.threads/configure,
gdb.threads/config.in, gdb.trace/configure.in,
gdb.trace/configure: Removed.
2003-01-04 23:37:40 +08:00
|
|
|
AC_CHECK_HEADERS(pthread.h)
|
|
|
|
|
2000-11-18 00:37:48 +08:00
|
|
|
AC_EXEEXT
|
|
|
|
|
2014-08-21 01:55:54 +08:00
|
|
|
if test "${build}" = "${host}" -a "${host}" = "${target}"; then
|
|
|
|
case "${host}" in
|
|
|
|
*gnu*)
|
|
|
|
EXTRA_RULES=read1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
AC_SUBST(EXTRA_RULES)
|
|
|
|
|
2015-02-17 23:41:16 +08:00
|
|
|
# Transform the name of some programs and generate the lib/pdtrace
|
|
|
|
# test tool.
|
|
|
|
AC_ARG_PROGRAM
|
2015-02-18 20:52:53 +08:00
|
|
|
GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
|
|
|
|
GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
|
|
|
|
GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
|
|
|
|
GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
|
2015-02-17 23:41:16 +08:00
|
|
|
AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
|
2016-02-09 22:01:58 +08:00
|
|
|
AC_CONFIG_FILES([Makefile])
|
2015-02-17 23:41:16 +08:00
|
|
|
|
2016-02-09 22:01:58 +08:00
|
|
|
AC_OUTPUT
|