4 exec_prefix="@exec_prefix@"
6 datarootdir="@datarootdir@"
15 builtins="@BUILTINS@ "
24 cflags_tuning="@CFLAGS_TUNING@"
25 cflags_optim_size="@CFLAGS_OPTIM_SIZE@"
26 cflags_optim_speed="@CFLAGS_OPTIM_SPEED@"
27 cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@"
28 cflags_nooptim="@CFLAGS_NOOPTIM@"
31 # Do not touch below this place unless you really know what you are doing
36 Usage: vlc-config OPTIONS MODULES
38 [--prefix[=DIR]] set prefix
39 [--exec-prefix[=DIR]] set exec prefix
40 [--version] print version and exit
41 [--linkage] print linkage mode (c, c++, objc)
42 [--list] print modules names and exit
43 [--libs] output linking flags
44 [--cflags] output C compilation flags
45 [--cxxflags] output C++ compilation flags
46 [--objcflags] output Objective C compilation flags
48 vlc the main VLC object
49 plugin flags for plugin modules
50 builtin flags for built-in modules
51 pic flags for PIC code
52 MODULE any available module (dummy, gtk, avi, etc.)
66 if test $# -eq 0; then
71 # No need to include the default @*FLAGS@ values here because they are
72 # automatically added when using $(COMPILE), $(CXXCOMPILE) or $(OBJCCOMPILE)
74 if test "@includedir@" != "/usr/include"; then
75 includes="-I@includedir@"
77 if test "${top_builddir}" != ""; then
78 top_builddir="${top_builddir}/"
79 elif test "${TOP_BUILDDIR}" != ""; then
80 top_builddir="${TOP_BUILDDIR}/"
82 includes="${includes}"
83 cppflags="${includes}"
88 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
90 cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE"
93 # Various additional defines
95 if [ "${debug}" = yes ]; then
96 cppflags="${cppflags} -DDEBUG"
98 cxxflags="${cxxflags} -g"
99 objcflags="${objcflags} -g"
100 ldflags="${ldflags} -g"
102 if [ "${cprof}" = yes ]; then
103 cppflags="${cppflags} -DCPROF"
104 cflags="${cflags} -finstrument-functions"
105 cxxflags="${cxxflags} -finstrument-functions"
106 objcflags="${objcflags} -finstrument-functions"
108 if [ "${gprof}" = yes ]; then
109 cppflags="${cppflags} -DGPROF"
110 cflags="${cflags} -pg"
111 cxxflags="${cxxflags} -pg"
112 objcflags="${objcflags} -pg"
113 ldflags="${ldflags} -pg"
115 if [ "${release}" = yes ]; then
116 cppflags="${cppflags} -DHAVE_RELEASE"
118 if [ "${optim}" = size ]; then
119 cflags="${cflags} ${cflags_optim_size} ${cflags_tuning}"
120 cxxflags="${cxxflags} ${cflags_optim_size} ${cflags_tuning}"
121 objcflags="${objcflags} ${cflags_optim_size} ${cflags_tuning}"
122 if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
123 cflags="${cflags} ${cflags_optim_nodebug}"
124 cxxflags="${cxxflags} ${cflags_optim_nodebug}"
125 objcflags="${objcflags} ${cflags_optim_nodebug}"
127 elif [ "${optim}" = speed ]; then
128 cflags="${cflags} ${cflags_optim_speed} ${cflags_tuning}"
129 cxxflags="${cxxflags} ${cflags_optim_speed} ${cflags_tuning}"
130 objcflags="${objcflags} ${cflags_optim_speed} ${cflags_tuning}"
131 if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
132 cflags="${cflags} ${cflags_optim_nodebug}"
133 cxxflags="${cxxflags} ${cflags_optim_nodebug}"
134 objcflags="${objcflags} ${cflags_optim_nodebug}"
137 cflags="${cflags} ${cflags_nooptim}"
138 cxxflags="${cxxflags} ${cflags_nooptim}"
139 objcflags="${objcflags} ${cflags_nooptim}"
143 # The main argument loop
145 while test $# -gt 0; do
147 -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9\-]*=//'` ;;
151 # Mangle plugin name, if applicable
152 # This is just a convenience hack for modules/common.am
158 tgt="${tgt%_plugin_la-*.lo}"
162 tgt="${tgt%_plugin.la}"
171 if test "${exec_prefix_set}" = no ; then
172 exec_prefix="${optarg}"
179 exec_prefix="${optarg}"
217 cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc"
221 cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__"
225 cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__"
236 # Register per-module *FLAGS
237 register_flags "$tgt"
243 # If a module was requested, use its name
245 if test -n "${module}"; then
246 cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
250 # Output what we were asked
252 if test "${echo_linkage}" = yes; then
257 if test "${echo_list}" = yes; then
258 if test "${echo_plugin}" = yes; then
262 if test "${echo_builtin}" = yes; then
269 if test "${echo_prefix}" = yes; then
272 if test "${echo_exec_prefix}" = yes; then
273 echo "${exec_prefix}"
275 if test "${echo_cppflags}" = yes; then
278 if test "${echo_cflags}" = yes; then
279 echo "${cppflags} ${cflags}"
281 if test "${echo_cxxflags}" = yes; then
282 echo "${cppflags} ${cxxflags}"
284 if test "${echo_objcflags}" = yes; then
285 echo "${cppflags} ${objcflags}"
287 if test "${echo_ldflags}" = yes; then
292 # There are 4 possibilities
293 # - We are a plugin or a builtin
294 # - We are building something from the inside (builtin)
295 # - Link with builtins in place
296 # If you want something shared from the inside (binding),
297 # you need "builtin vlc"
298 if test "${echo_libs}" = yes; then