From d0cbd9808aa00875962e57a693f11836760f34d1 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 6 Oct 2019 07:42:46 +0200 Subject: Add missing required defines & libs to libnet.pc.in Signed-off-by: Joachim Nilsson --- configure.ac | 18 +++++++++--------- libnet.pc.in | 4 ++-- m4/acinclude.m4 | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index d8a05de..79fd337 100644 --- a/configure.ac +++ b/configure.ac @@ -78,8 +78,8 @@ dnl AC_LBL_LIBRARY_NET AC_SUBST(ENDIANESS) AC_SUBST(HAVE_PACKET_SOCKET) AC_SUBST(ADDITIONAL_LIBS) -AC_SUBST(LIBNET_CONFIG_DEFINES) -AC_SUBST(LIBNET_CONFIG_LIBS) +AC_SUBST(PKG_CONFIG_DEFINES) +AC_SUBST(PKG_CONFIG_LIBS) dnl FIXME this variable is unused AC_SUBST(LIBNET_CONFIG_CFLAGS) AC_SUBST(LTLIBOBJS) @@ -255,9 +255,9 @@ case "$target_os" in AC_DEFINE(_DEFAULT_SOURCE, 1, [Define as necessary to "unhide" header symbols.]) - LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D_DEFAULT_SOURCE" + PKG_CONFIG_DEFINES="-D_BSD_SOURCE -D_DEFAULT_SOURCE" AC_CHECK_HEADERS(net/ethernet.h, \ - LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H") + PKG_CONFIG_DEFINES="$PKG_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H") ;; *freebsd*) @@ -266,14 +266,14 @@ case "$target_os" in AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if the sockaddr structure includes a sa_len member.]) - LIBNET_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN" + PKG_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN" ;; *netbsd*) AC_DEFINE(LIBNET_BSD_BYTE_SWAP, 1, [Define if libnet should byteswap data.]) - LIBNET_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP" + PKG_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP" ;; *openbsd*) @@ -284,14 +284,14 @@ case "$target_os" in *bsdi*) AC_DEFINE(LIBNET_BSD_BYTE_SWAP, 1, [Define if libnet should byteswap data.]) - LIBNET_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP" + PKG_CONFIG_DEFINES="-DLIBNET_BSD_BYTE_SWAP" ;; *darwin*) AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if the sockaddr structure includes a sa_len member.]) AC_DEFINE(LIBNET_BSD_BYTE_SWAP, 1, [Define if libnet should byteswap data.]) - LIBNET_CONFIG_DEFINES="-DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSD_BYTE_SWAP" + PKG_CONFIG_DEFINES="-DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSD_BYTE_SWAP" ;; *solaris*) @@ -350,7 +350,7 @@ dnl esac ADDITIONAL_LIBS="-lresolv -lsocket -lnsl" - LIBNET_CONFIG_LIBS="$LIBNET_CONFIG_LIBS -lresolv -lsocket -lnsl" + PKG_CONFIG_LIBS="$PKG_CONFIG_LIBS -lresolv -lsocket -lnsl" ;; diff --git a/libnet.pc.in b/libnet.pc.in index 028d7cb..cf4d7ff 100644 --- a/libnet.pc.in +++ b/libnet.pc.in @@ -9,6 +9,6 @@ Description: Portable Packet Construction and Injection API URL: @PACKAGE_URL@ Requires: -Libs: -L${libdir} -lnet @LTLIBINTL@ -Cflags: -I${includedir} +Libs: -L${libdir} -lnet @PKG_CONFIG_LIBS@ +Cflags: -I${includedir} @PKG_CONFIG_DEFINES@ diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index 9ed3677..f0d8ef8 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -202,12 +202,12 @@ AC_DEFUN([AC_LIBNET_ENDIAN_CHECK], AC_DEFINE(LIBNET_BIG_ENDIAN, 1, [We are running on a big-endian machine.]) ENDIANESS="LIBNET_BIG_ENDIAN" - LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN" + PKG_CONFIG_DEFINES="$PKG_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN" else AC_DEFINE(LIBNET_LIL_ENDIAN, 1, [We are running on a little-endian machine.]) ENDIANESS="LIBNET_LIL_ENDIAN" - LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN" + PKG_CONFIG_DEFINES="$PKG_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN" fi ]) -- cgit v1.2.1