tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Re: how to handle getopt_long_only



On Sat, Mar 08 2008 - 17:56, OBATA Akio wrote:
> wip/libgnugetopt ?
> 
> It should have builtin.mk, or integrated in USE_FEATURE?
> 
thanks, I used buildlink3.mk.
now, there is a conflict with unistd.h:
===> Building for wbar-1.3.3
c++ `imlib2-config --cflags` -Wall -O2 -I/usr/pkg/include -I/usr/include 
-I/usr/pkg/include/freetype2 -c -o OptParser.o OptParser.cc
/usr/include/unistd.h:152: error: declaration of C function 'int getopt(int, 
char* const*, const char*)' conflicts with
/tmp/pkgwork/wip/wbar/work.current/.buildlink/include/gnugetopt.h:115: error: 
previous declaration 'int getopt()' here
gmake: *** [OptParser.o] Error 1
*** Error code 2
I've include (.include "../../wip/libgnugetopt/buildlink3.mk") in the Makefile.
Then modify some .h to replace (#include <getopt.h>) with (#include 
<gnugetopt.h>).
I've also tried to use the Makefile option found in wip/speex-devel :
LIBS+= ${BUILDLINK_LDADD.getopt:Q}
BUILDLINK_TRANSFORM+= l:gnugetopt:getopt
But this does not work either.
I didn't found any other examples of libgnugetopt use in pkgsrc.
Any thoughts ?
TIA,
 Jo

Attachment: pgpHHUtIXvECs.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /