configure.in 22.3 KB
Newer Older
Sam Hocevar's avatar
   
Sam Hocevar committed
1
dnl Autoconf settings for vlc and libdvdcss
Sam Hocevar's avatar
   
Sam Hocevar committed
2
AC_INIT(include/common.h)
3
AC_CONFIG_HEADER(include/defs.h)
4

5
6
AC_CANONICAL_HOST

Sam Hocevar's avatar
   
Sam Hocevar committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
HAVE_VLC=0
if test -r src/interface/main.c; then
  HAVE_VLC=1
  VLC_VERSION=0.2.81
  AC_SUBST(VLC_VERSION)
  VLC_CODENAME=Ourumov
  AC_SUBST(VLC_CODENAME)
fi

HAVE_LIBDVDCSS=0
if test -r extras/libdvdcss/libdvdcss.c; then
  HAVE_LIBDVDCSS=1
  LIBDVDCSS_VERSION=0.0.2
  AC_SUBST(LIBDVDCSS_VERSION)
fi
22

Sam Hocevar's avatar
   
Sam Hocevar committed
23
24
25
dnl Save CFLAGS
save_CFLAGS="${CFLAGS}"

26
27
dnl Check for tools
AC_PROG_MAKE_SET
Sam Hocevar's avatar
   
Sam Hocevar committed
28
29
AC_PROG_CC
AC_PROG_CPP
Sam Hocevar's avatar
   
Sam Hocevar committed
30
AC_PROG_RANLIB
31
32
33
34

dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL

Sam Hocevar's avatar
   
Sam Hocevar committed
35
36
37
38
dnl Check for endianness if not cross-compiling
if test x${cross_compiling} != xyes; then
  AC_C_BIGENDIAN
fi
39
40
41
42

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
43
44
45
46
47
48
49
50
51
52
53
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")
  ])
])
54
AC_CHECK_FUNCS(usleep)
Sam Hocevar's avatar
   
Sam Hocevar committed
55
56
57
AC_CHECK_FUNC(inet_aton,,[
  AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
])
Sam Hocevar's avatar
   
Sam Hocevar committed
58
AC_CHECK_FUNCS(vasprintf)
Sam Hocevar's avatar
   
Sam Hocevar committed
59
AC_CHECK_FUNCS(swab)
Sam Hocevar's avatar
   
Sam Hocevar committed
60

Sam Hocevar's avatar
   
Sam Hocevar committed
61
62
AC_CHECK_FUNCS(sigrelse)

Sam Hocevar's avatar
   
Sam Hocevar committed
63
64
dnl Check for getopt
GETOPT=0
Sam Hocevar's avatar
   
Sam Hocevar committed
65
66
67
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
68
    [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
Sam Hocevar's avatar
   
Sam Hocevar committed
69
    [GETOPT=1])])
Sam Hocevar's avatar
   
Sam Hocevar committed
70

71
72
AC_FUNC_MMAP
AC_TYPE_SIGNAL
Sam Hocevar's avatar
   
Sam Hocevar committed
73
74
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
75

Christophe Massiot's avatar
Christophe Massiot committed
76
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
Sam Hocevar's avatar
   
Sam Hocevar committed
77
CFLAGS="${CFLAGS} -I/usr/local/include"
Sam Hocevar's avatar
   
Sam Hocevar committed
78

Sam Hocevar's avatar
   
Sam Hocevar committed
79
80
dnl Check for pthreads - borrowed from XMMS
PTHREAD_LIBS=error
Sam Hocevar's avatar
   
Sam Hocevar committed
81
82
83
AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
if test "x${THREAD_LIB}" = xerror; then
  AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
Sam Hocevar's avatar
   
Sam Hocevar committed
84
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
85
86
if test "x${THREAD_LIB}" = xerror; then
  AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
Sam Hocevar's avatar
   
Sam Hocevar committed
87
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
88
89
if test "x${THREAD_LIB}" = xerror; then
  THREAD_LIBS=""
Sam Hocevar's avatar
   
Sam Hocevar committed
90
91
  AC_CHECK_FUNC(pthread_attr_init)
fi
92

Sam Hocevar's avatar
   
Sam Hocevar committed
93
94
95
dnl Check for misc headers
AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
  AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
Sam Hocevar's avatar
   
Sam Hocevar committed
96
            Define if <pthread.h> defines pthread_cond_t.)])
Sam Hocevar's avatar
   
Sam Hocevar committed
97
98
AC_EGREP_HEADER(strncasecmp,strings.h,[
  AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
Sam Hocevar's avatar
   
Sam Hocevar committed
99
            Define if <strings.h> defines strncasecmp.)])
Sam Hocevar's avatar
   
Sam Hocevar committed
100

Sam Hocevar's avatar
   
Sam Hocevar committed
101
102
dnl Check for headers
AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
Sam Hocevar's avatar
   
Sam Hocevar committed
103
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h)
Sam Hocevar's avatar
   
Sam Hocevar committed
104
105
106
107
108
109
110
111
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(machine/param.h)

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

Sam Hocevar's avatar
   
Sam Hocevar committed
112
dnl Check for ntohl, etc.
Sam Hocevar's avatar
   
Sam Hocevar committed
113
CFLAGS="${save_CFLAGS} -Wall -Werror"
Christophe Massiot's avatar
Christophe Massiot committed
114
115
116
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
117
 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
Sam Hocevar's avatar
   
Sam Hocevar committed
118
119
 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

Sam Hocevar's avatar
   
Sam Hocevar committed
120
dnl Check for inline function size limit
Sam Hocevar's avatar
   
Sam Hocevar committed
121
CFLAGS="${save_CFLAGS} -finline-limit=31337"
Sam Hocevar's avatar
   
Sam Hocevar committed
122
123
124
125
126
AC_MSG_CHECKING([if \$CC accepts -finline-limit])
AC_TRY_COMPILE([],,
 save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; AC_MSG_RESULT(yes),
 AC_MSG_RESULT(no))

Sam Hocevar's avatar
   
Sam Hocevar committed
127
128
129
130
131
132
133
134
135
136
137
138
139
140
dnl Check for Darwin plugin linking flags
CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
AC_MSG_CHECKING([if \$CC compiles plugins with -bundle -undefined suppress])
AC_TRY_COMPILE([],,
 PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes),
 AC_MSG_RESULT(no))

dnl Check for standard plugin linking flags
CFLAGS="${save_CFLAGS} -shared"
AC_MSG_CHECKING([if \$CC compiles plugins with -shared])
AC_TRY_COMPILE([],,
 PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes),
 AC_MSG_RESULT(no))

Sam Hocevar's avatar
   
Sam Hocevar committed
141
dnl End of the bizarre compilation tests
Sam Hocevar's avatar
   
Sam Hocevar committed
142
CFLAGS="${save_CFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
143

144
dnl Check for boolean_t
Sam Hocevar's avatar
   
Sam Hocevar committed
145
146
147
148
149
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))
150
151
152
153
154
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
155

156
157
158
159
160
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
161
162
163
164
165
ARCH=${host_cpu}

dnl
dnl  default modules
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
166
167
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
PLUGINS="${PLUGINS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
168
169
170
171

dnl
dnl  Accelerated modules
dnl
gbazin's avatar
   
gbazin committed
172
173
MMX_MODULES="yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
174

Sam Hocevar's avatar
   
Sam Hocevar committed
175
176
AC_MSG_CHECKING([if \$CC groks MMX inline assembly])
AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
Sam Hocevar's avatar
   
Sam Hocevar committed
177
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
Sam Hocevar's avatar
   
Sam Hocevar committed
178
179
  AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

Sam Hocevar's avatar
   
Sam Hocevar committed
180
AC_MSG_CHECKING([if \$CC groks MMX EXT or SSE inline assembly])
Sam Hocevar's avatar
   
Sam Hocevar committed
181
AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
Sam Hocevar's avatar
   
Sam Hocevar committed
182
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
Sam Hocevar's avatar
   
Sam Hocevar committed
183
184
  AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

Sam Hocevar's avatar
   
Sam Hocevar committed
185
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
186
dnl  libdvdcss: check for DVD ioctls
Sam Hocevar's avatar
   
Sam Hocevar committed
187
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
188

Sam Hocevar's avatar
   
Sam Hocevar committed
189
190
191
dnl  default is no
CAN_BUILD_LIBDVDCSS=0

Sam Hocevar's avatar
   
Sam Hocevar committed
192
193
dnl  for windoze
AC_CHECK_HEADERS(winioctl.h,[
Sam Hocevar's avatar
   
Sam Hocevar committed
194
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
195
196
])

Sam Hocevar's avatar
   
Sam Hocevar committed
197
dnl  for Un*x and BeOS
Sam Hocevar's avatar
   
Sam Hocevar committed
198
AC_CHECK_HEADERS(sys/ioctl.h,[
Sam Hocevar's avatar
   
Sam Hocevar committed
199
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
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
  AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h)
  BSD_DVD_STRUCT=0
  dnl
  dnl Old FreeBSD: sys/cdio.h
  dnl
  AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
    AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
              Define if <sys/dvdio.h> defines dvd_struct.)
    BSD_DVD_STRUCT=1
  ])
  dnl
  dnl Newer FreeBSD: sys/dvdio.h
  dnl
  AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
    AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
              Define if <sys/cdio.h> defines dvd_struct.)
    BSD_DVD_STRUCT=1
  ])
  if test x$BSD_DVD_STRUCT = x1; then
    AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
              Define if BSD-like dvd_struct is defined.)
  fi
  dnl
  dnl Linux: linux/cdrom.h
  dnl
  AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
    AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
              Define if <linux/cdrom.h> defines DVD_STRUCT.)
Sam Hocevar's avatar
   
Sam Hocevar committed
228
229
230
  ])
])

Sam Hocevar's avatar
   
Sam Hocevar committed
231

Sam Hocevar's avatar
   
Sam Hocevar committed
232
233
234
235
236
237
238
239
240
241
242
243
dnl
dnl  Check the operating system
dnl
case ${host_os} in
  darwin*)
    SYS=darwin
    ;;
  *)
    SYS=${host_os}
    ;;
esac

Sam Hocevar's avatar
   
Sam Hocevar committed
244
245
246
dnl
dnl  PentiumPro acceleration
dnl
247
AC_ARG_ENABLE(ppro,
Sam Hocevar's avatar
   
Sam Hocevar committed
248
  [  --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)],
Sam Hocevar's avatar
   
Sam Hocevar committed
249
250
[ 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
251
252
253
254

dnl
dnl  MMX acceleration
dnl
255
AC_ARG_ENABLE(mmx,
Christophe Massiot's avatar
Christophe Massiot committed
256
[  --disable-mmx           Disable MMX optimizations (default enabled for x86)],
Sam Hocevar's avatar
   
Sam Hocevar committed
257
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
Sam Hocevar's avatar
   
Sam Hocevar committed
258
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
Sam Hocevar's avatar
   
Sam Hocevar committed
259
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
Sam Hocevar's avatar
   
Sam Hocevar committed
260
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
261
262
263
264

dnl
dnl  AltiVec acceleration
dnl
265
AC_ARG_ENABLE(altivec,
266
[  --enable-altivec        Enable altivec optimizations (default disabled since it is broken)],
Sam Hocevar's avatar
   
Sam Hocevar committed
267
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec"
Sam Hocevar's avatar
   
Sam Hocevar committed
268
    BUILTINS="${BUILTINS} idctaltivec"
Sam Hocevar's avatar
   
Sam Hocevar committed
269
270
    LIB_IDCTALTIVEC="-framework vecLib"
  fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
271
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
272
273
274
275

dnl
dnl  Debugging mode
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
276
DEBUG=0
277
AC_ARG_ENABLE(debug,
278
[  --enable-debug          Enable debug mode (default disabled)],
279
[ if test x$enableval = xyes; then DEBUG=1; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
280
281
282
283

dnl
dnl  Enable/disable statistics
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
284
STATS=0
285
AC_ARG_ENABLE(stats,
286
[  --enable-stats          Enable printing of statistics (default disabled)],
287
[ if test x$enableval = xyes; then STATS=1; fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
288

289
290
291
dnl
dnl  Trace mode
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
292
TRACE=0
293
294
295
296
AC_ARG_ENABLE(trace,
[  --enable-trace          Enable trace mode (default disabled)],
[ if test x$enableval = xyes; then TRACE=1; fi ])

Sam Hocevar's avatar
   
Sam Hocevar committed
297
298
299
dnl
dnl  Trace mode
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
300
PROFILING=0
Sam Hocevar's avatar
   
Sam Hocevar committed
301
302
303
304
AC_ARG_ENABLE(profiling,
[  --enable-profiling      Enable gprof profiling (default disabled)],
[ if test x$enableval = xyes; then PROFILING=1; fi ])

Sam Hocevar's avatar
   
Sam Hocevar committed
305
306
307
dnl
dnl  Enable/disable optimizations
dnl
308
AC_ARG_ENABLE(optimizations,
309
[  --disable-optimizations Disable compiler optimizations (default enabled)],
310
311
[ if test x$enableval = xno; then OPTIMS=0; fi ],
[ OPTIMS=1 ])
312

Sam Hocevar's avatar
   
Sam Hocevar committed
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
dnl
dnl  GNU portable threads
dnl
AC_ARG_ENABLE(pth,
  [  --enable-pth            Enable GNU Pth support (default disabled)],
  [ if test x$enableval = xyes; then
    AC_CHECK_LIB(pth,pth_init)
    AC_EGREP_HEADER(pth_init,pth.h,[
      AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
                Define if <pth.h> defines pth_init)
    THREAD_LIB="-lpth"
    fi])
])

LIB="${LIB} ${THREAD_LIB}"

dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
330
dnl  DVD module: check for installed libdvdcss or local libdvdcss
Sam Hocevar's avatar
   
Sam Hocevar committed
331
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
332
333
LOCAL_LIBDVDCSS=0
STATIC_LIBDVDCSS=0
Sam Hocevar's avatar
   
Sam Hocevar committed
334
DUMMY_LIBDVDCSS=0
Sam Hocevar's avatar
   
Sam Hocevar committed
335
AC_ARG_WITH(dvdcss,
Sam Hocevar's avatar
   
Sam Hocevar committed
336
  [  --with-dvdcss[=name]    way to use libdvdcss, either 'yes' or 'no', or 'local-static', 'local-shared', or a path to another libdvdcss such as '/usr/local' (default 'local-static')],
Sam Hocevar's avatar
   
Sam Hocevar committed
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
  [ case "x${withval}" in
    xlocal-static|xyes)
      # local libdvdcss, statically linked
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
        LOCAL_LIBDVDCSS=1
        STATIC_LIBDVDCSS=1
        BUILTINS="${BUILTINS} dvd"
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
        LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
      fi
    ;;
    xlocal-shared)
      # local libdvdcss, dynamically linked
Sam Hocevar's avatar
   
Sam Hocevar committed
352
353
354
355
356
357
358
359
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
        LOCAL_LIBDVDCSS=1
        BUILTINS="${BUILTINS} dvd"
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
        LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
      fi
Sam Hocevar's avatar
   
Sam Hocevar committed
360
    ;;
Sam Hocevar's avatar
   
Sam Hocevar committed
361
362
363
364
365
366
367
368
369
    xno)
      # don't use libdvdcss at all, build a DVD module that can dlopen() it
      DUMMY_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
      LIB_DVD="${LIB_DVD} -ldl"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
    ;;
Sam Hocevar's avatar
   
Sam Hocevar committed
370
    *)
Sam Hocevar's avatar
   
Sam Hocevar committed
371
372
373
374
375
376
377
378
379
      # existing libdvdcss
      BUILTINS="${BUILTINS} dvd"
      if test "x$withval" != "xyes"
      then
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
        CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
      fi
      LIB_DVD="${LIB_DVD} -ldvdcss"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
Sam Hocevar's avatar
   
Sam Hocevar committed
380
    esac ],
Sam Hocevar's avatar
   
Sam Hocevar committed
381
  # user didn't decide, we choose to use local libdvdcss and link statically
Sam Hocevar's avatar
   
Sam Hocevar committed
382
  # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
Sam Hocevar's avatar
   
Sam Hocevar committed
383
384
385
386
387
388
389
390
  [ if test x${CAN_BUILD_LIBDVDCSS} = x1
    then
      LOCAL_LIBDVDCSS=1
      STATIC_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
      LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
Sam Hocevar's avatar
   
Sam Hocevar committed
391
392
393
394
395
396
397
398
    else
      # XXX: no check for libdl is done, don't try this at home !
      DUMMY_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
      LIB_DVD="${LIB_DVD} -ldl"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
Sam Hocevar's avatar
   
Sam Hocevar committed
399
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
400

Sam Hocevar's avatar
   
Sam Hocevar committed
401
402
403
404
405
dnl
dnl  dummy plugin
dnl
AC_ARG_ENABLE(dummy,
  [  --disable-dummy         dummy module (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
406
407
408
409
410

if test x$enable_dummy != xno
then
  BUILTINS="${BUILTINS} dummy"
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
411
412
413
414
415
416

dnl
dnl  null plugin
dnl
AC_ARG_ENABLE(null,
  [  --disable-null          Null module (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
417
418
419
420
421

if test x$enable_null != xno
then
  BUILTINS="${BUILTINS} null"
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
422
423
424
425
426
427

dnl
dnl  rc plugin
dnl
AC_ARG_ENABLE(rc,
  [  --disable-rc            rc module (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
428
429
430
431
432

if test x$enable_rc != xno
then
  BUILTINS="${BUILTINS} rc"
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
433

Sam Hocevar's avatar
   
Sam Hocevar committed
434
dnl special case for BeOS
Sam Hocevar's avatar
   
Sam Hocevar committed
435
436
if test x$SYS = xbeos
then
Sam Hocevar's avatar
   
Sam Hocevar committed
437
    BUILTINS="${BUILTINS} beos"
Sam Hocevar's avatar
   
Sam Hocevar committed
438
    LIB_BEOS="-lbe -lgame -lroot -ltracker"
Sam Hocevar's avatar
   
Sam Hocevar committed
439
    PLCFLAGS="${PLCFLAGS} -nostart"
440
441
442
443

dnl default case
else

Sam Hocevar's avatar
   
Sam Hocevar committed
444
445
446
dnl
dnl  OSS /dev/dsp module
dnl
447
AC_ARG_ENABLE(dsp,
448
  [  --disable-dsp           Linux /dev/dsp support (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
449
450
451
452
453

if test x$enable_dsp != xno
then
  if test -c /dev/dsp
  then
Sam Hocevar's avatar
   
Sam Hocevar committed
454
    PLUGINS="${PLUGINS} dsp"
455
456
  fi
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
457
458
459
460

dnl
dnl  Esound module
dnl
461
AC_ARG_ENABLE(esd,
462
  [  --enable-esd            Esound library support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
463
464
  [if test x$enable_esd = xyes
   then
Sam Hocevar's avatar
   
Sam Hocevar committed
465
     AC_PATH_PROG(ESD_CONFIG, esd-config, no)
Sam Hocevar's avatar
   
Sam Hocevar committed
466
467
     if test x${ESD_CONFIG} != xno
     then
Sam Hocevar's avatar
   
Sam Hocevar committed
468
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
   
Sam Hocevar committed
469
470
       LIB_ESD="`${ESD_CONFIG} --libs`"
     fi
Sam Hocevar's avatar
   
Sam Hocevar committed
471
472
473
474
475
   fi])

dnl
dnl  Darwin module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
476
477
AC_ARG_ENABLE(darwin,
  [  --enable-darwin         Darwin sound support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
478
  [if test x$enable_darwin = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
479
     PLUGINS="${PLUGINS} darwin"
Sam Hocevar's avatar
   
Sam Hocevar committed
480
481
482
483
484
485
     LIB_DARWIN="-framework CoreAudio"
   fi])

dnl
dnl  MacOS X module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
486
AC_ARG_ENABLE(macosx,
487
  [  --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)],
Sam Hocevar's avatar
   
Sam Hocevar committed
488
489
  [if test x$enable_macosx = xyes
   then
Sam Hocevar's avatar
   
Sam Hocevar committed
490
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
   
Sam Hocevar committed
491
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
   
Sam Hocevar committed
492
493
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
   
Sam Hocevar committed
494
495
   fi],
  [AC_CHECK_HEADERS(Carbon/Carbon.h,
Sam Hocevar's avatar
   
Sam Hocevar committed
496
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
   
Sam Hocevar committed
497
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
   
Sam Hocevar committed
498
499
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
   
Sam Hocevar committed
500
501
   )])

502
503
504
505
dnl
dnl  QNX RTOS module
dnl
AC_ARG_ENABLE(qnx,
Sam Hocevar's avatar
   
Sam Hocevar committed
506
507
508
  [  --disable-qnx           QNX RTOS support (default enabled in QNX RTOS)])
    if test x$enable_qnx != xno
    then
509
510
511
512
513
514
      AC_CHECK_HEADERS(Ph.h, [
        PLUGINS="${PLUGINS} qnx"
        LIB_QNX="-lasound -lph"
      ])
    fi

Sam Hocevar's avatar
   
Sam Hocevar committed
515
516
517
dnl
dnl  Linux framebuffer module
dnl
518
519
AC_ARG_ENABLE(fb,
  [  --enable-fb             Linux framebuffer support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
520
521
522
523
  [ if test x$enable_fb = xyes
    then
      PLUGINS="${PLUGINS} fb"
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
524
525
526
527

dnl
dnl  GGI module
dnl
Christophe Massiot's avatar
Christophe Massiot committed
528
529
AC_ARG_WITH(ggi,
  [  --with-ggi[=name]       GGI support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
530
  [ if test "x$withval" != "xno"
Christophe Massiot's avatar
Christophe Massiot committed
531
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
532
533
      PLUGINS="${PLUGINS} ggi"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
   
Sam Hocevar committed
534
535
536
537
538
      then
        LIB_GGI="-l"$withval
      else
        LIB_GGI="-lggi"
      fi
Christophe Massiot's avatar
Christophe Massiot committed
539
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
540
541
542
543

dnl
dnl  SDL module
dnl
544
545
AC_ARG_ENABLE(sdl,
  [  --disable-sdl           SDL support (default enabled)])
546
if test "x$enable_sdl" != "xno"
547
then
548
549
550
  AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
  SDL_CONFIG=${SDL12_CONFIG}
  SDL_HEADER="SDL12/SDL.h"
Sam Hocevar's avatar
   
Sam Hocevar committed
551
552
  if test x${SDL_CONFIG} = xno
  then
Sam Hocevar's avatar
   
Sam Hocevar committed
553
554
    AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
    SDL_CONFIG=${SDL11_CONFIG}
555
556
    SDL_HEADER="SDL11/SDL.h"
  fi
Sam Hocevar's avatar
   
Sam Hocevar committed
557
558
  if test x${SDL_CONFIG} = xno
  then
559
560
    AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
    SDL_HEADER="SDL/SDL.h"
561
  fi
Sam Hocevar's avatar
   
Sam Hocevar committed
562
563
  if test x${SDL_CONFIG} != xno
  then
564
565
566
567
568
    PLUGINS="${PLUGINS} sdl"
    CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
    LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
    save_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $CFLAGS_SDL"
569
570
571
572
573
    AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
      <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
      [ echo "The development package for SDL is not installed. Please install it"
        echo "and try again. Alternatively you can also configure with --disable-sdl."
        exit 1 ])
574
    CFLAGS=$save_CFLAGS
Sam Hocevar's avatar
   
Sam Hocevar committed
575
    if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
Sam Hocevar's avatar
   
Sam Hocevar committed
576
    then
577
578
579
      echo "You need SDL version 1.1.5 or later. Install it and try again."
      echo "Alternatively, you can also configure with --disable-sdl."
      exit 1
Sam Hocevar's avatar
   
Sam Hocevar committed
580
    fi
581
  elif test "x$enable_sdl" =  "xyes"
Sam Hocevar's avatar
   
Sam Hocevar committed
582
  then
583
    echo "I couldn't find the SDL package. You can download libSDL from"
584
585
586
    echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
    echo "nice day."
    exit 1
587
588
  fi
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
589

Sam Hocevar's avatar
   
Sam Hocevar committed
590
591
592
593
594
dnl
dnl  Windows DirectX module
dnl
AC_ARG_WITH(directx,
  [  --with-directx[=name]   Windows DirectX support (default enabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
595
  [ if test "x$withval" != "xno"
Sam Hocevar's avatar
   
Sam Hocevar committed
596
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
597
598
      PLUGINS="${PLUGINS} directx"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
   
Sam Hocevar committed
599
      then
Sam Hocevar's avatar
   
Sam Hocevar committed
600
        LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
   
Sam Hocevar committed
601
602
603
        INCLUDE="${INCLUDE} -I"$withval"/include"
      else
        AC_CHECK_HEADERS(directx.h, , [echo "Cannot find DirectX headers !"; exit])
Sam Hocevar's avatar
   
Sam Hocevar committed
604
        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
   
Sam Hocevar committed
605
606
      fi
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
607
    if test "x$withval" = "x"
Sam Hocevar's avatar
   
Sam Hocevar committed
608
609
610
    then
      AC_CHECK_HEADERS(directx.h,
      [PLUGINS="${PLUGINS} directx"
Sam Hocevar's avatar
   
Sam Hocevar committed
611
       LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"])
Sam Hocevar's avatar
   
Sam Hocevar committed
612
613
    fi

Sam Hocevar's avatar
   
Sam Hocevar committed
614
615
616
dnl
dnl  Glide module
dnl
Christophe Massiot's avatar
Christophe Massiot committed
617
618
AC_ARG_WITH(glide,
  [  --with-glide[=name]     Glide (3dfx) support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
619
  [ if test "x$withval" != "xno"
Christophe Massiot's avatar
Christophe Massiot committed
620
    then
Sam Hocevar's avatar
   
Sam Hocevar committed
621
622
      PLUGINS="${PLUGINS} glide"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
   
Sam Hocevar committed
623
      then
Sam Hocevar's avatar
   
Sam Hocevar committed
624
        LIB_GLIDE="-l"$withval" -lm"
Sam Hocevar's avatar
   
Sam Hocevar committed
625
      else
Sam Hocevar's avatar
   
Sam Hocevar committed
626
        LIB_GLIDE="-lglide2x -lm"
Sam Hocevar's avatar
   
Sam Hocevar committed
627
      fi
Christophe Massiot's avatar
Christophe Massiot committed
628
    fi ])
Sam Hocevar's avatar
   
Sam Hocevar committed
629
630
631
632

dnl
dnl  ncurses module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
633
634
AC_ARG_ENABLE(ncurses,
  [  --enable-ncurses        ncurses interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
635
  [if test x$enable_ncurses = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
636
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
   
Sam Hocevar committed
637
638
639
640
641
642
     LIB_NCURSES="-lncurses"
   fi])

dnl
dnl  Qt module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
643
644
AC_ARG_ENABLE(qt,
  [  --enable-qt             Qt interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
645
  [if test x$enable_qt = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
646
647
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
   
Sam Hocevar committed
648
     LIB_QT="-lqt -L${QTDIR}/lib"
Sam Hocevar's avatar
   
Sam Hocevar committed
649
     if test -x ${QTDIR}/bin/moc
Sam Hocevar's avatar
   
Sam Hocevar committed
650
651
652
653
654
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
   
Sam Hocevar committed
655
656
657
658
659
   fi])

dnl 
dnl  KDE module
dnl
660
661
AC_ARG_ENABLE(kde,
  [  --enable-kde            KDE interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
662
  [if test x$enable_kde = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
663
664
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
665
666
667
668
669
670
671
     LIB_KDE="-L${KDEDIR}/lib -lkfile"
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
   
Sam Hocevar committed
672
   fi])
Sam Hocevar's avatar
   
Sam Hocevar committed
673
674
675
676

dnl
dnl  Gnome module
dnl
677
AC_ARG_ENABLE(gnome,
Sam Hocevar's avatar
   
Sam Hocevar committed
678
  [  --enable-gnome          Gnome interface support (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
679
  [if test x$enable_gnome = xyes; then
Sam Hocevar's avatar
   
Sam Hocevar committed
680
681
     PLUGINS="${PLUGINS} gnome"
     ALIASES="${ALIASES} gnome-vlc"
Sam Hocevar's avatar
   
Sam Hocevar committed
682
683
684
685
686
687
     LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
   fi])

dnl
dnl  Gtk+ module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
688
689
AC_ARG_ENABLE(gtk,
  [  --disable-gtk           Gtk+ support (default enabled)])
Sam Hocevar's avatar
   
Sam Hocevar committed
690
691
692
if test x$enable_gtk != xno
then
  # look for gtk-config
Sam Hocevar's avatar
   
Sam Hocevar committed
693
  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
Sam Hocevar's avatar
   
Sam Hocevar committed
694
695
  if test -x ${GTK_CONFIG}
  then
Sam Hocevar's avatar
   
Sam Hocevar committed
696
697
    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
698
  fi
Sam Hocevar's avatar
   
Sam Hocevar committed
699
700
701
702
703
704
705
706
  # now look for the gtk.h header
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
  AC_CHECK_HEADERS(gtk/gtk.h, [
    PLUGINS="${PLUGINS} gtk"
    ALIASES="${ALIASES} gvlc"
  ])
  CPPFLAGS=$saved_CPPFLAGS
707
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
708
709
710
711

dnl
dnl  X11 module
dnl
712
AC_ARG_ENABLE(x11,
Sam Hocevar's avatar
   
Sam Hocevar committed
713
  [  --disable-x11           X11 support (default enabled)])
714
if test x$enable_x11 != xno; then
Sam Hocevar's avatar
   
Sam Hocevar committed
715
716
717
718
719
720
721
722
  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
723
  AC_CHECK_HEADERS(X11/Xlib.h, [
Sam Hocevar's avatar
   
Sam Hocevar committed
724
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
   
Sam Hocevar committed
725
726
727
728
    LIB_X11="-L$x_libraries -lX11 -lXext"
    CFLAGS_X11="-I$x_includes"
  ]
  CPPFLAGS=$saved_CPPFLAGS)
729
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
730
731
732
733

dnl
dnl  XVideo module
dnl
Sam Hocevar's avatar
   
Sam Hocevar committed
734
AC_ARG_ENABLE(xvideo,
Sam Hocevar's avatar
   
Sam Hocevar committed
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
  [  --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
752
753
754
755

dnl
dnl  ALSA module
dnl
Henri Fallon's avatar
   
Henri Fallon committed
756
AC_ARG_ENABLE(alsa,
757
  [  --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)],
Sam Hocevar's avatar
   
Sam Hocevar committed
758
759
760
761
762
763
764
765
766
  [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"
       LIB_ALSA="-lasound"
     fi
   fi])
Sam Hocevar's avatar
   
Sam Hocevar committed
767

Sam Hocevar's avatar
   
Sam Hocevar committed
768
dnl  end of non-BeOS stuff
769
770
fi

Sam Hocevar's avatar
   
Sam Hocevar committed
771
772
773
dnl 
dnl  Configuration is finished
dnl
774
775
AC_SUBST(SYS)
AC_SUBST(ARCH)
776
AC_SUBST(PLUGINS)
Sam Hocevar's avatar
   
Sam Hocevar committed
777
AC_SUBST(BUILTINS)
778
AC_SUBST(ALIASES)
Sam Hocevar's avatar
   
Sam Hocevar committed
779
AC_SUBST(DEFINE)
Sam Hocevar's avatar
   
Sam Hocevar committed
780
AC_SUBST(INCLUDE)
781
782
AC_SUBST(DEBUG)
AC_SUBST(STATS)
Sam Hocevar's avatar
   
Sam Hocevar committed
783
AC_SUBST(ASM)
784
AC_SUBST(TRACE)
Sam Hocevar's avatar
   
Sam Hocevar committed
785
AC_SUBST(PROFILING)
786
AC_SUBST(OPTIMS)
Sam Hocevar's avatar
   
Sam Hocevar committed
787
AC_SUBST(GETOPT)
Sam Hocevar's avatar
   
Sam Hocevar committed
788
AC_SUBST(MOC)
Sam Hocevar's avatar
   
Sam Hocevar committed
789
AC_SUBST(WINDRES)
Sam Hocevar's avatar
   
Sam Hocevar committed
790
791

AC_SUBST(LCFLAGS)
Sam Hocevar's avatar
   
Sam Hocevar committed
792
AC_SUBST(PLCFLAGS)
Sam Hocevar's avatar
   
Sam Hocevar committed
793
794
AC_SUBST(LIB)

Sam Hocevar's avatar
   
Sam Hocevar committed
795
796
797
AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_DARWIN)
Sam Hocevar's avatar
   
Sam Hocevar committed
798
AC_SUBST(LIB_DVD)
Sam Hocevar's avatar
   
Sam Hocevar committed
799
AC_SUBST(LIB_DVD_PLUGIN)
Sam Hocevar's avatar
   
Sam Hocevar committed
800
AC_SUBST(LIB_ESD)
Christophe Massiot's avatar
Christophe Massiot committed
801
AC_SUBST(LIB_GGI)
Sam Hocevar's avatar
   
Sam Hocevar committed
802
803
804
805
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GNOME)
AC_SUBST(LIB_GTK)
AC_SUBST(LIB_IDCTALTIVEC)
Sam Hocevar's avatar
   
Sam Hocevar committed
806
AC_SUBST(LIB_KDE)
Sam Hocevar's avatar
   
Sam Hocevar committed
807
AC_SUBST(LIB_MACOSX)
808
AC_SUBST(LIB_QNX)
Sam Hocevar's avatar
   
Sam Hocevar committed
809
810
811
812
AC_SUBST(LIB_NCURSES)
AC_SUBST(LIB_QT)
AC_SUBST(LIB_TS)
AC_SUBST(LIB_SDL)
Sam Hocevar's avatar
   
Sam Hocevar committed
813
AC_SUBST(LIB_DIRECTX)
Sam Hocevar's avatar
   
Sam Hocevar committed
814
815
816
AC_SUBST(LIB_X11)
AC_SUBST(LIB_XVIDEO)
AC_SUBST(LIB_YUV)
817

Sam Hocevar's avatar
   
Sam Hocevar committed
818
AC_SUBST(CFLAGS_VLC)
Sam Hocevar's avatar
   
Sam Hocevar committed
819
AC_SUBST(CFLAGS_DVD)
Sam Hocevar's avatar
   
Sam Hocevar committed
820
AC_SUBST(CFLAGS_GTK)
Sam Hocevar's avatar
   
Sam Hocevar committed
821
AC_SUBST(CFLAGS_SDL)
Sam Hocevar's avatar
   
Sam Hocevar committed
822
823
AC_SUBST(CFLAGS_X11)

Sam Hocevar's avatar
   
Sam Hocevar committed
824
825
AC_SUBST(OBJ_DVD)

Sam Hocevar's avatar
   
Sam Hocevar committed
826
827
AC_SUBST(LOCAL_LIBDVDCSS)

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

830
echo "
Sam Hocevar's avatar
   
Sam Hocevar committed
831
832
833
834
global configuration
--------------------
system                : ${SYS}
architecture          : ${ARCH}
Sam Hocevar's avatar
   
Sam Hocevar committed
835
optimizations         : ${OPTIMS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
836

Sam Hocevar's avatar
   
Sam Hocevar committed
837
838
839
if test x${HAVE_VLC} = x1
then
  echo "
840
841
842
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
843
844
debug mode            : ${DEBUG}
statistics            : ${STATS}
845
trace mode            : ${TRACE}
Sam Hocevar's avatar
   
Sam Hocevar committed
846
profiling             : ${PROFILING}
Sam Hocevar's avatar
   
Sam Hocevar committed
847
need builtin getopt   : ${GETOPT}
Sam Hocevar's avatar
   
Sam Hocevar committed
848
built-in modules      :${BUILTINS}
Sam Hocevar's avatar
   
Sam Hocevar committed
849
plugin modules        :${PLUGINS}
Sam Hocevar's avatar
   
Sam Hocevar committed
850
851
vlc aliases           :${ALIASES}"
fi
Sam Hocevar's avatar
   
Sam Hocevar committed
852

Sam Hocevar's avatar
   
Sam Hocevar committed
853
echo "
Sam Hocevar's avatar
   
Sam Hocevar committed
854
855
libdvdcss configuration
-----------------------
Sam Hocevar's avatar
   
Sam Hocevar committed
856
857
can be built          : ${CAN_BUILD_LIBDVDCSS}
will be built         : ${LOCAL_LIBDVDCSS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
858
859
if test x${LOCAL_LIBDVDCSS} = x1
then
Sam Hocevar's avatar
   
Sam Hocevar committed
860
861
862
  echo "link statically       : ${STATIC_LIBDVDCSS}"
else
  echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
Sam Hocevar's avatar
   
Sam Hocevar committed
863
864
865
fi

echo "
Sam Hocevar's avatar
   
Sam Hocevar committed
866
867
868
869
870
871
872
873
874
875
876
877
You may now tune Makefile.opts at your convenience, for instance to choose
which modules get compiled as plugins.
"
if test x${HAVE_VLC} = x1
then
  echo "To build vlc and its plugins, type \`make vlc'."
fi
if test x${HAVE_LIBDVDCSS} = x1
then
  echo "To build libdvdcss only, type \`make libdvdcss'."
fi
echo ""
878