diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-09-01 18:56:45 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-09-01 18:56:45 +0000 |
commit | bb0116a433af6f2a1bb99b628a863be46446cea0 (patch) | |
tree | 4f115327f70f296c49b1c121ce62c7a853ee5df2 /gdb/gdbserver/configure | |
parent | 0482b03b6a590ca2540b32cc8db2526172bd8e34 (diff) | |
download | gdb-bb0116a433af6f2a1bb99b628a863be46446cea0.zip gdb-bb0116a433af6f2a1bb99b628a863be46446cea0.tar.gz gdb-bb0116a433af6f2a1bb99b628a863be46446cea0.tar.bz2 |
Import vsnprintf from libiberty if not available.
vasprintf and vsnprintf are not available on LynxOS, at least not on
version 4.0.0. This patch updates the configury to import them from
libiberty if not available out of the box.
gdbserver/
* Makefile.in (vasprintf.o, vsnprintf.o): New rules.
* configure.ac: Add check for vasprintf and vsnprintf.
* configure, config.in: Regenerate.
* server.h (vasprintf, vsnprintf): Add conditional declarations.
Diffstat (limited to 'gdb/gdbserver/configure')
-rwxr-xr-x | gdb/gdbserver/configure | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 05a4eba..957cbc8 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -4014,12 +4014,14 @@ _ACEOF fi done -for ac_func in memmem +for ac_func in memmem vasprintf vsnprintf do : - ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" -if test "x$ac_cv_func_memmem" = x""yes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_MEMMEM 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else @@ -4274,6 +4276,26 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMMEM $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VASPRINTF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VSNPRINTF $ac_have_decl +_ACEOF ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |