aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/vlc/Makefile
blob: 9c5a741d1500afef3992895b7a7f1089c571fbb4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
# New ports collection makefile for:    vlc
# Date created:     3rd August 2001
# Whom:         Brian Somers <brian@FreeBSD.org>
#
# $FreeBSD$
#   $MCom: ports-stable/multimedia/vlc/Makefile,v 1.6 2009/01/09 23:41:21 mezz Exp $
#      $Id: Makefile 6 2006-09-27 14:05:34Z buhnux $
# *** PLEASE READ Makefile.inc for more information on knobs ***
#

PORTNAME=   vlc
DISTVERSION=    1.0.3
PORTREVISION=   4
PORTEPOCH=  3
CATEGORIES= multimedia audio ipv6 net www
MASTER_SITES=   http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION}/ \
        http://ftp.snt.utwente.nl/pub/software/videolan/${PORTNAME}/${DISTVERSION}/ \
        ftp://ftp.crans.org/pub/videolan/${PORTNAME}/${DISTVERSION}/

MAINTAINER= jsa@wickedmachine.net
COMMENT=    Multimedia streaming server and player for various audio/video formats

LIB_DEPENDS=    avcodec.1:${PORTSDIR}/multimedia/ffmpeg
RUN_DEPENDS=    ${LOCALBASE}/lib/X11/fonts/bitstream-vera/Vera.ttf:${PORTSDIR}/x11-fonts/bitstream-vera

OPTIONS=    A52 "a52 audio support, many DVDs use this" On \
        AALIB "Aalib Console Graphics Support" Off \
        ARTS "Enable arts sound support" Off \
        AVAHI "Avahi (Rendezvous/Bonjour (R) ) networking" On \
        CACA "Libcaca Console Graphics Support" Off \
        DBUS "Enable D-Bus control support" On \
        DEBUG "Enable debuging support" Off \
        DTS "DTS decoder support, many DVDs use this" On \
        ESOUND "Esound Support" Off \
        FAAC "Faac audio encoder (mp4/aac) support" Off \
        FAAD "Faad audio decoder (mp4/aac) support" On \
        FLAC "Flac audio codec support" On \
        GNOMEVFS "Gnome VFS support" On \
        HTTPD "Streaming media control via http" On \
        LIVEMEDIA "Support for rstp/rtp/sdp protocols" On \
        LUA "Enable lua scripting" Off \
        MAD "Mad mp3 audio decoder support" On \
        MATROSKA "Matroska Container Format support" On \
        MPEG2 "Mpeg-2 audio/video decoder Support" On \
        NCURSES "Enable ncurses (console) interface" Off \
        OGG "Ogg audio decoder support" On \
        QT4 "QT4 Interface (requires X11)" On \
        REALAUDIO "Real audio(R) support" On \
        SAMBA "SAMBA Access module" On \
        SDL "SDL video output" On \
        SVG "SVG graphics support" Off \
        SVGALIB "SVGALIB video output" Off \
        SHOUT "Shout2 support" Off \
        SKINS "Enable winamp skins interface (requires QT4)" On \
        SPEEX "Speex voice codec support" On \
        THEORA "OGG/Vorbis video codec support" On \
        TWOLAME "Twolame mpeg2 audio encoder support" On \
        V4L "Enable Video for Linux" On \
        VORBIS "Vorbis support" On \
        WIN32_CODECS "win32 multimedia DLL's" Off \
        X264 "Enable H.264/AVC codec support" On \
        X11 "Enable X11 (disable for stream only server)" On

USE_BZIP2=  yes
USE_GMAKE=  yes
.if !defined(WITHOUT_X11)
WANT_GNOME= yes
USE_GNOME=  gnomehack gnometarget libxml2
.endif
.if !defined(WITHOUT_SDL) && !defined(WITHOUT_X11)
WANT_SDL=   yes
.endif
USE_ICONV=  yes
USE_PERL5_BUILD=yes

FAKEDIR=    ${WRKDIR}/fake/${PREFIX}
PLIST=      ${WRKDIR}/plist

USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${FAKEDIR}/include -I${WRKSRC}/include ${CPPFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/ffmpeg ${PTHREAD_CFLAGS}" \
        LDFLAGS="${LDFLAGS} -L${FAKEDIR}/lib -L${LOCALBASE}/lib ${PTHREAD_LIBS} -lc" \
        LIBS="-lc"

CONFIGURE_ARGS+=    --enable-vlc \
            --enable-release \
            --enable-avcodec \
            --enable-avformat \
            --enable-postproc \
            --without-dv-raw1394 \
            --disable-dv \
            --disable-galaktos \
            --disable-glx

MAN1=       vlc.1 \
        vlc-config.1 \
        vlc-wrapper.1

.include <bsd.port.pre.mk>

.if (${OSVERSION} < 701000)
CFLAGS+=    -DHAVE_SYS_MOUNT_H
.endif

WITH_VLC_DEFAULT_FONT?= ${LOCALBASE}/lib/X11/fonts/bitstream-vera/Vera.ttf

.if ${PERL_LEVEL} < 500800
BROKEN= Does not compile with perl ${PERL_VERSION}
.endif

.if !defined(WITHOUT_QT4) && !defined(WITHOUT_X11)
USE_QT_VER+=    4
QT_COMPONENTS+= gui corelib moc_build rcc_build uic_build
CONFIGURE_ARGS+=--enable-qt4
.else
CONFIGURE_ARGS+=--disable-qt4
.endif

.if defined(WITHOUT_DBUS)
CONFIGURE_ARGS+=--disable-dbus
.else
LIB_DEPENDS+=   dbus-1.3:${PORTSDIR}/devel/dbus
CONFIGURE_ARGS+=--enable-dbus
.endif

# compatible knobs.
.if defined(WITH_DEBUG)
DEBUG=  yes
.endif

.if defined(WITH_LIBMPEG2)
WITH_MPEG2=yes
.endif

.if defined(WITH_LIBCACA)
WITH_CACA=yes
.endif

.if defined(WITH_LIBA52)
WITH_A52=yes
.endif

.if defined(WITH_SMB)
WITH_SAMBA=yes
.endif

.if defined(WITH_LIBMATROSKA)
WITH_MATROSKA=yes
.endif

.if defined(WITH_LIBTREMOR)
WITH_TREMOR=yes
.endif
# end compatible knobs

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=--disable-nls
.else
USE_GETTEXT=    yes
.endif

.if defined(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
DEFAULT_DVD_DEVICE=/dev/acd0
.endif

.if !defined(WITHOUT_GNOMEVFS) && !defined(WITHOUT_X11)
USE_GNOME+= gnomevfs2
CONFIGURE_ARGS+=    --enable-gnomevfs
.else
CONFIGURE_ARGS+=    --disable-gnomevfs
.endif

.if defined(WITH_CDROM_DEVICE)
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE}
.else
DEFAULT_CDROM_DEVICE=/dev/acd0
.endif

.if !defined(WITHOUT_LIBNOTIFY) && !defined(WITHOUT_X11)
LIB_DEPENDS+=   notify.1:${PORTSDIR}/devel/libnotify
CONFIGURE_ARGS+=--enable-notify
.else
CONFIGURE_ARGS+=--disable-notify
.endif

.if defined(WITH_SKINS) && !defined(WITHOUT_SKINS) && !defined(WITHOUT_QT4) && !defined(WITHOUT_X11)
LIB_DEPENDS+=   tar.0:${PORTSDIR}/devel/libtar
CONFIGURE_ARGS+=--enable-skins2 --enable-libtar
.else
CONFIGURE_ARGS+=--disable-skins2 --disable-libtar
.endif

.if ${ARCH}=="i386" && defined(WITH_WIN32_CODECS)
RUN_DEPENDS+=   ${LOCALBASE}/lib/win32/wmv8ds32.ax:${PORTSDIR}/multimedia/win32-codecs
CONFIGURE_ARGS+=--enable-loader
.else
CONFIGURE_ARGS+=--disable-loader
.endif

.if defined(WITH_JACK) && !defined(WITHOUT_JACK)
LIB_DEPENDS+=   jack.0:${PORTSDIR}/audio/jack
CONFIGURE_ARGS+=--enable-jack
.else
CONFIGURE_ARGS+=--disable-jack
.endif

.if defined(WITH_REMOTE_OSD)
LIB_DEPENDS+=   gcrypt.16:${PORTSDIR}/security/libgcrypt
CONFIGURE_ARGS+=--enable-remoteosd
.else
CONFIGURE_ARGS+=--disable-remoteosd
.endif

.if defined(WITH_PULSEAUDIO) && !defined(WITHOUT_PULSEAUDIO)
LIB_DEPENDS+=   pulse.0:${PORTSDIR}/audio/pulseaudio
CONFIGURE_ARGS+=--enable-pulse
.else
CONFIGURE_ARGS+=--disable-pulse
.endif

.if defined(WITH_FLUIDSYNTH) && !defined(WITHOUT_FLUIDSYNTH)
LIB_DEPENDS+=   fluidsynth.2:${PORTSDIR}/audio/fluidsynth
CONFIGURE_ARGS+=--enable-fluidsynth
.else
CONFIGURE_ARGS+=--disable-fluidsynth
.endif

.if !defined(WITHOUT_ZVBI)
LIB_DEPENDS+=   zvbi.13:${PORTSDIR}/devel/libzvbi
CONFIGURE_ARGS+=--enable-zvbi
.else
CONFIGURE_ARGS+=--disable-zvbi
.endif

.if !defined(WITHOUT_HAL) && !defined(WITHOUT_X11)
LIB_DEPENDS+=   hal.1:${PORTSDIR}/sysutils/hal
CONFIGURE_ARGS+=--enable-hal
.else
CONFIGURE_ARGS+=--disable-hal
.endif

.if (defined(WITH_ARTS) || exists(${LOCALBASE}/lib/libartsc.so)) && !defined(WITHOUT_ARTS) && !defined(WITHOUT_X11)
LIB_DEPENDS+=    artsc.0:${PORTSDIR}/audio/arts
CONFIGURE_ARGS+=    --enable-arts
.else
CONFIGURE_ARGS+=    --disable-arts
.endif

.if !defined(WITHOUT_AVAHI)
LIB_DEPENDS+=   avahi-common.3:${PORTSDIR}/net/avahi-app
CONFIGURE_ARGS+=    --enable-bonjour
.else
CONFIGUE_ARGS+=     --disable-bonjour
.endif

.if !defined(WITHOUT_CDROM)
LIB_DEPENDS+=   vcdinfo.2:${PORTSDIR}/multimedia/vcdimager \
        cdio.12:${PORTSDIR}/sysutils/libcdio
CONFIGURE_ARGS+=--enable-vcd \
        --enable-libcddb \
        --disable-cddax
.else
CONFIGURE_ARGS+=--disable-vcd \
        --disable-libcddb \
        --disable-libcdio \
        --disable-cddax
.endif

.if !defined(WITHOUT_CDPARANOIA) && !defined(WITHOUT_CDROM)
LIB_DEPENDS+=   cdda_interface.0:${PORTSDIR}/audio/cdparanoia
CONFIGURE_ARGS+=--enable-cdda \
        --enable-cddax
.else
CONFIGURE_ARGS+=--disable-cdda \
        --disable-cddax
.endif

.if !defined(WITHOUT_DVBPSI)
LIB_DEPENDS+=   dvbpsi.5:${PORTSDIR}/multimedia/libdvbpsi
CONFIGURE_ARGS+=--enable-dvbpsi \
        --with-dvbpsi=${LOCALBASE}
.else
CONFIGURE_ARGS+=--disable-dvbpsi
.endif

.if !defined(WITHOUT_DVDNAV)
LIB_DEPENDS+=   dvdnav.4:${PORTSDIR}/multimedia/libdvdnav
CONFIGURE_ARGS+=--enable-dvdnav
.else
CONFIGURE_ARGS+=--disable-dvdnav
.endif

.if defined(WITH_DVDREAD) && !defined(WITHOUT_DVDREAD)
LIB_DEPENDS+=   dvdread.4:${PORTSDIR}/multimedia/libdvdread
CONFIGURE_ARGS+=--enable-dvdread
.else
CONFIGURE_ARGS+=--disable-dvdread
.endif

.if (defined(WITH_ESOUND) || defined(HAVE_GNOME) && ${HAVE_GNOME:Mesound}!="") && !defined(WITHOUT_ESOUND) && !defined(WITHOUT_X11)
USE_GNOME+= esound
CONFIGURE_ARGS+=--enable-esd
.else
CONFIGURE_ARGS+=--disable-esd
.endif

.if defined(WITH_FAAC) && !defined(WITHOUT_FAAC)
CONFIGURE_ARGS+=--with-ffmpeg-faac
LIB_DEPENDS+=   faac.0:${PORTSDIR}/audio/faac
.endif

.if (defined(WITH_FAAD) || exists(${LOCALBASE}/lib/libfaad.a)) && !defined(WITHOUT_FAAD)
LIB_DEPENDS+=   faad.2:${PORTSDIR}/audio/faad
CONFIGURE_ARGS+=--enable-faad
.else
CONFIGURE_ARGS+=--disable-faad
.endif

.if (defined(WITH_FLAC) || exists(${LOCALBASE}/lib/libFLAC.a)) && !defined(WITHOUT_FLAC)
LIB_DEPENDS+=   FLAC.10:${PORTSDIR}/audio/flac
CONFIGURE_ARGS+=--enable-flac
.else
CONFLGIRE_ARGS+=--disable-flac
.endif

.if (defined(WITH_FRIBIDI) || exists(${LOCALBASE}/bin/fribidi-config)) && !defined(WITHOUT_FRIBIDI)
LIB_DEPENDS+=   fribidi.3:${PORTSDIR}/converters/fribidi
CONFIGURE_ARGS+=--enable-fribidi
.else
CONFIGURE_ARGS+=--disable-fribidi
.endif

.if (defined(WITH_AALIB) || exists(${LOCALBASE}/lib/libaa.so.1)) && !defined(WITHOUT_AALIB)
LIB_DEPENDS+=   aa.1:${PORTSDIR}/graphics/aalib
CONFIGURE_ARGS+=--enable-aa
.else
CONFIGURE_ARGS+=--disable-aa
.endif

.if (defined(WITH_DIRAC) || exists(${LOCALBASE}/lib/libdirac_decoder.a)) && !defined(WITHOUT_DIRAC)
BROKEN=     doesn't build with dirac
LIB_DEPENDS+=   dirac_encoder.0:${PORTSDIR}/multimedia/dirac
CONFIGURE_ARGS+=--enable-dirac
CPPFLAGS+=  -I${LOCALBASE}/include/dirac
.else
CONFIGURE_ARGS+=--disable-dirac
.endif

.if defined(WITH_SCHROEDINGER) && !defined(WITHOUT_SCHROEDINGER)
LIB_DEPENDS+=   schroedinger-1.0.2:${PORTSDIR}/multimedia/schroedinger
CONFIGURE_ARGS+=--enable-schroedinger
.else
CONFIGURE_ARGS+=--disable-schroedinger
.endif

.if !defined(WITHOUT_X264)
CONFIGURE_ARGS+=--enable-x264
LIB_DEPENDS+=   x264.65:${PORTSDIR}/multimedia/x264
.else
CONFIGURE_ARGS+=--disable-x264
.endif

.if (defined(WITH_LUA) || exists(${LOCALBASE}/lib/lua51/liblua.a)) && !defined(WITHOUT_LUA)
USE_LUA=5.1+
WANT_LUA_VER=5.1
CONFIGURE_ENV=  LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua"
CONFIGURE_ARGS+=--enable-lua
.else
CONFIGURE_ARGS+=--disable-lua
.endif

.if (defined(WITH_CACA) || exists(${LOCALBASE}/lib/libcaca.a)) && !defined(WITHOUT_CACA)
.if !defined(WITHOUT_AALIB)
WITH_AALIB= yes
LIB_DEPENDS+=   caca.0:${PORTSDIR}/graphics/libcaca
CONFIGURE_ARGS+=--enable-caca
.endif
.else
CONFIGURE_ARGS+=--disable-caca
.endif

.if !defined(WITHOUT_DTS)
LIB_DEPENDS+=   dca.0:${PORTSDIR}/multimedia/libdca
CONFIGURE_ARGS+=--enable-dca
.else
CONFIGURE_ARGS+=--disable-dca
.endif

.if defined(WITHOUT_HTTPD)
CONFIGURE_ARGS+=--disable-httpd
.endif

.if (defined(WITH_GGI) || exists(${LOCALBASE}/lib/libggi.a)) && !defined(WITHOUT_GGI)
LIB_DEPENDS+=   ggi.2:${PORTSDIR}/graphics/libggi
CONFIGURE_ARGS+=--enable-ggi
.else
CONFIGURE_ARGS+=--disable-ggi
.endif

.if !defined(WITHOUT_MATROSKA)
LIB_DEPENDS+=   matroska.0:${PORTSDIR}/multimedia/libmatroska
CONFIGURE_ARGS+=--enable-mkv
.else
CONFIGURE_ARGS+=--disable-mkv
.endif

.if !defined(WITHOUT_A52)
LIB_DEPENDS+=   a52.0:${PORTSDIR}/audio/liba52
CONFIGURE_ARGS+=--enable-a52
.else
CONFIGURE_ARGS+=--disable-a52
.endif

.if defined(WITH_VLC_MOZILLA_PLUGIN) && !defined(WITHOUT_VLC_MOZILLA_PLUGIN)
USE_GECKO=  libxul seamonkey
USE_WEBPLUGINS= gecko*
WEBPLUGINS_FILES=libvlcplugin.so
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
CONFIGURE_ENV+= MOZILLA_CONFIG="${GECKO_CONFIG}" \
        XPIDL="${XPIDL}" \
        XPIDL_INCL="${XPIDL_INCL}"
CONFIGURE_ARGS+=--enable-mozilla
.endif

.if !defined(WITHOUT_MPEG2)
LIB_DEPENDS+=   mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
CONFIGURE_ARGS+=--enable-libmpeg2
.else
CONFIGURE_ARGS+=--disable-libmpeg2
.endif

.if !defined(WITHOUT_REALAUDIO)
CONFIGURE_ARGS+=    --enable-real \
            --enable-realrtsp
.endif

.if (defined(WITH_SHOUT) || exists(${LOCALBASE}/lib/libshout.a)) && !defined(WITHOUT_SHOUT)
LIB_DEPENDS+=   shout.5:${PORTSDIR}/audio/libshout2
CONFIGURE_ARGS+=    --enable-shout
.endif

.if (defined(WITH_THEORA) || exists(${LOCALBASE}/lib/libtheora.a)) && !defined(WITHOUT_THEORA)
LIB_DEPENDS+=   theora.0:${PORTSDIR}/multimedia/libtheora
CONFIGURE_ARGS+=--enable-theora
.else
CONFIGURE_ARGS+=--disable-theora
.endif

.if (defined(WITH_LIVEMEDIA) || exists(${LOCALBASE}/live/liveMedia/libliveMedia.a)) && !defined(WITHOUT_LIVEMEDIA)
BUILD_DEPENDS+= ${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia
CONFIGURE_ARGS+=--enable-live555 \
        --with-live555-tree=${LOCALBASE}/live
.else
CONFIGURE_ARGS+=--disable-live555
.endif

.if !defined(WITHOUT_TAGLIB)
LIB_DEPENDS+=   tag.1:${PORTSDIR}/audio/taglib
CONFIGURE_ARGS+=--enable-taglib
.else
CONFIGURE_ARGS+=--disable-taglib
.endif

.if !defined(WITHOUT_MAD)
LIB_DEPENDS+=   id3tag.0:${PORTSDIR}/audio/libid3tag \
        mad.2:${PORTSDIR}/audio/libmad
CONFIGURE_ARGS+=--enable-mad \
        --with-mad=${LOCALBASE}
.else
CONFIGURE_ARGS+=--disable-mad
.endif

.if !defined(WITHOUT_MODDEMUX)
LIB_DEPENDS+=   modplug.0:${PORTSDIR}/audio/libmodplug
CONFIGURE_ARGS+=--enable-mod
.else
CONFIGURE_ARGS+=--disable-mod
.endif

.if !defined(WITHOUT_MPCDEMUX)
LIB_DEPENDS+=   mpcdec.5:${PORTSDIR}/audio/libmpcdec
CONFIGURE_ARGS+=--enable-mpc
.else
CONFIGURE_ARGS+=--disable-mpc
.endif

.if !defined(WITHOUT_OGG)
LIB_DEPENDS+=   ogg.6:${PORTSDIR}/audio/libogg
CONFIGURE_ARGS+=--enable-ogg
.else
CONFIGURE_ARGS+=--disable-ogg
WITHOUT_VORBIS= yes
.endif

.if defined(WITH_NCURSES) && !defined(WITHOUT_NCURSES)
CONFIGURE_ARGS+=--enable-ncurses
.endif

.if !defined(WITHOUT_SAMBA)
LIB_DEPENDS+=   smbclient.0:${PORTSDIR}/net/samba-libsmbclient
CONFIGURE_ARGS+=--enable-smb
.else
CONFIGURE_ARGS+=--disable-smb
.endif

.if !defined(WITHOUT_SDL) && !defined(WITHOUT_X11)
USE_SDL=    image
CONFIGURE_ARGS+=--enable-sdl
.else
CONFIGURE_ARGS+=--disable-sdl
.endif

.if defined(WITH_TRANSCODE) || exists(${LOCALBASE}/bin/transcode)
RUN_DEPENDS+=   transcode:${PORTSDIR}/multimedia/transcode
.endif

.if !defined(WITHOUT_HTTPD)
LIB_DEPENDS+=   gnutls.40:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=--enable-gnutls
.else
CONFIGURE_ARGS+=--disable-gnutls
.endif

.if !defined(WITHOUT_SPEEX)
LIB_DEPENDS+=   speex.1:${PORTSDIR}/audio/speex
CONFIGURE_ARGS+=--enable-speex
CPPFLAGS+=-I${LOCALBASE}/include/speex
.else
CONFIGURE_ARGS+=--disable-speex
.endif

.if defined(WITHOUT_STREAM_PLUGINS)
CONFIGURE_ARGS+=--disable-sout
.endif

.if (defined(WITH_SVG) || defined(HAVE_GNOME) && ${HAVE_GNOME:Mlibrsvg2}!="") && !defined(WITHOUT_SVG) && !defined(WITHOUT_X11)
USE_GNOME+= librsvg2
CONFIGURE_ARGS+=--enable-svg
.else
CONFIGURE_ARGS+=--disable-svg
.endif

.if (defined(WITH_SVGALIB) || exists(${LOCALBASE}/lib/lib/vga.a)) && !defined(WITHOUT_SVGALIB)
LIB_DEPENDS+=   vga.1:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+=--enable-svgalib
.else
CONFIGURE_ARGS+=--disable-svgalib
.endif

.if (defined(WITH_TREMOR) || exists(${LOCALBASE}/lib/libvorbisidec.a)) && !defined(WITHOUT_TREMOR)
LIB_DEPENDS+=   vorbisidec.1:${PORTSDIR}/audio/libtremor
.else
CONFIGURE_ARGS+=--disable-tremor
.endif

.if (defined(WITH_TWOLAME) || exists(${LOCALBASE}/lib/libtwolame.a)) && !defined(WITHOUT_TWOLAME)
LIB_DEPENDS+=       twolame.0:${PORTSDIR}/audio/twolame
CONFIGURE_ARGS+=    --enable-twolame
.else
CONFIGURE_ARGS+=    --disable-twolame
.endif

.if !defined(WITHOUT_VORBIS)
LIB_DEPENDS+=   vorbis.4:${PORTSDIR}/audio/libvorbis
CONFIGURE_ARGS+=--enable-vorbis
.else
CONFIGURE_ARGS+=--disable-vorbis
.endif

.if (defined(WITH_XOSD) || exists(${LOCALBASE}/lib/libxosd.a)) && !defined(WITHOUT_XOSD)
LIB_DEPENDS+=   xosd.4:${PORTSDIR}/misc/xosd
CONFIGURE_ARGS+=--enable-xosd
.else
CONFIGURE_ARGS+=--disable-xosd
.endif

.if defined(DEBUG)
CONFIGURE_ARGS+=--enable-debug
.else
CONFIGURE_ARGS+=--enable-release
.endif

.if defined(WITH_OCFLAGS)
CFLAGS+=    -O3 -ffast-math -fomit-frame-pointer
CONFIGURE_ARGS+=--enable-optimizations
.endif

.if defined(WITHOUT_V4L)
CONFIGURE_ARGS+=--disable-v4l
.else
BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat
CONFIGURE_ARGS+=--enable-v4l
.endif

.if defined(WITHOUT_X11)
CONFIGURE_ARGS+=--disable-x11
.else
USE_XORG=   xpm
BUILD_DEPENDS+= ${LOCALBASE}/include/X11/xpm.h:${PORTSDIR}/x11/libXpm
CONFIGURE_ARGS+=--enable-x11
.endif

.include "${.CURDIR}/Makefile.inc"
.include <bsd.port.post.mk>