From owner-freebsd-questions@FreeBSD.ORG Sat Oct 25 11:32:22 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 892E816A4C0 for ; Sat, 25 Oct 2003 11:32:22 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5334E43F3F for ; Sat, 25 Oct 2003 11:32:21 -0700 (PDT) (envelope-from pcc@gmx.net) Received: (qmail 32082 invoked by uid 0); 25 Oct 2003 18:32:20 -0000 Received: from 217.227.159.78 by www5.gmx.net with HTTP; Sat, 25 Oct 2003 20:32:20 +0200 (MEST) Date: Sat, 25 Oct 2003 20:32:20 +0200 (MEST) From: "Peter Cornelius" To: Dan Nelson MIME-Version: 1.0 References: <20031019172257.GG90762@dan.emsphone.com> X-Priority: 3 (Normal) X-Authenticated: #491680 Message-ID: <1102.1067106740@www5.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit cc: FreeBSD-Questions@FreeBSD.ORG Subject: Re: ? getopt_long(), iopl() and ioperm() ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 18:32:22 -0000 > > # pcc@gmx.net / 2003-10-19 01:59:45 +0200: > > > I'm hacking at a piece of code that I want to turn into a port. It's from > > > Linux and uses libpci and some other 'strange' functions. > > > While I think that I've managed to modify the libpci port to install the > > > required lib, I'm more or less lost at getopt_long() which I > > > assume is in the libgnugetopt port. However, for some reason, even if I > > > include it explicitly (#include "/usr/local/include/getopt.h"), I > > > run into problems. Please note that I'm not a programmer at all, so it's > > > very much hacking along, so I may look for someone patient > > > to bear with me ;-) But I am willing to learn. > > > > AFAICT you need to tell the compiler about the library. The rule in > > your Makefile needs to have "-L /usr/local/lib -lgnugetopt". Thanks for that, Roman, I did so and got some sort of binary to play with. For a port, however, I think I must dig in deeper, or rather climb higher for that matter -- autoconf & co. are used for making the makefiles, so I probably must fix it there somewhere there. If it was for plain makefiles, I might not have the problems I see, but this is something entirely new for me ;-) > The best way is to set USE_GETOPT_LONG=yes in your port Makefile. > > # USE_GETOPT_LONG - Says that the port uses getopt_long. If OSVERSION > # less than 500041, automatically adds devel/libgnugeopt > # to LIB_DEPENDS, and pass adjusted values of > # CPPFLAGS and LDFLAGS in CONFIGURE_ENV. > # Default: not set. Thanks, Dan, I'm not that far yet. As I said above, I'm still trying to understand what is required by nvtv in the first place. There still seem to be bugs in there, at least with my card. I have contact with the author who is willing to help as long as I can build and test. Which I sort of achieved now with your help and the of a friend. Anyways, as I must have overread that comment in bsd.ports.mk, thanks for the pointer. In any case, if it makes to be a port, I'll proceed as suggested. So, thanks for the help and watch ports@ if it ever makes it there ;-)==) All the best, Peter. Btw, iopl() and ioperm() I currently simply get around by uncommenting them. Which probably makes those sections unuseable for the cards covered there, so I would not mind a hint for these by any other reader ;-) -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++