Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2002 14:10:41 +0100 (CET)
From:      Renaud <renaud@tpfh.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46512: libnet-config is broken
Message-ID:  <20021224131041.A1920263@hope.fr.nessus.org>

next in thread | raw e-mail | index | archive | help

>Number:         46512
>Category:       ports
>Synopsis:       libnet-config is broken
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 24 05:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Renaud
>Release:        FreeBSD 4.7-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD hope.fr.nessus.org 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #5: Mon Dec 23 21:16:44 CET 2002 root@hope.fr.nessus.org:/usr/obj/usr/src/sys/HOPE i386


>Description:
	Libnet is a network library whose port is in /usr/ports/net/libnet
	It comes with a utility called "libnet-config" which is meant
	to simplify the life of the developer willing to use libnet, by
	specifying the correct compiler flags for gcc.

	For instance, 'libnet-config --cflags' should print 
	'-I/usr/local/include' and 'libnet-config --libs' should print 
	'-L/usr/local/lib -lnet'

	This behavior is broken in the port, as 'libnet-config --cflags'
	outputs nothing, and 'libnet-config --libs' only outputs '-lnet'.

	As a result, the user has to manually add the relevant gcc flags
	which defeats the purpose of having 'libnet-config' in the first
	place.

>How-To-Repeat:

	$ cd /usr/ports/net/libnet
	$ make install
	$ cd /tmp
	$ cat << EOF > test.c
	#include <libnet.h>
	int main() { return 0; }
	EOF
	$ gcc `libnet-config --cflags` -c test.c 
	test.c:1: libnet.h: No such file or directory
>Fix:

Here is a patch for Libnet's configure.in script. Make sure to call
autoconf213 to rebuild the compiled configure script.


*** configure.in.orig	Tue Dec 24 14:06:55 2002
--- configure.in	Tue Dec 24 14:07:36 2002
***************
*** 11,16 ****
--- 11,22 ----
  VER=`cat VERSION`
  AC_MSG_RESULT(Beginning autoconfiguration process for libnet-$VER...)
  
+ 
+ test "$prefix" = "NONE" && prefix=/usr/local
+ 
+ LIBNET_CONFIG_CFLAGS=-I$prefix/include
+ LIBNET_CONFIG_LIBS=-L$prefix/lib
+ 
  AC_SUBST(LL_INT_TYPE_UC)
  AC_SUBST(LL_INT_TYPE)
  AC_SUBST(LIB_PREFIX)

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021224131041.A1920263>