4 exec_prefix="@exec_prefix@"
22 cflags_tuning="@CFLAGS_TUNING@"
23 cflags_optim="@CFLAGS_OPTIM@"
24 cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@"
25 cflags_nooptim="@CFLAGS_NOOPTIM@"
28 # Do not touch below this place unless you really know what you are doing
33 Usage: vlc-config OPTIONS MODULES
35 [--prefix[=DIR]] set prefix
36 [--exec-prefix[=DIR]] set exec prefix
37 [--version] print version and exit
38 [--linkage] print linkage mode (c, c++, objc)
39 [--target] print targets and exit
40 [--libs] output linking flags
41 [--cflags] output C compilation flags
42 [--cxxflags] output C++ compilation flags
43 [--objcflags] output Objective C compilation flags
45 vlc the main VLC object
46 plugin flags for plugin modules
47 builtin flags for built-in modules
48 pic flags for PIC code
49 MODULE any available module (dummy, gtk, avi, etc.)
72 if test $# -eq 0; then
77 # No need to include the default @*FLAGS@ values here because they are
78 # automatically added when using $(COMPILE), $(CXXCOMPILE) or $(OBJCCOMPILE)
80 if test "@includedir@" != "/usr/include"; then
81 includes="-I@includedir@"
83 if test "${top_builddir}" != ""; then
84 top_builddir="${top_builddir}/"
85 elif test "${TOP_BUILDDIR}" != ""; then
86 top_builddir="${TOP_BUILDDIR}/"
88 includes="${includes}"
89 cppflags="${includes}"
95 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
97 cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE"
100 # Gettext, data and plugin location
102 cppflags="${cppflags} -DLOCALEDIR=\"@datadir@/locale\""
103 cppflags="${cppflags} -DDATA_PATH=\"${prefix}/share/vlc\""
104 cppflags="${cppflags} -DPLUGIN_PATH=\"${prefix}/lib/vlc\""
107 # Various additional defines
109 if [ "${debug}" = yes ]; then
110 cppflags="${cppflags} -DDEBUG"
111 cflags="${cflags} -g"
112 cxxflags="${cxxflags} -g"
113 objcflags="${objcflags} -g"
114 ldflags="${ldflags} -g"
116 if [ "${cprof}" = yes ]; then
117 cppflags="${cppflags} -DCPROF"
118 cflags="${cflags} -finstrument-functions"
119 cxxflags="${cxxflags} -finstrument-functions"
120 objcflags="${objcflags} -finstrument-functions"
122 if [ "${gprof}" = yes ]; then
123 cppflags="${cppflags} -DGPROF"
124 cflags="${cflags} -pg"
125 cxxflags="${cxxflags} -pg"
126 objcflags="${objcflags} -pg"
127 ldflags="${ldflags} -pg"
129 if [ "${release}" = yes ]; then
130 cppflags="${cppflags} -DHAVE_RELEASE"
132 if [ "${optim}" = yes ]; then
133 cppflags="${cppflags} ${cflags_optim} ${cflags_tuning}"
134 if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
135 cppflags="${cppflags} ${cflags_optim_nodebug}"
138 cppflags="${cppflags} ${cflags_nooptim}"
142 # The main argument loop
144 while test $# -gt 0; do
146 -*=*) optarg=`echo "$1" | sed 's/-_a-zA-Z0-9*=//'` ;;
153 if test "${exec_prefix_set}" = no ; then
154 exec_prefix="${optarg}"
161 exec_prefix="${optarg}"
193 cppflags="${cppflags} -D__VLC__ -I${top_builddir}src/misc"
197 cppflags="${cppflags} -D__VLC__ -D__PLUGIN__"
204 cppflags="${cppflags} -D__VLC__ -D__BUILTIN__"
210 ldflags="${ldflags} -lvlc"
217 # Register per-module *FLAGS
220 # Register module targets
221 register_targets "$1"
227 # If a module was requested, use its name
229 if test -n "${module}"; then
230 cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module}"
234 # Output what we were asked
236 if test "${echo_linkage}" = yes; then
237 if test "${echo_plugin}" = yes; then
238 for module in `echo "${plugins}"`; do
239 register_flags "${module}"
242 if test "${echo_builtin}" = yes; then
243 for module in `echo "${builtins}"`; do
244 register_flags "${module}"
251 if test "${echo_target}" = yes; then
252 if test "${echo_plugin}" = yes; then
253 for module in `echo "${plugins}"`; do
254 register_targets "${module}"
256 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_plugin "; done
259 if test "${echo_builtin}" = yes; then
260 for module in `echo "${builtins}"`; do
261 register_targets "${module}"
263 if test "${echo_pic}" = yes; then
264 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done
266 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done
273 if test "${echo_prefix}" = yes; then
276 if test "${echo_exec_prefix}" = yes; then
277 echo "${exec_prefix}"
279 if test "${echo_cppflags}" = yes; then
282 if test "${echo_cflags}" = yes; then
283 echo "${cppflags} ${cflags}"
285 if test "${echo_cxxflags}" = yes; then
286 echo "${cppflags} ${cxxflags}"
288 if test "${echo_objcflags}" = yes; then
289 echo "${cppflags} ${objcflags}"
291 if test "${echo_libs}" = yes; then
292 if test "${echo_builtin}" = yes; then
293 for module in `echo "${builtins}"`; do
294 register_targets "${module}"
295 register_flags "${module}"
297 if test "${echo_pic}" = yes; then
298 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done
300 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done
303 if test "${echo_external}" = yes; then
304 if test "${echo_pic}" = yes; then
305 for module in `echo "${builtins}"`; do
306 ldflags="${ldflags} @libdir@/vlc/lib${module}_pic.a"
309 for module in `echo "${builtins}"`; do
310 ldflags="${ldflags} @libdir@/vlc/lib${module}.a"
313 for module in `echo "${builtins}"`; do
314 register_flags "${module}"
318 echo "${libs} ${ldflags}"