From 40c0443167d0b9a3ed065fd0a998b49a5e2c1b2e Mon Sep 17 00:00:00 2001 From: "Barak A. Pearlmutter" Date: Sun, 21 Aug 2011 15:03:11 +0200 Subject: [PATCH] Update configure.ac and Makefile.am per autotools Tweak configure.ac and Makefile.am per autoreconf instructions. libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT' Accept autoupdate modifications. Manually integrate portions of autoscan configure.scan. --- Makefile.am | 3 +-- configure.ac | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Makefile.am b/Makefile.am index af22243..6993205 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ SUBDIRS = src bindings -dist-hook: - find $(distdir) -type d -name '.svn' | xargs rm -rf +ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index a4eb289..43a7e9c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,12 @@ -AC_INIT(liboping, 1.6.1) -AC_CONFIG_SRCDIR(src/liboping.c) -AC_CONFIG_HEADERS(src/config.h) -AM_INIT_AUTOMAKE(dist-bzip2) -AC_LANG(C) +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) +AC_INIT([liboping],[1.6.1]) +AC_CONFIG_SRCDIR([src/liboping.c]) +AC_CONFIG_HEADERS([src/config.h]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([dist-bzip2]) +AC_LANG([C]) AC_PREFIX_DEFAULT("/opt/oping") @@ -38,26 +42,13 @@ then fi AC_ARG_VAR(PERL, [Perl interpreter command]) -# # configure libtool -# -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL -#AC_PROG_RANLIB +LT_INIT([dlopen]) -# # Checks for header files. -# AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(math.h) -AC_CHECK_HEADERS(fcntl.h) -AC_CHECK_HEADERS(sys/types.h) -AC_CHECK_HEADERS(sys/stat.h) AC_HEADER_TIME -AC_CHECK_HEADERS(sys/socket.h) -AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(signal.h) +AC_CHECK_HEADERS([math.h signal.h fcntl.h inttypes.h netdb.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) # This sucks, but what can I do..? AC_CHECK_HEADERS(netinet/in_systm.h, [], [], @@ -162,6 +153,14 @@ AC_CHECK_HEADERS(netinet/icmp6.h, [], [], #endif ]) +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT8_T + socket_needs_socket="no" AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, @@ -232,4 +231,10 @@ AC_SUBST(PERL_BINDINGS_OPTIONS) AC_SUBST(BINDINGS) -AC_OUTPUT(Makefile src/Makefile src/mans/Makefile bindings/Makefile) +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_STRERROR_R +AC_CHECK_FUNCS([gettimeofday memset modf select socket sqrt strcasecmp strdup strerror strncasecmp strtoul]) + +AC_CONFIG_FILES([Makefile src/Makefile src/mans/Makefile bindings/Makefile]) +AC_OUTPUT -- 2.11.0