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 [--list] print modules names and exit
34 [--libs] output linking flags
35 [--cflags] output C compilation flags
36 [--cxxflags] output C++ compilation flags
37 [--objcflags] output Objective C compilation flags
39 vlc the main VLC object
40 plugin flags for plugin modules
41 builtin flags for built-in modules
42 pic flags for PIC code
43 MODULE any available module (dummy, gtk, avi, etc.)
44 libs flags for external libs
58 if test $# -eq 0; then
62 if test "${top_builddir}" != ""; then
63 top_builddir="${top_builddir}/"
64 elif test "${TOP_BUILDDIR}" != ""; then
65 top_builddir="${TOP_BUILDDIR}/"
67 includes="${includes}"
68 cppflags="${includes}"
72 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
74 cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE"
77 # Various additional defines
79 if [ "${optim}" = speed ]; then
80 cflags="${cflags} ${cflags_tuning}"
81 cxxflags="${cxxflags} ${cflags_tuning}"
82 objcflags="${objcflags} ${cflags_tuning}"
86 # The main argument loop
88 while test $# -gt 0; do
90 -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9\-]*=//'` ;;
94 # Mangle plugin name, if applicable
95 # This is just a convenience hack for modules/common.am
101 tgt="${tgt%_plugin_la-*.lo}"
105 tgt="${tgt%_plugin.la}"
114 if test "${exec_prefix_set}" = no ; then
115 exec_prefix="${optarg}"
122 exec_prefix="${optarg}"
157 cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc"
161 cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__"
165 cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__"
174 # Register per-module *FLAGS
175 register_flags "$tgt"
181 # If a module was requested, use its name
183 if test -n "${module}"; then
184 cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
188 # Output what we were asked
190 if test "${echo_list}" = yes; then
191 if test "${echo_plugin}" = yes; then
195 if test "${echo_builtin}" = yes; then
202 if test "${echo_prefix}" = yes; then
205 if test "${echo_exec_prefix}" = yes; then
206 echo "${exec_prefix}"
208 if test "${echo_cppflags}" = yes; then
211 if test "${echo_cflags}" = yes; then
212 echo "${cppflags} ${cflags}"
214 if test "${echo_cxxflags}" = yes; then
215 echo "${cppflags} ${cxxflags}"
217 if test "${echo_objcflags}" = yes; then
218 echo "${cppflags} ${objcflags}"
220 if test "${echo_ldflags}" = yes; then
225 # There are 4 possibilities
226 # - We are a plugin or a builtin
227 # - We are building something from the inside (builtin)
228 # - Link with builtins in place
229 # If you want something shared from the inside (binding),
230 # you need "builtin vlc"
231 if test "${echo_libs}" = yes; then