ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
install-data-hook:
- $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \
- $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \
- mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf
+ $(MKDIR_P) $(DESTDIR)$(sysconfdir)
+if IS_CROSSCOMPILED
+ if [ ! -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
+ then cp -fv $(srcdir)/cfg/vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf; \
+ fi
+else
+ $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf.new
+ if [ -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
+ then cp -fv $(DESTDIR)$(sysconfdir)/vnstat.conf vnstat.conf.old; \
+ fi
+ cp -fv vnstat.conf.new $(DESTDIR)$(sysconfdir)/vnstat.conf
+endif
@echo
@echo "============================================================================"
@echo " Note: No service file has been installed for starting the daemon"
@echo
clean-local:
- -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc*
+ -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new
ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
install-data-hook:
- $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \
- $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \
- mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf
+ $(MKDIR_P) $(DESTDIR)$(sysconfdir)
+@IS_CROSSCOMPILED_TRUE@ if [ ! -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
+@IS_CROSSCOMPILED_TRUE@ then cp -fv $(srcdir)/cfg/vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf; \
+@IS_CROSSCOMPILED_TRUE@ fi
+@IS_CROSSCOMPILED_FALSE@ $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf.new
+@IS_CROSSCOMPILED_FALSE@ if [ -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
+@IS_CROSSCOMPILED_FALSE@ then cp -fv $(DESTDIR)$(sysconfdir)/vnstat.conf vnstat.conf.old; \
+@IS_CROSSCOMPILED_FALSE@ fi
+@IS_CROSSCOMPILED_FALSE@ cp -fv vnstat.conf.new $(DESTDIR)$(sysconfdir)/vnstat.conf
@echo
@echo "============================================================================"
@echo " Note: No service file has been installed for starting the daemon"
@echo
clean-local:
- -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc*
+ -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+IS_CROSSCOMPILED_FALSE
+IS_CROSSCOMPILED_TRUE
EGREP
GREP
CPP
done
+# Check if being cross-compiled
+ if test "$CHOST" != "$CBUILD"; then
+ IS_CROSSCOMPILED_TRUE=
+ IS_CROSSCOMPILED_FALSE='#'
+else
+ IS_CROSSCOMPILED_TRUE='#'
+ IS_CROSSCOMPILED_FALSE=
+fi
+
+
# Checks for typedefs, structures, and compiler characteristics.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
fi
-for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_malloc_0_nonnull=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
-
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" malloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
-
-fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
if ${ac_cv_header_time+:} false; then :
fi
-for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
-$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
-if ${ac_cv_func_realloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_realloc_0_nonnull=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *realloc ();
-#endif
-
-int
-main ()
-{
-return ! realloc (0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_realloc_0_nonnull=yes
-else
- ac_cv_func_realloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
-if test $ac_cv_func_realloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" realloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define realloc rpl_realloc" >>confdefs.h
-
-fi
-
-
for ac_func in dup2 localtime_r memset mkdir pow rmdir setlocale strcasecmp strchr strdup strerror strncasecmp strstr strtol strtoul strtoull tzset mbstowcs wcswidth
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
as_fn_error $? "conditional \"HAVE_CHECK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${IS_CROSSCOMPILED_TRUE}" && test -z "${IS_CROSSCOMPILED_FALSE}"; then
+ as_fn_error $? "conditional \"IS_CROSSCOMPILED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC
-
/* Define to 1 if you have the `mbstowcs' function. */
#undef HAVE_MBSTOWCS
/* Define to 1 if you have the `pow' function. */
#undef HAVE_POW
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
- and to 0 otherwise. */
-#undef HAVE_REALLOC
-
/* Define to 1 if you have the `rmdir' function. */
#undef HAVE_RMDIR
such a type exists and the standard includes do not define it. */
#undef int32_t
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t