diff options
author | jlam <jlam@pkgsrc.org> | 2001-05-22 16:45:38 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-05-22 16:45:38 +0000 |
commit | d59eed58aacb38436b5ee910b9d6374becca3769 (patch) | |
tree | 77d5c9a7c3f7295b90e1ba88def6052f55dbd56a /devel | |
parent | 77eae40ed8558a38fe591a9f9ad096166fe36dd5 (diff) | |
download | pkgsrc-d59eed58aacb38436b5ee910b9d6374becca3769.tar.gz |
Tell the user when we're linking getopt headers, and conditionally add
-lgetopt to LIBS if GNU_CONFIGURE is defined.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgetopt/Makefile.getopt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/devel/libgetopt/Makefile.getopt b/devel/libgetopt/Makefile.getopt index a4a2e5b1971..928f131037f 100644 --- a/devel/libgetopt/Makefile.getopt +++ b/devel/libgetopt/Makefile.getopt @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.getopt,v 1.2 2001/05/16 04:37:46 jlam Exp $ +# $NetBSD: Makefile.getopt,v 1.3 2001/05/22 16:45:38 jlam Exp $ # # This Makefile fragment is included by packages that use getopt_long(). # @@ -10,17 +10,17 @@ # package Makefile, optionally define WRKINCDIR, add # link-getopt-headers to the prerequisite targets for pre-configure, # and add ${WRKINCDIR} to the compiler's header search path. -# -# You may need to add LIBS to CONFIGURE_ENV if you the packages uses a GNU -# configure script. .if exists(/usr/include/getopt.h) GETOPT_H= /usr/include/getopt.h .else GETOPT_H= ${LOCALBASE}/include/getopt.h DEPENDS+= libgetopt>=1.3:../../devel/libgetopt +.if defined(GNU_CONFIGURE) +CONFIGURE_ENV+= LIBS="${LIBS}" LIBS+= -lgetopt .endif +.endif WRKINCDIR?= ${WRKDIR}/include @@ -28,6 +28,7 @@ WRKINCDIR?= ${WRKDIR}/include # searched first by the C preprocessor. # link-getopt-headers: - ${MKDIR} -p ${WRKINCDIR} - ${RM} -f ${WRKINCDIR}/getopt.h - ${LN} -sf ${GETOPT_H} ${WRKINCDIR} + @${ECHO} "Linking getopt headers into ${WRKINCDIR}." + @${MKDIR} -p ${WRKINCDIR} + @${RM} -f ${WRKINCDIR}/getopt.h + @${LN} -sf ${GETOPT_H} ${WRKINCDIR} |