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 cppflags="${includes}"
89 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
91 cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE"
94 # Gettext, data and plugin location
96 cppflags="${cppflags} -DLOCALEDIR=\"@datadir@/locale\""
97 cppflags="${cppflags} -DDATA_PATH=\"${prefix}/share/vlc\""
98 cppflags="${cppflags} -DPLUGIN_PATH=\"${prefix}/lib/vlc\""
101 # Various additional defines
103 if [ "${debug}" = yes ]; then
104 cppflags="${cppflags} -DDEBUG"
105 cflags="${cflags} -g"
106 cxxflags="${cxxflags} -g"
107 objcflags="${objcflags} -g"
108 ldflags="${ldflags} -g"
110 if [ "${cprof}" = yes ]; then
111 cppflags="${cppflags} -DCPROF"
112 cflags="${cflags} -finstrument-functions"
113 cxxflags="${cxxflags} -finstrument-functions"
114 objcflags="${objcflags} -finstrument-functions"
116 if [ "${gprof}" = yes ]; then
117 cppflags="${cppflags} -DGPROF"
118 cflags="${cflags} -pg"
119 cxxflags="${cxxflags} -pg"
120 objcflags="${objcflags} -pg"
121 ldflags="${ldflags} -pg"
123 if [ "${release}" = yes ]; then
124 cppflags="${cppflags} -DHAVE_RELEASE"
126 if [ "${optim}" = yes ]; then
127 cppflags="${cppflags} ${cflags_optim} ${cflags_tuning}"
128 if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
129 cppflags="${cppflags} ${cflags_optim_nodebug}"
132 cppflags="${cppflags} ${cflags_nooptim}"
136 # The main argument loop
138 while test $# -gt 0; do
140 -*=*) optarg=`echo "$1" | sed 's/-_a-zA-Z0-9*=//'` ;;
147 if test "${exec_prefix_set}" = no ; then
148 exec_prefix="${optarg}"
155 exec_prefix="${optarg}"
187 cppflags="${cppflags} -D__VLC__"
191 cppflags="${cppflags} -D__VLC__ -D__PLUGIN__"
198 cppflags="${cppflags} -D__VLC__ -D__BUILTIN__"
207 # Register per-module *FLAGS
210 # Register module targets
211 register_targets "$1"
217 # If a module was requested, use its name
219 if test "${module}" != ""; then
220 cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module}"
224 # Output what we were asked
226 if test "${echo_linkage}" = yes; then
227 if test "${echo_plugin}"; then
228 for module in `echo "${plugins}"`; do
229 register_flags "${module}"
232 if test "${echo_builtin}"; then
233 for module in `echo "${builtins}"`; do
234 register_flags "${module}"
241 if test "${echo_target}" = yes; then
242 if test "${echo_plugin}"; then
243 for module in `echo "${plugins}"`; do
244 register_targets "${module}"
246 echo "${list}" | sed -e 's/[^ ][^ ]*/&_plugin/g'
248 if test "${echo_builtin}"; then
249 for module in `echo "${builtins}"`; do
250 register_targets "${module}"
252 if test "${echo_pic}"; then
253 echo "${list}" | sed -e 's/[^ ][^ ]*/&_pic.a/g'
255 echo "${list}" | sed -e 's/[^ ][^ ]*/&.a/g'
261 if test "${echo_prefix}" = yes; then
264 if test "${echo_exec_prefix}" = yes; then
265 echo "${exec_prefix}"
267 if test "${echo_cppflags}" = yes; then
270 if test "${echo_cflags}" = yes; then
271 echo "${cppflags} ${cflags}"
273 if test "${echo_cxxflags}" = yes; then
274 echo "${cppflags} ${cxxflags}"
276 if test "${echo_objcflags}" = yes; then
277 echo "${cppflags} ${objcflags}"
279 if test "${echo_libs}" = yes; then
280 if test "${echo_builtin}"; then
281 for module in `echo "${builtins}"`; do
282 register_targets "${module}"
283 register_flags "${module}"
285 if test "${echo_pic}"; then
286 libs="`echo "${list}" | sed -e 's/[^ ][^ ]*/&_pic.a/g'` ${libs}"
288 libs="`echo "${list}" | sed -e 's/[^ ][^ ]*/&.a/g'` ${libs}"
291 echo "${libs} ${ldflags}"