configure.in 13.1 KB
Newer Older
1
2
3
dnl Autoconf settings for vlc
AC_INIT(src/interface/main.c)
AC_CONFIG_HEADER(include/defs.h)
4

5
6
AC_CANONICAL_HOST

Sam Hocevar's avatar
   
Sam Hocevar committed
7
VLC_VERSION=0.2.72
8
AC_SUBST(VLC_VERSION)
Sam Hocevar's avatar
   
Sam Hocevar committed
9
VLC_CODENAME=Ourumov
10
11
12
13
AC_SUBST(VLC_CODENAME)

dnl Check for tools
AC_PROG_MAKE_SET
Sam Hocevar's avatar
   
Sam Hocevar committed
14
15
AC_PROG_CC
AC_PROG_CPP
16
17
18
19
20
21
22
23
24
25
26

dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL

dnl Check for compiler environment
AC_C_CONST
AC_C_BIGENDIAN

dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
AC_CHECK_FUNCS(setenv putenv)
Sam Hocevar's avatar
   
Sam Hocevar committed
27
28
29
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")])
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")])
AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")])])
30
AC_CHECK_FUNCS(usleep)
Sam Hocevar's avatar
   
Sam Hocevar committed
31
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")])
Sam Hocevar's avatar
   
Sam Hocevar committed
32
AC_CHECK_FUNCS(vasprintf)
Sam Hocevar's avatar
   
Sam Hocevar committed
33
34
35
36

AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
  AC_CHECK_LIB([gnugetopt],[getopt_long],
Sam Hocevar's avatar
   
Sam Hocevar committed
37
    [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
Sam Hocevar's avatar
   
Sam Hocevar committed
38
    [GETOPT=1])])
Sam Hocevar's avatar
   
Sam Hocevar committed
39
40
AC_SUBST(GETOPT)

41
42
AC_FUNC_MMAP
AC_TYPE_SIGNAL
Sam Hocevar's avatar
   
Sam Hocevar committed
43
44
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
Sam Hocevar's avatar
   
Sam Hocevar committed
45
46
47
48
49
50
51
52
AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
AC_EGREP_CPP(yes,
	[#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
	  yes
	#endif
	], AC_MSG_RESULT(yes)
	DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread",
	AC_MSG_RESULT(no)
Sam Hocevar's avatar
   
Sam Hocevar committed
53
54
	AC_CHECK_LIB(pthread,pthread_create,LIB="${LIB} -lpthread"))
AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads")
55

Christophe Massiot's avatar
Christophe Massiot committed
56
57
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
AC_CHECK_HEADERS(stddef.h)
Benoit Steiner's avatar
   
Benoit Steiner committed
58
59
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(sys/sockio.h)
Sam Hocevar's avatar
   
Sam Hocevar committed
60
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
61
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
62
63
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
Christophe Massiot's avatar
Christophe Massiot committed
64
AC_CHECK_HEADERS(machine/param.h)
65
66

dnl Check for threads library
67
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
68

Sam Hocevar's avatar
   
Sam Hocevar committed
69
dnl Do a series of bizarre compilation tests
Christophe Massiot's avatar
Christophe Massiot committed
70
save_CFLAGS=$CFLAGS
Sam Hocevar's avatar
   
Sam Hocevar committed
71
72

dnl Check for ntohl, etc.
Christophe Massiot's avatar
Christophe Massiot committed
73
74
75
76
CFLAGS="${CFLAGS} -Wall -Werror"
AC_MSG_CHECKING([for ntohl in sys/param.h])
AC_TRY_COMPILE([#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }],,
Sam Hocevar's avatar
   
Sam Hocevar committed
77
78
79
80
 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in <sys/param.h>.)
 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

dnl Check for -rdynamic flag
81
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
Sam Hocevar's avatar
   
Sam Hocevar committed
82
AC_MSG_CHECKING([if \$CC groks -rdynamic without complaining too much])
Sam Hocevar's avatar
   
Sam Hocevar committed
83
AC_TRY_COMPILE([],,
Sam Hocevar's avatar
   
Sam Hocevar committed
84
 LCFLAGS="${LCFLAGS} -rdynamic"
Christophe Massiot's avatar
Christophe Massiot committed
85
 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
Sam Hocevar's avatar
   
Sam Hocevar committed
86
87

dnl End of the bizarre compilation tests
Christophe Massiot's avatar
Christophe Massiot committed
88
89
CFLAGS=$save_CFLAGS

90
dnl Check for boolean_t
Sam Hocevar's avatar
   
Sam Hocevar committed
91
92
93
94
95
AC_MSG_CHECKING([for boolean_t in sys/types.h])
AC_TRY_COMPILE([#include <sys/types.h>
void quux() { boolean_t foo; }],,
 AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
96
97
98
99
100
AC_MSG_CHECKING([for boolean_t in pthread.h])
AC_TRY_COMPILE([#include <pthread.h>
void quux() { boolean_t foo; }],,
 AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
Sam Hocevar's avatar
   
Sam Hocevar committed
101

102
103
104
105
106
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME

Sam Hocevar's avatar
   
Sam Hocevar committed
107
108
109
110
111
ARCH=${host_cpu}

dnl
dnl  default modules
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
112
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
113
if test x$host_os = xbeos; then
Sam Hocevar's avatar
   
Sam Hocevar committed
114
    ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
115
else
Sam Hocevar's avatar
   
Sam Hocevar committed
116
    ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
117
fi
118

Sam Hocevar's avatar
   
Sam Hocevar committed
119
120
121
122
dnl
dnl  DVD module: check for DVD ioctls
dnl
AC_CHECK_HEADERS(sys/ioctl.h,[
Sam Hocevar's avatar
   
Sam Hocevar committed
123
  BUILTINS="${BUILTINS} dvd"
Sam Hocevar's avatar
   
Sam Hocevar committed
124
125
126
127
128
129
130
131
132
  AC_CHECK_HEADERS(linux/cdrom.h)
  AC_EGREP_HEADER(dvd,linux/cdrom.h,[
    AC_DEFINE(LINUX_DVD,1, DVD support for linux)
  ])
])

dnl
dnl  dummy plugin
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
133
134
AC_ARG_ENABLE(dummy,
  [  --disable-dummy         dummy module (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
135
if test x$enable_dummy != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
136
  BUILTINS="${BUILTINS} dummy"; fi
Sam Hocevar's avatar
   
Sam Hocevar committed
137
138
139
140

dnl
dnl  null plugin
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
141
142
AC_ARG_ENABLE(null,
  [  --disable-null          Null module (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
143
if test x$enable_null != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
144
  BUILTINS="${BUILTINS} null"; fi
Sam Hocevar's avatar
   
Sam Hocevar committed
145
146
147
148

dnl
dnl  PentiumPro acceleration
dnl
149
AC_ARG_ENABLE(ppro,
150
[  --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)],
Sam Hocevar's avatar
   
Sam Hocevar committed
151
152
[ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ],
[ if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
153
154
155
156

dnl
dnl  MMX acceleration
dnl
157
AC_ARG_ENABLE(mmx,
Christophe Massiot's avatar
Christophe Massiot committed
158
[  --disable-mmx           Disable MMX optimizations (default enabled for x86)],
Sam Hocevar's avatar
   
Sam Hocevar committed
159
160
161
162
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
163
164
165
166

dnl
dnl  AltiVec acceleration
dnl
167
AC_ARG_ENABLE(altivec,
168
[  --enable-altivec        Enable altivec optimizations (default disabled since it is broken)],
Sam Hocevar's avatar
   
Sam Hocevar committed
169
170
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec";
    BUILTINS="${BUILTINS} idctaltivec"
Sam Hocevar's avatar
   
Sam Hocevar committed
171
172
    LIB_IDCTALTIVEC="-framework vecLib"
  fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
173
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
174
175
176
177

dnl
dnl  CSS DVD decryption
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
178
179
180
181
AC_ARG_ENABLE(css,
[  --disable-css           Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
Sam Hocevar's avatar
   
Sam Hocevar committed
182
183
184
185

dnl
dnl  Debugging mode
dnl
186
AC_ARG_ENABLE(debug,
187
[  --enable-debug          Enable debug mode (default disabled)],
188
[ if test x$enableval = xyes; then DEBUG=1; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
189
190
191
192

dnl
dnl  Enable/disable statistics
dnl
193
AC_ARG_ENABLE(stats,
194
[  --enable-stats          Enable printing of statistics (default disabled)],
195
[ if test x$enableval = xyes; then STATS=1; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
196
197
198
199

dnl
dnl  Enable/disable optimizations
dnl
200
AC_ARG_ENABLE(optimizations,
201
[  --disable-optimizations Disable compiler optimizations (default enabled)],
202
203
[ if test x$enableval = xno; then OPTIMS=0; fi ],
[ OPTIMS=1 ])
204
205
206

SYS=${host_os}

Sam Hocevar's avatar
   
Sam Hocevar committed
207
dnl special case for BeOS
208
if test x$host_os = xbeos; then
Sam Hocevar's avatar
   
Sam Hocevar committed
209
    BUILTINS="${BUILTINS} beos"
Sam Hocevar's avatar
   
Sam Hocevar committed
210
    LIB_BEOS="-lbe -lgame -lroot -ltracker"
211
212
213
214

dnl default case
else

Sam Hocevar's avatar
   
Sam Hocevar committed
215
216
217
dnl
dnl  OSS /dev/dsp module
dnl
218
AC_ARG_ENABLE(dsp,
219
  [  --disable-dsp           Linux /dev/dsp support (default enabled)])
220
if test x$enable_dsp != xno; then
221
  if test -c /dev/dsp; then
Sam Hocevar's avatar
   
Sam Hocevar committed
222
    PLUGINS="${PLUGINS} dsp"
223
224
  fi
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
225
226
227
228

dnl
dnl  Esound module
dnl
229
AC_ARG_ENABLE(esd,
230
  [  --enable-esd            Esound library support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
231
  [if test x$enable_esd = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
232
233
     AC_PATH_PROG(ESD_CONFIG, esd-config, no)
     if test x${ESD_CONFIG} != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
234
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
   
Sam Hocevar committed
235
236
       LIB_ESD="`${ESD_CONFIG} --libs`"
     fi
Sam Hocevar's avatar
   
Sam Hocevar committed
237
238
239
240
241
   fi])

dnl
dnl  Darwin module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
242
243
AC_ARG_ENABLE(darwin,
  [  --enable-darwin         Darwin sound support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
244
  [if test x$enable_darwin = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
245
     PLUGINS="${PLUGINS} darwin"
Sam Hocevar's avatar
   
Sam Hocevar committed
246
247
248
249
250
251
     LIB_DARWIN="-framework CoreAudio"
   fi])

dnl
dnl  MacOS X module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
252
AC_ARG_ENABLE(macosx,
253
  [  --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)],
Sam Hocevar's avatar
   
Sam Hocevar committed
254
  [if test x$enable_macosx = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
255
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
   
Sam Hocevar committed
256
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
   
Sam Hocevar committed
257
258
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
   
Sam Hocevar committed
259
260
   fi],
  [AC_CHECK_HEADERS(Carbon/Carbon.h,
Sam Hocevar's avatar
   
Sam Hocevar committed
261
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
   
Sam Hocevar committed
262
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
   
Sam Hocevar committed
263
264
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
   
Sam Hocevar committed
265
266
267
268
269
   )])

dnl
dnl  Linux framebuffer module
dnl
270
271
AC_ARG_ENABLE(fb,
  [  --enable-fb             Linux framebuffer support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
272
  [if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi])
Sam Hocevar's avatar
   
Sam Hocevar committed
273
274
275
276

dnl
dnl  GGI module
dnl
Christophe Massiot's avatar
Christophe Massiot committed
277
278
AC_ARG_WITH(ggi,
  [  --with-ggi[=name]       GGI support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
279
  [ if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
280
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
281
      PLUGINS="${PLUGINS} ggi";
Sam Hocevar's avatar
   
Sam Hocevar committed
282
283
284
285
286
287
      if test "x$withval" != "xyes";
      then
        LIB_GGI="-l"$withval
      else
        LIB_GGI="-lggi"
      fi
Christophe Massiot's avatar
Christophe Massiot committed
288
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
289
290
291
292

dnl
dnl  SDL module
dnl
Christophe Massiot's avatar
Christophe Massiot committed
293
AC_ARG_WITH(sdl,
Sam Hocevar's avatar
   
Sam Hocevar committed
294
  [  --with-sdl[=name]       SDL support (default enabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
295
  [ if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
296
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
297
      PLUGINS="${PLUGINS} sdl";
Sam Hocevar's avatar
   
Sam Hocevar committed
298
299
      if test "x$withval" != "xyes";
      then
Sam Hocevar's avatar
   
Sam Hocevar committed
300
301
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -l"$withval
        INCLUDE="${INCLUDE} -I"$withval"/include"
Sam Hocevar's avatar
   
Sam Hocevar committed
302
      else
303
        AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit])
Sam Hocevar's avatar
   
Sam Hocevar committed
304
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
Sam Hocevar's avatar
   
Sam Hocevar committed
305
      fi
Christophe Massiot's avatar
Christophe Massiot committed
306
    fi ])
307
    if test "x$withval" = "x";
Sam Hocevar's avatar
   
Sam Hocevar committed
308
    then
309
      AC_CHECK_HEADERS(SDL/SDL.h,
Sam Hocevar's avatar
   
Sam Hocevar committed
310
311
      [PLUGINS="${PLUGINS} sdl"
       LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"])
Sam Hocevar's avatar
   
Sam Hocevar committed
312
    fi
Sam Hocevar's avatar
   
Sam Hocevar committed
313
314
315
316

dnl
dnl  Glide module
dnl
Christophe Massiot's avatar
Christophe Massiot committed
317
318
AC_ARG_WITH(glide,
  [  --with-glide[=name]     Glide (3dfx) support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
319
  [ if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
320
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
321
      PLUGINS="${PLUGINS} glide";
Sam Hocevar's avatar
   
Sam Hocevar committed
322
323
324
325
326
327
      if test "x$withval" != "xyes";
      then
        LIB_GLIDE="-l"$withval
      else
        LIB_GLIDE="-lglide2x"
      fi
Christophe Massiot's avatar
Christophe Massiot committed
328
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
329
330
331
332

dnl
dnl  ncurses module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
333
334
AC_ARG_ENABLE(ncurses,
  [  --enable-ncurses        ncurses interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
335
  [if test x$enable_ncurses = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
336
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
   
Sam Hocevar committed
337
338
339
340
341
342
     LIB_NCURSES="-lncurses"
   fi])

dnl
dnl  Qt module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
343
344
AC_ARG_ENABLE(qt,
  [  --enable-qt             Qt interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
345
  [if test x$enable_qt = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
346
347
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
   
Sam Hocevar committed
348
349
350
351
352
353
     LIB_QT="-lqt -L${QTDIR}/lib"
   fi])

dnl 
dnl  KDE module
dnl
354
355
AC_ARG_ENABLE(kde,
  [  --enable-kde            KDE interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
356
  [if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi])
Sam Hocevar's avatar
   
Sam Hocevar committed
357
358
359
360

dnl
dnl  Gnome module
dnl
361
AC_ARG_ENABLE(gnome,
Sam Hocevar's avatar
   
Sam Hocevar committed
362
  [  --enable-gnome          Gnome interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
363
  [if test x$enable_gnome = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
364
365
     PLUGINS="${PLUGINS} gnome"
     ALIASES="${ALIASES} gnome-vlc"
Sam Hocevar's avatar
   
Sam Hocevar committed
366
367
368
369
370
371
     LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
   fi])

dnl
dnl  Gtk+ module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
372
373
AC_ARG_ENABLE(gtk,
  [  --disable-gtk           Gtk+ support (default enabled)])
374
if test x$enable_gtk != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
375
376
  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
  if test x${GTK_CONFIG} != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
377
378
    PLUGINS="${PLUGINS} gtk"
    ALIASES="${ALIASES} gvlc"
Sam Hocevar's avatar
   
Sam Hocevar committed
379
380
    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
381
382
  fi
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
383
384
385
386

dnl
dnl  X11 module
dnl
387
AC_ARG_ENABLE(x11,
Sam Hocevar's avatar
   
Sam Hocevar committed
388
  [  --disable-x11           X11 support (default enabled)])
389
if test x$enable_x11 != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
390
391
392
393
394
395
396
397
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
Sam Hocevar's avatar
   
Sam Hocevar committed
398
  AC_CHECK_HEADERS(X11/Xlib.h, [
Sam Hocevar's avatar
   
Sam Hocevar committed
399
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
   
Sam Hocevar committed
400
401
402
403
    LIB_X11="-L$x_libraries -lX11 -lXext"
    CFLAGS_X11="-I$x_includes"
  ]
  CPPFLAGS=$saved_CPPFLAGS)
404
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
405
406
407
408

dnl
dnl  XVideo module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
409
AC_ARG_ENABLE(xvideo,
Sam Hocevar's avatar
   
Sam Hocevar committed
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
  [  --disable-xvideo        XVideo support (default enabled)])
if test x$enable_xvideo != xno; then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
  AC_CHECK_HEADERS(X11/extensions/Xv.h, [
    PLUGINS="${PLUGINS} xvideo"
    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
    CFLAGS_X11="-I$x_includes"
  ]
  CPPFLAGS=$saved_CPPFLAGS)
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
427
428
429
430

dnl
dnl  ALSA module
dnl
Henri Fallon's avatar
   
Henri Fallon committed
431
AC_ARG_ENABLE(alsa,
432
  [  --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
433
434
  [if test x$enable_alsa = xyes; then AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false") if test x$have_alsa = xtrue; then
     PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
   
Sam Hocevar committed
435
436
     LIB_ALSA="-lasound"
   fi; fi])
Sam Hocevar's avatar
   
Sam Hocevar committed
437

Sam Hocevar's avatar
   
Sam Hocevar committed
438
dnl  end of non-BeOS stuff
439
440
fi

Sam Hocevar's avatar
   
Sam Hocevar committed
441
442
443
dnl 
dnl  Configuration is finished
dnl
444
445
AC_SUBST(SYS)
AC_SUBST(ARCH)
446
AC_SUBST(PLUGINS)
Sam Hocevar's avatar
   
Sam Hocevar committed
447
AC_SUBST(BUILTINS)
448
AC_SUBST(ALIASES)
Sam Hocevar's avatar
   
Sam Hocevar committed
449
AC_SUBST(DEFINE)
Sam Hocevar's avatar
   
Sam Hocevar committed
450
AC_SUBST(INCLUDE)
451
452
453
AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(OPTIMS)
Sam Hocevar's avatar
   
Sam Hocevar committed
454
AC_SUBST(CSS)
Sam Hocevar's avatar
   
Sam Hocevar committed
455
456
457
458

AC_SUBST(LCFLAGS)
AC_SUBST(LIB)

Sam Hocevar's avatar
   
Sam Hocevar committed
459
460
461
462
AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_DARWIN)
AC_SUBST(LIB_ESD)
Christophe Massiot's avatar
Christophe Massiot committed
463
AC_SUBST(LIB_GGI)
Sam Hocevar's avatar
   
Sam Hocevar committed
464
465
466
467
468
469
470
471
472
473
474
475
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GNOME)
AC_SUBST(LIB_GTK)
AC_SUBST(LIB_IDCTALTIVEC)
AC_SUBST(LIB_MACOSX)
AC_SUBST(LIB_NCURSES)
AC_SUBST(LIB_QT)
AC_SUBST(LIB_TS)
AC_SUBST(LIB_SDL)
AC_SUBST(LIB_X11)
AC_SUBST(LIB_XVIDEO)
AC_SUBST(LIB_YUV)
476

Sam Hocevar's avatar
   
Sam Hocevar committed
477
478
479
AC_SUBST(CFLAGS_GTK)
AC_SUBST(CFLAGS_X11)

Sam Hocevar's avatar
   
Sam Hocevar committed
480
AC_OUTPUT([Makefile.opts include/config.h])
481

482
483
484
485
486
487
echo "
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
system                : ${SYS}
architecture          : ${ARCH}
488
489
490
debug mode            : ${DEBUG}
statistics            : ${STATS}
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
   
Sam Hocevar committed
491
CSS decryption        : ${CSS}
Sam Hocevar's avatar
   
Sam Hocevar committed
492
493
494
need builtin getopt   : ${GETOPT}
plugin modules        : ${PLUGINS}
built-in modules      : ${BUILTINS}
495
vlc aliases           : ${ALIASES}
Sam Hocevar's avatar
   
Sam Hocevar committed
496
497

You may now tune Makefile.opts at your convenience."
498