Code

bindings/perl: Add support for the number of dropped packets.
[liboping.git] / configure.ac
index 05226e237f3d69d2869c0bfdd1aac12dd1ef49ae..583bb731bc3558ef6dca575a98a75e425623561b 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT(liboping, 0.1.1)
+AC_INIT(liboping, 0.3.5)
 AC_CONFIG_SRCDIR(src/liboping.c)
 AC_CONFIG_HEADERS(src/config.h)
 AM_INIT_AUTOMAKE(dist-bzip2)
@@ -16,16 +16,18 @@ AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
 
+if test "x$PERL" = "x"
+then
+       PERL="perl"
+fi
+AC_ARG_VAR(PERL, [Perl interpreter command])
+
 #
 # configure libtool
 #
-AC_LIBLTDL_CONVENIENCE
-AC_SUBST(LTDLINCL)
-AC_SUBST(LIBLTDL)
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 #AC_PROG_RANLIB
-AC_CONFIG_SUBDIRS(libltdl src)
 
 #
 # Checks for header files.
@@ -46,11 +48,17 @@ AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 ])
 AC_CHECK_HEADERS(netinet/in.h, [], [],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #if HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
 #endif
@@ -59,6 +67,9 @@ AC_CHECK_HEADERS(netinet/ip.h, [], [],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #if HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
 #endif
@@ -70,6 +81,9 @@ AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #if HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
 #endif
@@ -84,6 +98,9 @@ AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #if HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
 #endif
@@ -101,6 +118,9 @@ AC_CHECK_HEADERS(netinet/ip6.h, [], [],
 #if HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #if HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
 #endif
@@ -140,4 +160,40 @@ AC_CHECK_FUNCS(nanosleep, [],
                AC_MSG_ERROR(cannot find nanosleep)))
 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
 
-AC_OUTPUT(Makefile src/Makefile src/mans/Makefile)
+AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [Enable extensive debugging output.])],
+[
+       if test "x$enable_debug" = "xyes"
+       then
+               AC_DEFINE(WITH_DEBUG, 1, [Define to 1 if you want to get debugging output.])
+       fi
+], [])
+AM_CONDITIONAL(BUILD_WITH_DEBUG, test "x$enable_debug" = "xyes")
+
+AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
+[
+       if test "x$withval" != "xno" && test "x$withval" != "xyes"
+       then
+               PERL_BINDINGS_OPTIONS="$withval"
+               with_perl_bindings="yes"
+       else
+               PERL_BINDINGS_OPTIONS=""
+               with_perl_bindings="$withval"
+       fi
+],
+[
+       PERL_BINDINGS_OPTIONS=""
+       with_perl_bindings="yes"
+])
+
+if test "x$with_perl_bindings" = "xyes"
+then
+       BINDINGS="perl-bindings"
+else
+       BINDINGS=""
+fi
+
+AC_SUBST(PERL_BINDINGS_OPTIONS)
+
+AC_SUBST(BINDINGS)
+
+AC_OUTPUT(Makefile src/Makefile src/mans/Makefile bindings/Makefile)