X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vlc-config.in.in;h=0bf2d7bbe1ee80e1b37d82e2961472143fd203bb;hb=ed0b72e3714ad87cb4e10b9a7239e19b9ef0724e;hp=0c90def5a84140f37baeeed36b486292e6da275e;hpb=4275a65a0edf2062e0261296552995c4d4f80935;p=vlc diff --git a/vlc-config.in.in b/vlc-config.in.in index 0c90def5a8..0bf2d7bbe1 100644 --- a/vlc-config.in.in +++ b/vlc-config.in.in @@ -10,8 +10,8 @@ gprof="@gprof@" cprof="@cprof@" optim="@optim@" -plugins="@PLUGINS@" -builtins="@BUILTINS@" +plugins="@PLUGINS@ " +builtins="@BUILTINS@ " cppflags="" cflags="" @@ -37,6 +37,7 @@ Options: [--version] print version and exit [--linkage] print linkage mode (c, c++, objc) [--target] print targets and exit + [--list] print modules names and exit [--libs] output linking flags [--cflags] output C compilation flags [--cxxflags] output C++ compilation flags @@ -82,10 +83,11 @@ if test "@includedir@" != "/usr/include"; then fi if test "${top_builddir}" != ""; then top_builddir="${top_builddir}/" +elif test "${TOP_BUILDDIR}" != ""; then + top_builddir="${TOP_BUILDDIR}/" fi -includes="${includes} -I${top_builddir}include" +includes="${includes}" cppflags="${includes}" -libs="-L@libdir@" module="" linkage="c" @@ -98,8 +100,8 @@ cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURC # Gettext, data and plugin location # cppflags="${cppflags} -DLOCALEDIR=\"@datadir@/locale\"" -cppflags="${cppflags} -DDATA_PATH=\"${prefix}/share/vlc\"" -cppflags="${cppflags} -DPLUGIN_PATH=\"${prefix}/lib/vlc\"" +cppflags="${cppflags} -DDATA_PATH=\"@datadir@/vlc\"" +cppflags="${cppflags} -DPLUGIN_PATH=\"@libdir@/vlc\"" # # Various additional defines @@ -141,7 +143,7 @@ fi # while test $# -gt 0; do case "$1" in - -*=*) optarg=`echo "$1" | sed 's/-_a-zA-Z0-9*=//'` ;; + -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9\-]*=//'` ;; *) optarg= ;; esac @@ -172,6 +174,9 @@ while test $# -gt 0; do --target) echo_target=yes ;; + --list) + echo_list=yes + ;; --cflags) echo_cflags=yes ;; @@ -205,7 +210,12 @@ while test $# -gt 0; do ;; external) echo_external=yes - ldflags="${ldflags} -lvlc" + if test "x${echo_pic}" = "xno" + then + ldflags="${ldflags} -lvlc" + else + ldflags="${ldflags} -lvlc_pic" + fi ;; *) module="$1" @@ -221,6 +231,8 @@ while test $# -gt 0; do shift done +libs="-L@libdir@" + # # If a module was requested, use its name # @@ -268,6 +280,18 @@ if test "${echo_target}" = yes; then exit 0 fi +if test "${echo_list}" = yes; then + if test "${echo_plugin}" = yes; then + echo "${plugins}" + printf '\n' + fi + if test "${echo_builtin}" = yes; then + echo "${builtins}" + printf '\n' + fi + exit 0 +fi + if test "${echo_prefix}" = yes; then echo "${prefix}" fi @@ -286,6 +310,17 @@ fi if test "${echo_objcflags}" = yes; then echo "${cppflags} ${objcflags}" fi + +# Libs +# There are 4 possibilities +# - We are a plugin or a builtin +# - We are building from the outside (external): +# - Give full libvlc linkflags + -lvlc(_pic) (in libdir) +# - Link with builtins in libdir +# - We are building something from the inside (builtin) +# - Link with builtins in place +# If you want something shared from the inside (binding), +# you need "builtin vlc pic" if test "${echo_libs}" = yes; then if test "${echo_builtin}" = yes; then for module in `echo "${builtins}"`; do