From 6812d5ed157869d466058ad7383e1a94c3ead65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Thu, 24 Jan 2013 12:41:49 +0100 Subject: [PATCH] Modernize autotools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow compilation with last version of autotools - libtool 2.4.2 - m4 1.4.16 - autoconf 2.69 - automake 1.13.1 - make 3.82 Signed-off-by: Sébastien Luttringer --- Makefile.am | 2 ++ configure.ac | 75 ++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 74 --------------------------------------------- src/apps/Makefile.am | 2 +- src/func_tests/Makefile.am | 2 +- src/lib/Makefile.am | 2 +- src/testlib/Makefile.am | 2 +- 7 files changed, 81 insertions(+), 78 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in diff --git a/Makefile.am b/Makefile.am index 109f01d..2c9c8c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,6 +12,8 @@ EXTRA_DIST += ChangeLog AUTHORS COPYING COPYING.lib INSTALL \ # bin or src products may be required to generate stuff in test/ SUBDIRS = man bin src doc +ACLOCAL_AMFLAGS=-I m4 + # Libtool support LIBTOOL_DEPS = @LIBTOOL_DEPS@ libtool: $(LIBTOOL_DEPS) diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9af138b --- /dev/null +++ b/configure.ac @@ -0,0 +1,75 @@ +dnl -*-autoconf-*- + +dnl lksctp-tools: Autoconf script +dnl +dnl $Id: configure.in,v 1.1.1.2 2002/08/06 23:55:45 inaky Exp $ + +dnl (C) 2002 Intel Corporation +dnl Iñaky Pérez-González +dnl - Initial packaging + +dnl Package info +dnl (CONFIG_AUX_DIR is for putting stuff in $TOPSRCDIR/bin, so we +dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE, +dnl configure will fail ...) + +AC_INIT([lksctp-tools], [1.0.13]) +AC_CONFIG_AUX_DIR(bin) +AC_CONFIG_SRCDIR([src/apps/sctp_darn.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) +AC_REVISION($Revision: 1.1.1.2 $) +AM_INIT_AUTOMAKE +AM_SILENT_RULES([yes]) + +dnl Set defaults +dnl CFLAGS="$CFLAGS -g -Wall" + +dnl Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_ISC_POSIX + +dnl Checks for libraries. +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h]) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM +AC_C_VOLATILE + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MEMCMP +AC_FUNC_REALLOC +AC_FUNC_SELECT_ARGTYPES +AC_FUNC_SETVBUF_REVERSED +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([bzero gethostbyname gettimeofday memmove memset select socket strchr strerror strtol strtoul]) + +AC_CONFIG_FILES([lksctp-tools.spec + Makefile + bin/Makefile + man/Makefile + src/Makefile + src/apps/Makefile + src/func_tests/Makefile + src/include/Makefile + src/include/netinet/Makefile + src/lib/Makefile + src/testlib/Makefile + src/withsctp/Makefile + doc/Makefile]) +AC_OUTPUT diff --git a/configure.in b/configure.in deleted file mode 100644 index c43ed9d..0000000 --- a/configure.in +++ /dev/null @@ -1,74 +0,0 @@ -dnl -*-autoconf-*- - -dnl lksctp-tools: Autoconf script -dnl -dnl $Id: configure.in,v 1.1.1.2 2002/08/06 23:55:45 inaky Exp $ - -dnl (C) 2002 Intel Corporation -dnl Iñaky Pérez-González -dnl - Initial packaging - -dnl Package info -dnl (CONFIG_AUX_DIR is for putting stuff in $TOPSRCDIR/bin, so we -dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE, -dnl configure will fail ...) - -AC_INIT([src/apps/sctp_darn.c]) -AC_CONFIG_AUX_DIR(bin) -AM_INIT_AUTOMAKE(lksctp-tools,1.0.13) -AC_CONFIG_SRCDIR([config.h.in]) -AM_CONFIG_HEADER([config.h]) -AC_REVISION($Revision: 1.1.1.2 $) -AM_SILENT_RULES([yes]) - -dnl Set defaults -dnl CFLAGS="$CFLAGS -g -Wall" - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_ISC_POSIX - -dnl Checks for libraries. -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL -AC_SUBST(LIBTOOL_DEPS) - -dnl Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h]) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_STRUCT_TM -AC_C_VOLATILE - -# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_REALLOC -AC_FUNC_SELECT_ARGTYPES -AC_FUNC_SETVBUF_REVERSED -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([bzero gethostbyname gettimeofday memmove memset select socket strchr strerror strtol strtoul]) - -AC_CONFIG_FILES([lksctp-tools.spec - Makefile - bin/Makefile - man/Makefile - src/Makefile - src/apps/Makefile - src/func_tests/Makefile - src/include/Makefile - src/include/netinet/Makefile - src/lib/Makefile - src/testlib/Makefile - src/withsctp/Makefile - doc/Makefile]) -AC_OUTPUT diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am index c2e34e4..6d53e6d 100644 --- a/src/apps/Makefile.am +++ b/src/apps/Makefile.am @@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.rules include $(top_srcdir)/Makefile.dirs # General compilation flags -INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib +AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib AM_CFLAGS = -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes -Wimplicit-function-declaration AM_LDFLAGS = LDADD = $(top_builddir)/src/testlib/libsctputil.la \ diff --git a/src/func_tests/Makefile.am b/src/func_tests/Makefile.am index 9092ffb..b21e151 100644 --- a/src/func_tests/Makefile.am +++ b/src/func_tests/Makefile.am @@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.rules include $(top_srcdir)/Makefile.dirs # General compilation flags -INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib +AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib AM_CFLAGS = -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes -Wimplicit-function-declaration AM_LDFLAGS = -lpthread LDADD = $(top_builddir)/src/testlib/libsctputil.la \ diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 81cc814..af8bb51 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.rules include $(top_srcdir)/Makefile.dirs # General compilation flags -INCLUDES = -I$(top_srcdir)/src/include +AM_CPPFLAGS = -I$(top_srcdir)/src/include lib_LTLIBRARIES = libsctp.la libsctp_la_SOURCES = bindx.c connectx.c peeloff.c opt_info.c addrs.c sendmsg.c recvmsg.c Versions.map diff --git a/src/testlib/Makefile.am b/src/testlib/Makefile.am index 3d7fd49..fae6bbc 100644 --- a/src/testlib/Makefile.am +++ b/src/testlib/Makefile.am @@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.rules include $(top_srcdir)/Makefile.dirs # General compilation flags -INCLUDES = -I$(top_srcdir)/src/include +AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LTLIBRARIES = libsctputil.la libsctputil_la_SOURCES = sctputil.c sctputil.h -- 1.8.1.1