dnl tell automake the this script is for rrdtool
dnl Minimum Autoconf version required.
-AC_PREREQ([2.69])
+AC_PREREQ(2.59)
dnl the official version number is
dnl a.b.c
-AC_INIT([rrdtool],[m4_esyscmd(tr -d '\n' < VERSION)])
+AC_INIT([rrdtool],m4_esyscmd([tr -d '\n' < VERSION]))
AC_CONFIG_AUX_DIR(conftools)
dnl for testing a numberical version number comes handy
AC_PROG_CPP
AC_PROG_CC
AM_PROG_CC_C_O
-LT_INIT
+AC_PROG_LIBTOOL
dnl Try to detect/use GNU features
CFLAGS="$CFLAGS -D_GNU_SOURCE"
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(langinfo.h stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h grp.h pwd.h stdarg.h)
+AC_CHECK_HEADERS(langinfo.h stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h grp.h pwd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl finite is BSD, isfinite is C99, so prefer the latter
AC_CACHE_CHECK([whether isfinite is broken],[ac_cv_have_broken_isfinite],[
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+AC_TRY_RUN([
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#endif
#endif
return 0;
-}]])],[ac_cv_have_broken_isfinite=no],[ac_cv_have_broken_isfinite=yes],[
+}],[ac_cv_have_broken_isfinite=no],[ac_cv_have_broken_isfinite=yes],[
case "${target}" in
hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;;
*-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
dnl defined by libc to not run into linker resolve trouble
AC_CACHE_CHECK([for opterr], rd_cv_var_int_opterr,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[extern int opterr; opterr = 1;]])],[rd_cv_var_int_opterr=yes],[rd_cv_var_int_opterr=no])])
+[AC_TRY_LINK([#include <unistd.h>],
+ [extern int opterr; opterr = 1;],
+ [rd_cv_var_int_opterr=yes],
+ [rd_cv_var_int_opterr=no])])
if test x"$rd_cv_var_int_opterr" = x"yes"; then
AC_DEFINE(HAVE_INT_OPTERR, 1, [Define to 1 if you have the global variable 'int opterr'.])
fi
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
- AC_CONFIG_FILES([etc/rrdcached.socket etc/rrdcached.service])
-AC_OUTPUT
+ AC_OUTPUT([etc/rrdcached.socket etc/rrdcached.service])
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])