From: Florian Forster Date: Mon, 23 Mar 2009 08:24:54 +0000 (+0100) Subject: build system: Actually link with libxnet and use CPPFLAGS. X-Git-Tag: liboping-1.1.1~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6d3ab13f9431fb790a645be018aafe03d314c32c;p=liboping.git build system: Actually link with libxnet and use CPPFLAGS. (Instead of CFLAGS.) --- diff --git a/configure.ac b/configure.ac index c615379..631e72d 100644 --- a/configure.ac +++ b/configure.ac @@ -169,11 +169,13 @@ 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 - CFLAGS="$CFLAGS -D_XPG4_2 -D__EXTENSIONS__" + CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__" fi AM_CONDITIONAL(BUILD_WITH_LIBXNET, test "x$with_libxnet" = "xyes") diff --git a/src/Makefile.am b/src/Makefile.am index f773f87..8bd885c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,10 @@ liboping_la_LDFLAGS = -version-info @LIBOPING_CURRENT@:@LIBOPING_REVISION@:@LIBO if BUILD_WITH_LIBSOCKET liboping_la_LDFLAGS += -lsocket endif +if BUILD_WITH_LIBXNET +liboping_la_LDFLAGS += -lxnet +endif + liboping_la_SOURCES = oping.h liboping.c bin_PROGRAMS = oping