* [PATCH 1/7] build: use autoconf-suggested naming of files
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 2/7] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE Jan Engelhardt
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
configure.ac | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 82 ----------------------------------------------------------
2 files changed, 82 insertions(+), 82 deletions(-)
create mode 100644 configure.ac
delete mode 100644 configure.in
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..ae61ba0
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,82 @@
+dnl Process this file with autoconf to create configure.
+
+AC_INIT
+AC_CANONICAL_SYSTEM
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE(libnetfilter_conntrack, 0.9.0)
+
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+AC_SUBST(LIBTOOL_DEPS)
+
+case $target in
+*-*-linux*) ;;
+*) AC_MSG_ERROR([Linux only, dude!]);;
+esac
+
+dnl Dependencies
+LIBNFNETLINK_REQUIRED=1.0.0
+
+AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
+if test "x$HAVE_PKG_CONFIG" = "x"
+then
+ echo "*** Error: No suitable pkg-config found. ***"
+ echo " Please install the 'pkg-config' package."
+ exit 1
+fi
+
+PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,,
+ AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED))
+
+AC_CHECK_HEADERS(arpa/inet.h)
+dnl Check for inet_ntop
+AC_CHECK_FUNCS(inet_ntop)
+dnl Again, some systems have it, but not IPv6
+if test "$ac_cv_func_inet_ntop" = "yes" ; then
+AC_MSG_CHECKING(if inet_ntop supports IPv6)
+AC_TRY_RUN(
+ [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#include <errno.h>
+int main()
+ {
+ struct in6_addr addr6;
+ char buf[128];
+ if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
+ exit(1);
+ else
+ exit(0);
+ }
+ ], [ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])
+ ], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
+fi
+
+if test ! -z "$libdir"; then
+ MODULE_DIR="\\\"$libdir/libnetfilter_conntrack/\\\""
+ CFLAGS="$CFLAGS -DLIBNETFILTER_CONNTRACK_DIR=$MODULE_DIR"
+fi
+
+CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
+LIBNFCONNTRACK_LIBS="$LIBNFNETLINK_LIBS"
+
+AC_SUBST(LIBNFCONNTRACK_LIBS)
+
+dnl Output the makefile
+AC_OUTPUT(Makefile src/Makefile include/Makefile utils/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile include/internal/Makefile src/conntrack/Makefile src/expect/Makefile libnetfilter_conntrack.pc doxygen.cfg)
+
diff --git a/configure.in b/configure.in
deleted file mode 100644
index ae61ba0..0000000
--- a/configure.in
+++ /dev/null
@@ -1,82 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-AC_INIT
-AC_CANONICAL_SYSTEM
-AC_CONFIG_MACRO_DIR([m4])
-
-AM_INIT_AUTOMAKE(libnetfilter_conntrack, 0.9.0)
-
-AC_PROG_CC
-AM_PROG_LIBTOOL
-AC_PROG_INSTALL
-AC_PROG_LN_S
-
-AC_SUBST(LIBTOOL_DEPS)
-
-case $target in
-*-*-linux*) ;;
-*) AC_MSG_ERROR([Linux only, dude!]);;
-esac
-
-dnl Dependencies
-LIBNFNETLINK_REQUIRED=1.0.0
-
-AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
-if test "x$HAVE_PKG_CONFIG" = "x"
-then
- echo "*** Error: No suitable pkg-config found. ***"
- echo " Please install the 'pkg-config' package."
- exit 1
-fi
-
-PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,,
- AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED))
-
-AC_CHECK_HEADERS(arpa/inet.h)
-dnl Check for inet_ntop
-AC_CHECK_FUNCS(inet_ntop)
-dnl Again, some systems have it, but not IPv6
-if test "$ac_cv_func_inet_ntop" = "yes" ; then
-AC_MSG_CHECKING(if inet_ntop supports IPv6)
-AC_TRY_RUN(
- [
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#include <errno.h>
-int main()
- {
- struct in6_addr addr6;
- char buf[128];
- if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
- exit(1);
- else
- exit(0);
- }
- ], [ AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])
- ], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-fi
-
-if test ! -z "$libdir"; then
- MODULE_DIR="\\\"$libdir/libnetfilter_conntrack/\\\""
- CFLAGS="$CFLAGS -DLIBNETFILTER_CONNTRACK_DIR=$MODULE_DIR"
-fi
-
-CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
-LIBNFCONNTRACK_LIBS="$LIBNFNETLINK_LIBS"
-
-AC_SUBST(LIBNFCONNTRACK_LIBS)
-
-dnl Output the makefile
-AC_OUTPUT(Makefile src/Makefile include/Makefile utils/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile include/internal/Makefile src/conntrack/Makefile src/expect/Makefile libnetfilter_conntrack.pc doxygen.cfg)
-
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/7] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
2010-09-08 23:32 ` [PATCH 1/7] build: use autoconf-suggested naming of files Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 3/7] build: avoid use of deprecated INCLUDES Jan Engelhardt
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
automake options also need to definitely go into configure.ac, otherwise
they only apply to a single directory.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
Makefile.am | 2 --
configure.ac | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 80294cc..3878a8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,5 @@
include $(top_srcdir)/Make_global.am
-AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
-
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src utils qa
diff --git a/configure.ac b/configure.ac
index ae61ba0..eda4c14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
dnl Process this file with autoconf to create configure.
-AC_INIT
+AC_INIT([libnetfilter_conntrack], [0.9.0])
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE(libnetfilter_conntrack, 0.9.0)
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects dist-bzip2 1.6])
AC_PROG_CC
AM_PROG_LIBTOOL
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/7] build: avoid use of deprecated INCLUDES
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
2010-09-08 23:32 ` [PATCH 1/7] build: use autoconf-suggested naming of files Jan Engelhardt
2010-09-08 23:32 ` [PATCH 2/7] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 4/7] build: use simpler autoreconf in autogen Jan Engelhardt
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Make_global.am:7: "INCLUDES" is the old name for "AM_CPPFLAGS" (or "*_CPPFLAGS")
qa/Makefile.am:1: "Make_global.am" included from here
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
Make_global.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Make_global.am b/Make_global.am
index a4636ba..0ef055e 100644
--- a/Make_global.am
+++ b/Make_global.am
@@ -4,4 +4,4 @@
# http://sources.redhat.com/autobook/autobook/autobook_91.html
LIBVERSION=3:2:0
-INCLUDES=$(all_includes) -I$(top_srcdir)/include
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/7] build: use simpler autoreconf in autogen
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
` (2 preceding siblings ...)
2010-09-08 23:32 ` [PATCH 3/7] build: avoid use of deprecated INCLUDES Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 5/7] build: run AC_CANONICAL_HOST only Jan Engelhardt
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
Note: the use of -i seems required, otherwise autoreconf barfs about
missing tools (depcomp, etc.). Since they are provided in the tarballs
as files anyway rather than like previously as symlinks, I do not see a
problem using -i.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
autogen.sh | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 07bd67f..4989ed9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -34,8 +34,4 @@ run ()
}
[ "x$1" = "xdistrib" ] && include
-run aclocal
-run libtoolize -f
-#run autoheader
-run automake -a
-run autoconf
+autoreconf -fi
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/7] build: run AC_CANONICAL_HOST only
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
` (3 preceding siblings ...)
2010-09-08 23:32 ` [PATCH 4/7] build: use simpler autoreconf in autogen Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES Jan Engelhardt
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
There is no need to call AC_CANONICAL_SYSTEM when only AC_CANONICAL_HOST
is needed. Also, checking for $target is factually incorrect, since we
do not produce object code like a compiler. Use $host, which specifies
the triple/quadrople where the compiled program is supposed to run.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index eda4c14..fe5b6fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to create configure.
AC_INIT([libnetfilter_conntrack], [0.9.0])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects dist-bzip2 1.6])
@@ -13,7 +13,7 @@ AC_PROG_LN_S
AC_SUBST(LIBTOOL_DEPS)
-case $target in
+case "$host" in
*-*-linux*) ;;
*) AC_MSG_ERROR([Linux only, dude!]);;
esac
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
` (4 preceding siblings ...)
2010-09-08 23:32 ` [PATCH 5/7] build: run AC_CANONICAL_HOST only Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-08 23:32 ` [PATCH 7/7] Add .gitignore Jan Engelhardt
2010-09-12 9:19 ` libnetfilter_conntrack autotools updates Pablo Neira Ayuso
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
PKG_CHECK_MODULES already produces its own (and more verbose) messsage
when a module cannot be found.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
configure.ac | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index fe5b6fa..d5b65af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,8 +19,6 @@ case "$host" in
esac
dnl Dependencies
-LIBNFNETLINK_REQUIRED=1.0.0
-
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
if test "x$HAVE_PKG_CONFIG" = "x"
then
@@ -29,8 +27,7 @@ then
exit 1
fi
-PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,,
- AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED))
+PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.0])
AC_CHECK_HEADERS(arpa/inet.h)
dnl Check for inet_ntop
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/7] Add .gitignore
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
` (5 preceding siblings ...)
2010-09-08 23:32 ` [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES Jan Engelhardt
@ 2010-09-08 23:32 ` Jan Engelhardt
2010-09-12 9:19 ` libnetfilter_conntrack autotools updates Pablo Neira Ayuso
7 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2010-09-08 23:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
---
.gitignore | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c9550f5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.o
+*.la
+*.lo
+
+/aclocal.m4
+/autom4te.cache
+/config.*
+/configure
+/depcomp
+/install-sh
+/libtool
+/ltmain.sh
+/missing
+
+/doxygen.cfg
+/*.pc
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: libnetfilter_conntrack autotools updates
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
` (6 preceding siblings ...)
2010-09-08 23:32 ` [PATCH 7/7] Add .gitignore Jan Engelhardt
@ 2010-09-12 9:19 ` Pablo Neira Ayuso
7 siblings, 0 replies; 9+ messages in thread
From: Pablo Neira Ayuso @ 2010-09-12 9:19 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
On 09/09/10 01:32, Jan Engelhardt wrote:
> Jan Engelhardt (7):
> build: use autoconf-suggested naming of files
> build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE
> build: avoid use of deprecated INCLUDES
> build: use simpler autoreconf in autogen
> build: run AC_CANONICAL_HOST only
> build: no need for error message in PKG_CHECK_MODULES
> Add .gitignore
All applied and pushed to git. Thanks Jan.
^ permalink raw reply [flat|nested] 9+ messages in thread