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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.65)
AC_INIT([Experiment Player], [dev], [robin.haberkorn@st.ovgu.de],
[experiment-player])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
#
# Checks for programs.
#
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CC_C99
if [[ $ac_cv_prog_cc_c99 = no ]]; then
AC_MSG_ERROR([C compiler does not support C99 mode!])
fi
AM_PROG_CC_C_O
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen)
AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc)
XSLT_FLAGS="--xinclude"
AC_SUBST(XSLT_FLAGS)
#
# Checks for libraries.
#
PKG_CHECK_MODULES(LIBGTK, [gtk+-2.0])
# FIXME: further restrict libvlc version
PKG_CHECK_MODULES(LIBVLC, [libvlc >= 1.1.13 vlc-plugin])
PKG_CHECK_MODULES(LIBXML2, [libxml-2.0], , [
AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config)
if [[ x$XML2_CONFIG != x ]]; then
LIBXML2_CFLAGS="`$XML2_CONFIG --cflags`"
AC_SUBST(LIBXML2_CFLAGS)
LIBXML2_LIBS="`$XML2_CONFIG --libs`"
AC_SUBST(LIBXML2_LIBS)
else
temp_CFLAGS="$CFLAGS"
temp_LIBS="$LIBS"
CFLAGS=
LIBS=
AC_CHECK_LIB(xml2, xmlParseFile, , [
AC_MSG_ERROR([Required libxml-2.0 package or library missing!])
])
AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h \
libxml/xpath.h libxml/xpathInternals.h], , [
AC_MSG_ERROR([Required libxml headers are missing!])
])
LIBXML2_CFLAGS="$CFLAGS"
AC_SUBST(LIBXML2_CFLAGS)
LIBXML2_LIBS="$LIBS"
AC_SUBST(LIBXML2_LIBS)
CFLAGS="$temp_CFLAGS"
LIBS="$temp_LIBS"
fi
])
#
# Checks for header files.
#
AC_HEADER_STDC
case $host in
*-*-linux*)
AC_CHECK_HEADERS([X11/Xlib.h], , [
AC_MSG_ERROR([Missing X11/Xlib.h!])
])
;;
esac
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
#
# Config options
#
AC_ARG_ENABLE(doxygen-doc,
AS_HELP_STRING([--enable-doxygen-doc],
[Generate Doxygen documentation [default=no]]),
[doxygen_doc=$enableval], [doxygen_doc=no])
if [[ $doxygen_doc = yes -a x$DOXYGEN = x ]]; then
AC_MSG_ERROR([Enabled generating Doxygen documentation, but Doxygen not found! Try --disable-doxygen-doc.])
fi
AM_CONDITIONAL(BUILD_DOXYGEN, test $doxygen_doc = yes)
AC_ARG_ENABLE(html-doc,
AS_HELP_STRING([--enable-html-doc],
[Generate HTML documentation [default=yes]]),
[html_doc=$enableval], [html_doc=yes])
if [[ $html_doc = yes -a x$XSLTPROC = x ]]; then
AC_MSG_ERROR([Enabled generating HTML documentation, but XSLTProc not found! Try --disable-html-doc.])
fi
AM_CONDITIONAL(BUILD_HTML, test $html_doc = yes)
AC_ARG_ENABLE(console,
AS_HELP_STRING([--enable-console],
[Enable console-mode binaries [default=no]]),
[console=$enableval], [console=no])
if [[ $console = no ]]; then
case $host in
*-*-windows*) GTKAPP_LDFLAGS="$GTKAPP_LDFLAGS -mwindows" ;;
esac
fi
# Export symbols
# necessary for auto-registering GTK+ signal handlers by GTK+ builder
case $host in
*-*-linux*) GTKAPP_LDFLAGS="$GTKAPP_LDFLAGS -Wl,--export-dynamic" ;;
*-*-windows*) GTKAPP_LDFLAGS="$GTKAPP_LDFLAGS -Wl,--export-all-symbols" ;;
esac
AC_SUBST(GTKAPP_CFLAGS)
AC_SUBST(GTKAPP_LDFLAGS)
AC_CONFIG_FILES([Makefile \
lib/Makefile lib/gtk-vlc-player/Makefile \
src/Makefile \
doc/Makefile doc/Doxyfile])
AC_OUTPUT
|