4 exec_prefix="@exec_prefix@"
6 datarootdir="@datarootdir@"
11 builtins="@BUILTINS@ "
20 cflags_tuning="@CFLAGS_TUNING@"
23 # Do not touch below this place unless you really know what you are doing
28 Usage: vlc-config OPTIONS MODULES
30 [--prefix[=DIR]] set prefix
31 [--exec-prefix[=DIR]] set exec prefix
32 [--version] print version and exit
33 [--linkage] print linkage mode (c, c++, objc)
34 [--list] print modules names and exit
35 [--libs] output linking flags
36 [--cflags] output C compilation flags
37 [--cxxflags] output C++ compilation flags
38 [--objcflags] output Objective C compilation flags
40 vlc the main VLC object
41 plugin flags for plugin modules
42 builtin flags for built-in modules
43 pic flags for PIC code
44 MODULE any available module (dummy, gtk, avi, etc.)
45 libs flags for external libs
59 if test $# -eq 0; then
63 if test "${top_builddir}" != ""; then
64 top_builddir="${top_builddir}/"
65 elif test "${TOP_BUILDDIR}" != ""; then
66 top_builddir="${TOP_BUILDDIR}/"
68 includes="${includes}"
69 cppflags="${includes}"
74 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
76 cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE"
79 # Various additional defines
81 if [ "${optim}" = speed ]; then
82 cflags="${cflags} ${cflags_tuning}"
83 cxxflags="${cxxflags} ${cflags_tuning}"
84 objcflags="${objcflags} ${cflags_tuning}"
88 # The main argument loop
90 while test $# -gt 0; do
92 -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9\-]*=//'` ;;
96 # Mangle plugin name, if applicable
97 # This is just a convenience hack for modules/common.am
103 tgt="${tgt%_plugin_la-*.lo}"
107 tgt="${tgt%_plugin.la}"
116 if test "${exec_prefix_set}" = no ; then
117 exec_prefix="${optarg}"
124 exec_prefix="${optarg}"
162 cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc"
166 cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__"
170 cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__"
179 # Register per-module *FLAGS
180 register_flags "$tgt"
186 # If a module was requested, use its name
188 if test -n "${module}"; then
189 cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
193 # Output what we were asked
195 if test "${echo_linkage}" = yes; then
200 if test "${echo_list}" = yes; then
201 if test "${echo_plugin}" = yes; then
205 if test "${echo_builtin}" = yes; then
212 if test "${echo_prefix}" = yes; then
215 if test "${echo_exec_prefix}" = yes; then
216 echo "${exec_prefix}"
218 if test "${echo_cppflags}" = yes; then
221 if test "${echo_cflags}" = yes; then
222 echo "${cppflags} ${cflags}"
224 if test "${echo_cxxflags}" = yes; then
225 echo "${cppflags} ${cxxflags}"
227 if test "${echo_objcflags}" = yes; then
228 echo "${cppflags} ${objcflags}"
230 if test "${echo_ldflags}" = yes; then
235 # There are 4 possibilities
236 # - We are a plugin or a builtin
237 # - We are building something from the inside (builtin)
238 # - Link with builtins in place
239 # If you want something shared from the inside (binding),
240 # you need "builtin vlc"
241 if test "${echo_libs}" = yes; then