3e54d719a0bde4ef072420522d30aa86b27127c2
[vlc.git] / configure.in
1 dnl Autoconf settings for vlc
2 AC_INIT(src/interface/main.c)
3 AC_CONFIG_HEADER(include/defs.h)
4
5 AC_CANONICAL_HOST
6
7 VLC_VERSION=0.1.99c
8 AC_SUBST(VLC_VERSION)
9 VLC_CODENAME=Onatopp
10 AC_SUBST(VLC_CODENAME)
11
12 dnl Check for tools
13 AC_PROG_MAKE_SET
14 AC_PROG_CC
15 AC_PROG_CPP
16
17 dnl AM_PROG_LIBTOOL
18 AC_PROG_INSTALL
19
20 dnl Check for compiler environment
21 AC_C_CONST
22 AC_C_BIGENDIAN
23
24 dnl Check for system libs needed
25 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
26 AC_CHECK_FUNCS(setenv putenv)
27 AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
28 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
29 AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(rt,nanosleep,,[AC_CHECK_LIB(posix4,nanosleep)])])
30 AC_CHECK_FUNCS(usleep)
31 AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)])
32 AC_FUNC_MMAP
33 AC_FUNC_VPRINTF
34 AC_TYPE_SIGNAL
35 AC_CHECK_LIB(dl, dlopen)
36 AC_CHECK_LIB(gnugetopt, optarg)
37 AC_CHECK_LIB(be, _)
38 AC_CHECK_LIB(game, _)
39 AC_CHECK_LIB(root, _)
40 AC_CHECK_LIB(m, powl)
41 AC_CHECK_LIB(pthread, pthread_create)
42 AC_CHECK_LIB(threads, thread_create)
43
44 dnl check for getopt_long, substitute the distributed versions if not
45 AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"])
46 AC_SUBST(LIBOBJS)
47
48 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
49 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
50 AC_CHECK_HEADERS(dlfcn.h image.h)
51 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
52
53 dnl Check for threads library
54 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
55
56 dnl Checks for typedefs, structures, and compiler characteristics.
57 AC_C_CONST
58 AC_TYPE_SIZE_T
59 AC_HEADER_TIME
60
61 AC_ARG_ENABLE(dummy,
62   [  --enable-vout-dummy     dummy video support (default enabled)])
63 if test x$enable_vout_dummy != xno; then VOUT=${VOUT}"dummy "; fi
64 AC_ARG_ENABLE(x11,
65   [  --enable-x11            X11 video support (default enabled)])
66 if test x$enable_x11 != xno; then VOUT=${VOUT}"x11 "; fi
67 AC_ARG_ENABLE(fb,
68   [  --enable-fb             Linux framebuffer video support (default disabled)],
69   [if test x$enable_fb = xyes; then VOUT=${VOUT}"fb "; fi])
70 AC_ARG_ENABLE(gnome,
71   [  --enable-gnome          Gnome video support (default disabled)],
72   [if test x$enable_gnome = xyes; then VOUT=${VOUT}"gnome "; fi])
73 AC_ARG_ENABLE(glide,
74   [  --enable-glide          Glide (3dfx) video support (default disabled)],
75   [if test x$enable_glide = xyes; then VOUT=${VOUT}"glide "; fi])
76 AC_ARG_ENABLE(ggi,
77   [  --enable-ggi            GGI video support (default disabled)],
78   [if test x$enable_ggi = xyes; then VOUT=${VOUT}"ggi "; fi])
79
80 AC_ARG_ENABLE(dummy,
81   [  --enable-aout-dummy     dummy audio support (default enabled)])
82 if test x$enable_aout_dummy != xno; then AOUT=${AOUT}"dummy "; fi
83 AC_ARG_ENABLE(dsp,
84   [  --enable-dsp            Linux /dev/dsp support (default enabled)])
85 if test x$enable_dsp != xno; then AOUT=${AOUT}"dsp "; fi
86 AC_ARG_ENABLE(esd,
87   [  --enable-esd            Esound library support (default disabled)],
88   [if test x$enable_gnome = xyes; then AOUT=${AOUT}"esd "; fi])
89
90 ARCH=${host_cpu}
91 AC_ARG_ENABLE(ppro,
92 [  --enable-ppro           Enable PentiumPro optimizations (default is no)],
93 [ if test x$enableval = xyes; then ARCH=${ARCH}" pentiumpro"; fi ])
94 AC_ARG_ENABLE(mmx,
95 [  --enable-mmx            Enable MMX optimizations (default is no)],
96 [ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; fi ])
97
98 SYS=${host_os}
99
100 # special cases
101 if test x$host_os = xbeos; then
102     VOUT="dummy beos"
103     AOUT="dummy beos"
104 fi
105
106 AC_SUBST(SYS)
107 AC_SUBST(ARCH)
108 AC_SUBST(VOUT)
109 AC_SUBST(AOUT)
110
111 AC_OUTPUT([Makefile include/config.h])
112
113 echo "
114 vlc configuration
115 -----------------
116 vlc version           : ${VLC_VERSION}
117 system                : ${SYS}
118 architecture          : ${ARCH}
119 vout                  : ${VOUT}
120 aout                  : ${AOUT}
121 "