X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=46c8e52652b7c55db42577e3724d132f10da3279;hb=08991474f5e5c8208287f13351b7c25ff73acfb3;hp=0b9a8c0ee010474e5642064fab830fd4439de75a;hpb=a60c6d40d89eec2d82d88cbad7f9a591e05a469c;p=liboping.git diff --git a/configure.ac b/configure.ac index 0b9a8c0..46c8e52 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(liboping, 0.2.2) +AC_INIT(liboping, 1.4.0) AC_CONFIG_SRCDIR(src/liboping.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) @@ -6,6 +6,22 @@ AC_LANG(C) AC_PREFIX_DEFAULT("/opt/oping") +# API version +LIBOPING_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1` +LIBOPING_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2` +LIBOPING_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3` +AC_SUBST(LIBOPING_MAJOR) +AC_SUBST(LIBOPING_MINOR) +AC_SUBST(LIBOPING_PATCH) + +# ABI version +LIBOPING_CURRENT=2 +LIBOPING_REVISION=3 +LIBOPING_AGE=2 +AC_SUBST(LIBOPING_CURRENT) +AC_SUBST(LIBOPING_REVISION) +AC_SUBST(LIBOPING_AGE) + # # Check for programs/utilities # @@ -16,16 +32,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. @@ -151,6 +169,16 @@ AC_CHECK_FUNCS(socket, [], AC_MSG_ERROR(cannot find socket))) AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes") +# Under Solaris, the `xnet' library provides `recvmsg' which complies with the +# X/Open CAE Specification. +with_libxnet="no" +AC_CHECK_LIB(xnet, __xnet_recvmsg, [with_libxnet="yes"],[]) +if test "x$with_libxnet" = "xyes" +then + CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__" +fi +AM_CONDITIONAL(BUILD_WITH_LIBXNET, test "x$with_libxnet" = "xyes") + nanosleep_needs_rt="no" AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, @@ -158,6 +186,16 @@ AC_CHECK_FUNCS(nanosleep, [], AC_MSG_ERROR(cannot find nanosleep))) AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes") +with_ncurses="yes" +AC_CHECK_HEADERS(ncurses.h, [with_ncurses="yes"], [with_ncurses="no"]) +if test "x$with_ncurses" = "xyes" +then + AC_CHECK_LIB(ncurses, mvwprintw, [with_ncurses="yes"], [with_ncurses="no"]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" = "xyes") + +AC_FUNC_STRERROR_R + AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [Enable extensive debugging output.])], [ if test "x$enable_debug" = "xyes" @@ -167,4 +205,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)