From 4d0ab930b2e1a7d0b14a5441c861c942e4e4fadd Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 15 Feb 1999 20:59:54 +0000 Subject: [PATCH] (WFLAGS): add `-O' to catch unitialized variables and such (gethostname, mkstemp, getusershell, inet_aton): more tests git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5361 ec53bebd-3082-4978-b11e-865c3cabbd6b --- configure.in | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index ff970ce50..b0b7f27e9 100644 --- a/configure.in +++ b/configure.in @@ -40,7 +40,7 @@ AM_PROG_LIBTOOL if test "$GCC" = "yes"; then # -Wcast-align doesn't work well on alpha osf/1 - WFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs" + WFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -O" WFLAGS_NOUNUSED="-Wno-unused" fi AC_SUBST(WFLAGS) @@ -423,6 +423,40 @@ AC_BROKEN(strcasecmp strncasecmp strdup strerror strftime strlwr strnlen) AC_BROKEN(strsep strtok_r strupr swab unsetenv verr verrx vsyslog) AC_BROKEN(vwarn vwarnx warn warnx writev) +if test "$ac_cv_func_gethostname" = "yes"; then +AC_NEED_PROTO([ +#include ], +gethostname) +fi + +if test "$ac_cv_func_mkstemp" = "yes"; then +AC_NEED_PROTO([ +#include ], +mkstemp) +fi + +AC_NEED_PROTO([ +#include +], +getusershell) + +if test "$ac_cv_func_inet_aton" = "yes"; then +AC_NEED_PROTO([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif], +inet_aton) +fi + AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [