Code

bindings/perl: Add support for the number of dropped packets.
[liboping.git] / configure.ac
index 0b9a8c0ee010474e5642064fab830fd4439de75a..583bb731bc3558ef6dca575a98a75e425623561b 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT(liboping, 0.2.2)
+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.
@@ -167,4 +169,31 @@ AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [Enable extensive debuggi
 ], [])
 AM_CONDITIONAL(BUILD_WITH_DEBUG, test "x$enable_debug" = "xyes")
 
-AC_OUTPUT(Makefile src/Makefile src/mans/Makefile)
+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)