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}/"
86 cppflags
="${includes}"
92 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
94 cppflags
="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE"
97 # Gettext, data and plugin location
99 cppflags
="${cppflags} -DLOCALEDIR=\"@datadir@/locale\""
100 cppflags
="${cppflags} -DDATA_PATH=\"${prefix}/share/vlc\""
101 cppflags
="${cppflags} -DPLUGIN_PATH=\"${prefix}/lib/vlc\""
104 # Various additional defines
106 if [ "${debug}" = yes ]; then
107 cppflags
="${cppflags} -DDEBUG"
108 cflags
="${cflags} -g"
109 cxxflags
="${cxxflags} -g"
110 objcflags
="${objcflags} -g"
111 ldflags
="${ldflags} -g"
113 if [ "${cprof}" = yes ]; then
114 cppflags
="${cppflags} -DCPROF"
115 cflags
="${cflags} -finstrument-functions"
116 cxxflags
="${cxxflags} -finstrument-functions"
117 objcflags
="${objcflags} -finstrument-functions"
119 if [ "${gprof}" = yes ]; then
120 cppflags
="${cppflags} -DGPROF"
121 cflags
="${cflags} -pg"
122 cxxflags
="${cxxflags} -pg"
123 objcflags
="${objcflags} -pg"
124 ldflags
="${ldflags} -pg"
126 if [ "${release}" = yes ]; then
127 cppflags
="${cppflags} -DHAVE_RELEASE"
129 if [ "${optim}" = yes ]; then
130 cppflags
="${cppflags} ${cflags_optim} ${cflags_tuning}"
131 if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
132 cppflags
="${cppflags} ${cflags_optim_nodebug}"
135 cppflags
="${cppflags} ${cflags_nooptim}"
139 # The main argument loop
141 while test $# -gt 0; do
143 -*=*) optarg
=`echo "$1" | sed 's/-_a-zA-Z0-9*=//'` ;;
150 if test "${exec_prefix_set}" = no
; then
151 exec_prefix
="${optarg}"
158 exec_prefix
="${optarg}"
190 cppflags
="${cppflags} -D__VLC__"
194 cppflags
="${cppflags} -D__VLC__ -D__PLUGIN__"
201 cppflags
="${cppflags} -D__VLC__ -D__BUILTIN__"
210 # Register per-module *FLAGS
213 # Register module targets
214 register_targets
"$1"
220 # If a module was requested, use its name
222 if test -n "${module}"; then
223 cppflags
="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module}"
227 # Output what we were asked
229 if test "${echo_linkage}" = yes; then
230 if test "${echo_plugin}" = yes; then
231 for module
in `echo "${plugins}"`; do
232 register_flags
"${module}"
235 if test "${echo_builtin}" = yes; then
236 for module
in `echo "${builtins}"`; do
237 register_flags
"${module}"
244 if test "${echo_target}" = yes; then
245 if test "${echo_plugin}" = yes; then
246 for module
in `echo "${plugins}"`; do
247 register_targets
"${module}"
249 for target
in `echo "${list}"`; do printf "${top_builddir}modules/${target}_plugin "; done
252 if test "${echo_builtin}" = yes; then
253 for module in `echo "${builtins}"`; do
254 register_targets "${module}"
256 if test "${echo_pic}" = yes; then
257 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done
259 for target
in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done
266 if test "${echo_prefix}" = yes; then
269 if test "${echo_exec_prefix}" = yes; then
270 echo "${exec_prefix}"
272 if test "${echo_cppflags}" = yes; then
275 if test "${echo_cflags}" = yes; then
276 echo "${cppflags} ${cflags}"
278 if test "${echo_cxxflags}" = yes; then
279 echo "${cppflags} ${cxxflags}"
281 if test "${echo_objcflags}" = yes; then
282 echo "${cppflags} ${objcflags}"
284 if test "${echo_libs}" = yes; then
285 if test "${echo_builtin}" = yes; then
286 for module in `echo "${builtins}"`; do
287 register_targets "${module}"
288 register_flags "${module}"
290 if test "${echo_pic}" = yes; then
291 for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done
293 for target
in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done
296 echo "${libs} ${ldflags}"