From 04472528403b0c43456e46b3fda3669c02949ee2 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Wed, 15 Jul 1998 23:47:31 +0000 Subject: Add `need-declaration.m4'. * Makefile.am (MACROS): Add `need-declaration.m4'. * gnome-support.m4 (AC_REPLACE_FUNCS): Add memmove, strtod, strtol, strtoul. (GCC_NEED_DECLARATIONS): New check. Check whether `gethostname' needs to be declared. * need-declaration.m4: New file. Stolen from EGCS. svn path=/trunk/; revision=281 --- macros/gnome-support.m4 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'macros/gnome-support.m4') diff --git a/macros/gnome-support.m4 b/macros/gnome-support.m4 index 738c175a41..7d5fdbe1b1 100644 --- a/macros/gnome-support.m4 +++ b/macros/gnome-support.m4 @@ -78,10 +78,15 @@ AC_DEFUN([GNOME_SUPPORT_CHECKS],[ LIBOBJS="$LIBOBJS easy-vsnprintf.o", LIBOBJS="$LIBOBJS vsnprintf.o")]) - AC_REPLACE_FUNCS(mkstemp scandir strcasecmp strerror strndup strnlen) - AC_REPLACE_FUNCS(strtok_r vasprintf) + AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen) + AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf) - if test "$LIBOBJS" != ""; then + # see if we need to declare some functions. Solaris is notorious for + # putting functions into the `libc' but not listing them in the headers + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h) + GCC_NEED_DECLARATIONS(gethostname) + + if test "$LIBOBJS$gcc_need_declarations" != ""; then need_gnome_support=yes fi # Turn our LIBOBJS into libtool objects. This is gross, but it -- cgit