[Nagiosplug-checkins] CVS: nagiosplug acconfig.h,1.4,1.5 configure.in,1.21,1.22

Karl DeBisschop kdebisschop at users.sourceforge.net
Thu Nov 7 23:21:03 CET 2002


Update of /cvsroot/nagiosplug/nagiosplug
In directory usw-pr-cvs1:/tmp/cvs-serv12419

Modified Files:
	acconfig.h configure.in 
Log Message:
patches required to build on solaris with asprintf and gettimeofday

Index: acconfig.h
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/acconfig.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** acconfig.h	30 Oct 2002 05:07:29 -0000	1.4
--- acconfig.h	8 Nov 2002 07:20:05 -0000	1.5
***************
*** 2,14 ****
--- 2,19 ----
  #undef COMPILER_SUPPORTS_LL
  #undef DF_COMMAND
+ #undef HAVE_ASPRINTF
  #undef HAVE_C99_VSNPRINTF
  #undef HAVE_GETOPT_H
  #undef HAVE_GETOPT_LONG
+ #undef HAVE_GETTIMEOFDAY
  #undef HAVE_LONGLONG
  #undef HAVE_PROC_LOADAVG
  #undef HAVE_PROC_MEMINFO
  #undef HAVE_SSL
+ #undef HAVE_SNPRINTF
  #undef HAVE_SWAP
  #undef HAVE_VA_COPY
+ #undef HAVE_VASPRINTF
+ #undef HAVE_VSNPRINTF
  #undef NSLOOKUP_COMMAND
  #undef HOST_COMMAND

Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** configure.in	7 Nov 2002 07:06:34 -0000	1.21
--- configure.in	8 Nov 2002 07:20:05 -0000	1.22
***************
*** 13,27 ****
  AC_PREFIX_DEFAULT(/usr/local/nagios)
  
- #AC_DEFUN(AC_HAVE_DECL,
- #[
- # AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
- #    AC_TRY_COMPILE([$2],[int i = (int)$1],
- #        ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)])
- # if test x"$ac_cv_have_$1_decl" = x"yes"; then
- #    AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available])
- # fi
- #])
- 
- 
  dnl Figure out how to invoke "install" and what install options to use.
  
--- 13,16 ----
***************
*** 339,342 ****
--- 328,353 ----
  fi
  
+ #AC_HAVE_DECL(asprintf, [#include <stdio.h>])
+ #AC_HAVE_DECL(vasprintf, [#include <stdio.h>])
+ #AC_HAVE_DECL(vsnprintf, [#include <stdio.h>])
+ #AC_HAVE_DECL(snprintf, [#include <stdio.h>])
+ 
+ AC_CHECK_FUNC(snprintf,
+               AC_DEFINE(HAVE_SNPRINTF,1,[Define if snprintf is present]),
+               LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+ AC_CHECK_FUNC(vsnprintf,
+               AC_DEFINE(HAVE_VSNPRINTF,1,[Define if vsnprintf is present]),
+               LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+ AC_CHECK_FUNC(vasprintf,
+               AC_DEFINE(HAVE_VASPRINTF,1,[Define if vasprintf is present]),
+               LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+ AC_CHECK_FUNC(asprintf,
+               AC_DEFINE(HAVE_ASPRINTF,1,[Define if asprintf is present]),
+               LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+ 
+ if test x"$ac_cv_HAVE_SNPRINTF" = x"no" -o x"$ac_cv_HAVE_VSNPRINTF" = x"no" -o x"$ac_cv_HAVE_VASPRINTF" = x"no" -o x"$ac_cv_HAVE_ASPRINTF" = x"no"; then
+   LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a"
+ fi
+ 
  dnl We used to not do long options unless a compatible lib was found
  dnl Now we provide code and make libgetopt if native is not suitable
***************
*** 357,377 ****
  AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
  
! #AC_HAVE_DECL(asprintf, [#include <stdio.h>])
! #AC_HAVE_DECL(vasprintf, [#include <stdio.h>])
! #AC_HAVE_DECL(vsnprintf, [#include <stdio.h>])
! #AC_HAVE_DECL(snprintf, [#include <stdio.h>])
! 
! AC_CHECK_FUNC(snprintf,AC_DEFINE(HAVE_SNPRINTF,1,[Define if snprintf is present]))
! AC_CHECK_FUNC(vsnprintf,AC_DEFINE(HAVE_VSNPRINTF,1,[Define if vsnprintf is present]))
! AC_CHECK_FUNC(vasprintf,AC_DEFINE(HAVE_VASPRINTF,1,[Define if vasprintf is present]))
! AC_CHECK_FUNC(asprintf,AC_DEFINE(HAVE_ASPRINTF,1,[Define if asprintf is present]))
! 
! if test x"$ac_cv_HAVE_SNPRINTF" = x"no" -o x"$ac_cv_HAVE_VSNPRINTF" = x"no" -o x"$ac_cv_HAVE_VASPRINTF" = x"no" -o x"$ac_cv_HAVE_ASPRINTF" = x"no"; then
!   LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a"
! fi
! 
  
  dnl Checks for library functions.
! AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul gettimeofday)
  
  AC_MSG_CHECKING(for type of socket size)
--- 368,381 ----
  AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
  
! AC_TRY_COMPILE([#include <sys/time.h>],
!                [struct timeval *foo;],
!                [AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])])
! 
! AC_TRY_COMPILE([#include <sys/time.h>],
!                [gettimeofday(NULL, NULL);],
!                AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]))
  
  dnl Checks for library functions.
! AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul)
  
  AC_MSG_CHECKING(for type of socket size)





More information about the Commits mailing list