tech-pkg archive

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

Re: [joerg%netbsd.org@localhost: CVS commit: pkgsrc/devel/nbpatch]



Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:
> Can you send me the config.log from nbcompat?
I could, but I think we can see what's happening right here in
nbcompat's configure.ac:
AC_ARG_ENABLE([bsd-getopt],
 [AS_HELP_STRING([--enable-bsd-getopt],
 [force use of BSDish getopt
 implementation])])
AC_CHECK_DECLS([optind, optreset], [:], [:], [
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
])
pkg_use_nbcompat_getopt_long=yes
AC_CHECK_HEADERS([getopt.h], [
 AC_MSG_TRY_COMPILE([for struct option],
 pkg_cv_have_struct_option,
 [ #include <getopt.h> ], [ struct option X; ],
 [pkg_use_nbcompat_getopt_long=no],
 [pkg_use_nbcompat_getopt_long=yes])
])
if test "$enable_bsd_getopt" = yes; then
 if test "$ac_cv_have_decl_optreset" = no; then
 pkg_use_nbcompat_getopt_long=yes
 fi
fi
if test $pkg_use_nbcompat_getopt_long = yes; then
 AC_DEFINE(HAVE_NBCOMPAT_GETOPT_LONG)
 AH_TEMPLATE([HAVE_NBCOMPAT_GETOPT_LONG], [
 Define to 1 if the `getopt_long' function is
 built into the library.
 ])
 AC_LIBOBJ(getopt_long)
fi
If getopt.h exists (it does on Linux) and --enable-bsd-getopt is
not used, it just uses the system getopt.h. I would suggest that
in the long term this check be expanded, to check for missing
features in the system getopt (e.g. optreset), but in the short
term you could force --enable-bsd-getopt. I don't know how to do
that from nbpatch though...
0 libnbcompat% grep -2 getopt config.log
| }
configure:5922: result: no
configure:5959: checking getopt.h usability
configure:5976: gcc -c -O2 -DHAVE_NBCOMPAT_H=1 
-I/usr/pkgsrc/current/devel/nbpatch/work/libnbcompat conftest.c >&5
configure:5983: $? = 0
configure:5997: result: yes
configure:6001: checking getopt.h presence
configure:6016: gcc -E -DHAVE_NBCOMPAT_H=1 
-I/usr/pkgsrc/current/devel/nbpatch/work/libnbcompat conftest.c
configure:6023: $? = 0
configure:6037: result: yes
configure:6070: checking for getopt.h
configure:6079: result: yes
configure:6090: checking for struct option
--
ac_cv_header_fnmatch_h=yes
ac_cv_header_fts_h=yes
ac_cv_header_getopt_h=yes
ac_cv_header_glob_h=yes
ac_cv_header_grp_h=yes
Also, WRT to d_namlen: nbcompat checks this for you, and
__fts13.c uses it:
#if HAVE_STRUCT_DIRENT_D_NAMLEN
 dlen = dp->d_namlen;
#else
 dlen = strlen(dp->d_name);
#endif
-- 
Eric Gillespie <*> epg%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index

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