X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=ee99bfb69249c5111484c1d09cc2a196f6815e20;hb=5566e8f16b83699915a3c884a0cbb182082858cc;hp=6eb4b4b9aa4b8af98abe7a53875855e7ef36ce2a;hpb=000eb200d0863e81e34dd19aa44103f2b44c4abe;p=liboping.git diff --git a/configure.ac b/configure.ac index 6eb4b4b..ee99bfb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) -AC_INIT([liboping],[1.6.2]) +AC_INIT([liboping],[1.7.0],[ff@octo.it],,[http://github.com/octo/liboping/]) AC_CONFIG_SRCDIR([src/liboping.c]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -20,7 +20,7 @@ AC_SUBST(LIBOPING_PATCH) # ABI version LIBOPING_CURRENT=2 -LIBOPING_REVISION=9 +LIBOPING_REVISION=10 LIBOPING_AGE=2 AC_SUBST(LIBOPING_CURRENT) AC_SUBST(LIBOPING_REVISION) @@ -45,6 +45,9 @@ AC_ARG_VAR(PERL, [Perl interpreter command]) # configure libtool LT_INIT([dlopen]) +# pkg-config interface +PKG_INSTALLDIR + # Checks for header files. AC_HEADER_STDC AC_HEADER_TIME @@ -185,11 +188,25 @@ 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(ncursesw/ncurses.h, [with_ncurses="yes"], [with_ncurses="no"]) +with_ncurses="no" +AC_CHECK_HEADERS(ncursesw/ncurses.h ncurses.h, [with_ncurses="yes"], []) if test "x$with_ncurses" = "xyes" then - AC_CHECK_LIB(ncursesw, mvwprintw, [with_ncurses="yes"], [with_ncurses="no"]) + have_ncursesw="no" + have_ncurses="no" + NCURSES_LIB="" + + AC_CHECK_LIB(ncursesw, mvwprintw, [have_ncursesw="yes"], [have_ncursesw="no"]) + AC_CHECK_LIB(ncurses, mvwprintw, [have_ncurses="yes"], [have_ncurses="no"]) + + if test "x$have_ncursesw" = "xyes"; then + NCURSES_LIB="-lncursesw" + else if test "x$have_ncurses" = "xyes"; then + NCURSES_LIB="-lncurses" + else + with_ncurses="no" + fi; fi + AC_SUBST(NCURSES_LIB) fi AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" = "xyes")