/* Define to 1 if you have the `strtol' function. */
#undef HAVE_STRTOL
-/* Define to 1 if you have the `sysinfo' function. */
-#undef HAVE_SYSINFO
+/* Use sysinfo */
+#undef HAVE_SYSINFO_FCT
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
MSGFMT
GETTEXT_MACRO_VERSION
USE_NLS
+SYSINFO_FCT_FALSE
+SYSINFO_FCT_TRUE
LIBOBJS
EGREP
GREP
fi
-for ac_func in gettimeofday memmove socket strdup strtol sysinfo
+for ac_func in gettimeofday memmove socket strdup strtol
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
done
+SYSINFO_FCT=
+ac_fn_c_check_func "$LINENO" "sysinfo" "ac_cv_func_sysinfo"
+if test "x$ac_cv_func_sysinfo" = xyes; then :
+ SYSINFO_FCT='1'
+$as_echo "#define HAVE_SYSINFO_FCT 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"sysinfo function not present\"" >&5
+$as_echo "$as_me: WARNING: \"sysinfo function not present\"" >&2;}
+fi
+
+ if test -n "$SYSINFO_FCT"; then
+ SYSINFO_FCT_TRUE=
+ SYSINFO_FCT_FALSE='#'
+else
+ SYSINFO_FCT_TRUE='#'
+ SYSINFO_FCT_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${SYSINFO_FCT_TRUE}" && test -z "${SYSINFO_FCT_FALSE}"; then
+ as_fn_error $? "conditional \"SYSINFO_FCT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then
as_fn_error $? "conditional \"GTK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
-AC_CHECK_FUNCS([gettimeofday memmove socket strdup strtol sysinfo])
+AC_CHECK_FUNCS([gettimeofday memmove socket strdup strtol])
+
+SYSINFO_FCT=
+AC_CHECK_FUNC(sysinfo,
+ [SYSINFO_FCT='1' AC_DEFINE([HAVE_SYSINFO_FCT],[1],[Use sysinfo])],
+ [AC_MSG_WARN("sysinfo function not present")])
+AM_CONDITIONAL(SYSINFO_FCT, test -n "$SYSINFO_FCT")
AM_GNU_GETTEXT_VERSION([0.16])
AM_GNU_GETTEXT([external])
if GTOP
AM_CPPFLAGS += $(GTOP_CFLAGS)
LIBS += $(GTOP_LIBS)
-psensor_server_SOURCES += sysinfo.h sysinfo.c
AM_LDFLAGS = -Wl,--as-needed
+
+if SYSINFO_FCT
+psensor_server_SOURCES += sysinfo.h sysinfo.c
endif
+endif
+
+
+
dist_man_MANS = psensor-server.1
bin_PROGRAMS = psensor-server$(EXEEXT)
@GTOP_TRUE@am__append_1 = $(GTOP_CFLAGS)
@GTOP_TRUE@am__append_2 = $(GTOP_LIBS)
-@GTOP_TRUE@am__append_3 = sysinfo.h sysinfo.c
+@GTOP_TRUE@@SYSINFO_FCT_TRUE@am__append_3 = sysinfo.h sysinfo.c
subdir = src/server
DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
PROGRAMS = $(bin_PROGRAMS)
am__psensor_server_SOURCES_DIST = server.c server.h sysinfo.h \
sysinfo.c
-@GTOP_TRUE@am__objects_1 = sysinfo.$(OBJEXT)
+@GTOP_TRUE@@SYSINFO_FCT_TRUE@am__objects_1 = sysinfo.$(OBJEXT)
am_psensor_server_OBJECTS = server.$(OBJEXT) $(am__objects_1)
psensor_server_OBJECTS = $(am_psensor_server_OBJECTS)
psensor_server_LDADD = $(LDADD)