summaryrefslogtreecommitdiffstats
path: root/ftp/mget
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 14:02:02 +0000
committernork <nork@FreeBSD.org>2003-02-02 14:02:02 +0000
commite8c172c32fd34387e02e97b04aeb8048a8ef33e3 (patch)
treea6c8b820c0017b29039a860a03f64fb6bc1009f8 /ftp/mget
parenta7461e660dd88f8a36a65c5a6b6226af55690707 (diff)
downloadFreeBSD-ports-e8c172c32fd34387e02e97b04aeb8048a8ef33e3.zip
FreeBSD-ports-e8c172c32fd34387e02e97b04aeb8048a8ef33e3.tar.gz
Conditionalize libgnugetopt dependencies.
PR: ports/47739 Submitted by: Ports Fury
Diffstat (limited to 'ftp/mget')
-rw-r--r--ftp/mget/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/ftp/mget/Makefile b/ftp/mget/Makefile
index bc1b288..8ce9e6b 100644
--- a/ftp/mget/Makefile
+++ b/ftp/mget/Makefile
@@ -13,11 +13,15 @@ MASTER_SITES= http://www.cse.iitk.ac.in/users/dbera/
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-
CFLAGS+= -DHAS_HERROR -DHAVE_GETOPT_LONG -DHAVE_INET_NTOP -DHAVE_IPV6 \
- -I${LOCALBASE}/include ${PTHREAD_CFLAGS:S/"//g}
-LDFLAGS= -L${LOCALBASE}/lib -lgnugetopt ${PTHREAD_LIBS:S/"//g}
+ ${PTHREAD_CFLAGS:S/"//g}
+LDFLAGS+= ${PTHREAD_LIBS:S/"//g}
+
+.if !exists(/usr/include/getopt.h)
+LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt
+.endif
do-build:
cd ${WRKSRC} && ${CC} ${CFLAGS} -o mget *.c ${LDFLAGS}
OpenPOWER on IntegriCloud