diff options
-rw-r--r-- | devel/libgetopt/buildlink.mk | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/devel/libgetopt/buildlink.mk b/devel/libgetopt/buildlink.mk index 8f133b3c4bc..6b00ab1699e 100644 --- a/devel/libgetopt/buildlink.mk +++ b/devel/libgetopt/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.12 2001/07/27 13:33:23 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.13 2001/08/20 03:54:48 jlam Exp $ # # This Makefile fragment is included by packages that use getopt_long(). # @@ -19,8 +19,15 @@ GETOPT_BUILDLINK_MK= # defined BUILDLINK_DEPENDS.getopt?= libgetopt>=1.3 .if exists(/usr/include/getopt.h) +_NEED_GETOPT= NO +.else +_NEED_GETOPT= YES +.endif + +.if ${_NEED_GETOPT} == "NO" BUILDLINK_PREFIX.getopt= /usr BUILDLINK_FILES.getopt= include/getopt.h +LIBGETOPT= # empty .else DEPENDS+= ${BUILDLINK_DEPENDS.getopt}:../../devel/libgetopt EVAL_PREFIX+= BUILDLINK_PREFIX.getopt=libgetopt @@ -28,12 +35,12 @@ BUILDLINK_PREFIX.getopt_DEFAULT= ${LOCALBASE} BUILDLINK_FILES.getopt= include/getopt.h BUILDLINK_FILES.getopt+= lib/libgetopt.* BUILDLINK_FILES.getopt+= lib/libgetopt_pic.a - -.if defined(GNU_CONFIGURE) -LIBS+= -lgetopt -.endif +LIBGETOPT= -lgetopt .endif +CONFIGURE_ENV+= LIBGETOPT="${LIBGETOPT}" +MAKE_ENV+= LIBGETOPT="${LIBGETOPT}" + BUILDLINK_TARGETS.getopt= getopt-buildlink BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.getopt} |