diff options
author | Doug Evans <dje@google.com> | 2011-05-09 21:49:54 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2011-05-09 21:49:54 +0000 |
commit | f6d55b87b1ec29286db1ee4ea415fa7ff21989fa (patch) | |
tree | 5e3a482a7a1fdd22d736366a55ddaadd94000259 /gdb/configure | |
parent | 100ba5663cabeeb4c710c7df6c478ab3f973cb38 (diff) | |
download | gdb-f6d55b87b1ec29286db1ee4ea415fa7ff21989fa.tar.gz |
* NEWS: Mention --with-iconv-bin.
* configure.ac: New option --with-iconv-bin.
* configure: Regenerate.
* config.in: Regenerate.
* defs.h (relocate_gdb_directory): Declare.
* main.c (relocate_gdb_directory): Renamed from relocate_directory,
removed progname parameter, and exported. All callers updated.
* charset.c (find_charset_names): Use --with-iconv-bin if specified.
doc/
* gdb.texinfo (Requirements): Fix typo. Mention --with-iconv-bin.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index 92818a0a0e0..bf6ac019139 100755 --- a/gdb/configure +++ b/gdb/configure @@ -961,6 +961,7 @@ with_pkgversion with_bugurl with_zlib with_libiconv_prefix +with_iconv_bin with_system_readline with_expat with_gnu_ld @@ -1660,6 +1661,7 @@ Optional Packages: --with-zlib include zlib support (auto/yes/no) default=auto --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --with-iconv-bin=PATH specify where to find the iconv program --with-system-readline use installed readline library --with-expat include expat support (auto/yes/no) --with-gnu-ld assume the C compiler uses GNU ld default=no @@ -9523,6 +9525,57 @@ _ACEOF fi +# GDB may fork/exec the iconv program to get the list of supported character +# sets. Allow the user to specify where to find it. +# There are several factors affecting the choice of option name: +# - There is already --with-libiconv-prefix but we can't use it, it specifies +# the build-time location of libiconv files. +# - The program we need to find is iconv, which comes with glibc. The user +# doesn't necessarily have libiconv installed. Therefore naming this +# --with-libiconv-foo feels wrong. +# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is +# defined to work on directories not files (though it really doesn't know +# the difference). +# - Calling this --with-iconv-prefix is perceived to cause too much confusion +# with --with-libiconv-prefix. +# Putting these together is why the option name is --with-iconv-bin. + + +# Check whether --with-iconv-bin was given. +if test "${with_iconv_bin+set}" = set; then : + withval=$with_iconv_bin; iconv_bin="${withval}" + +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN "${iconv_bin}" +_ACEOF + + + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${iconv_bin} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac + +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN_RELOCATABLE $value +_ACEOF + + + +fi + + # On alpha-osf, it appears that libtermcap and libcurses are not compatible. # There is a very specific comment in /usr/include/curses.h explaining that # termcap routines built into libcurses must not be used. |