X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vlc-config.in.in;h=bfe8c9505335206020996b3caab232c4a40b35a6;hb=a21959aff9fc4595d6d82867447889ee2c862b40;hp=0bf2d7bbe1ee80e1b37d82e2961472143fd203bb;hpb=ca4e3e39900144ec66daf501233c8eb60d562648;p=vlc diff --git a/vlc-config.in.in b/vlc-config.in.in index 0bf2d7bbe1..bfe8c95053 100644 --- a/vlc-config.in.in +++ b/vlc-config.in.in @@ -3,6 +3,7 @@ prefix="@prefix@" exec_prefix="@exec_prefix@" exec_prefix_set=no +datarootdir="@datarootdir@" release="@release@" debug="@debug@" @@ -18,9 +19,11 @@ cflags="" cxxflags="" objcflags="" ldflags="" +libs="" cflags_tuning="@CFLAGS_TUNING@" -cflags_optim="@CFLAGS_OPTIM@" +cflags_optim_size="@CFLAGS_OPTIM_SIZE@" +cflags_optim_speed="@CFLAGS_OPTIM_SPEED@" cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@" cflags_nooptim="@CFLAGS_NOOPTIM@" @@ -94,13 +97,12 @@ linkage="c" # # On Linux and Solaris, activate 64-bit off_t (by default under BSD) # -cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE" +cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE" # # Gettext, data and plugin location # cppflags="${cppflags} -DLOCALEDIR=\"@datadir@/locale\"" -cppflags="${cppflags} -DDATA_PATH=\"@datadir@/vlc\"" cppflags="${cppflags} -DPLUGIN_PATH=\"@libdir@/vlc\"" # @@ -129,13 +131,28 @@ fi if [ "${release}" = yes ]; then cppflags="${cppflags} -DHAVE_RELEASE" fi -if [ "${optim}" = yes ]; then - cppflags="${cppflags} ${cflags_optim} ${cflags_tuning}" +if [ "${optim}" = size ]; then + cflags="${cflags} ${cflags_optim_size} ${cflags_tuning}" + cxxflags="${cxxflags} ${cflags_optim_size} ${cflags_tuning}" + objcflags="${objcflags} ${cflags_optim_size} ${cflags_tuning}" if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then - cppflags="${cppflags} ${cflags_optim_nodebug}" + cflags="${cflags} ${cflags_optim_nodebug}" + cxxflags="${cxxflags} ${cflags_optim_nodebug}" + objcflags="${objcflags} ${cflags_optim_nodebug}" + fi +elif [ "${optim}" = speed ]; then + cflags="${cflags} ${cflags_optim_speed} ${cflags_tuning}" + cxxflags="${cxxflags} ${cflags_optim_speed} ${cflags_tuning}" + objcflags="${objcflags} ${cflags_optim_speed} ${cflags_tuning}" + if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then + cflags="${cflags} ${cflags_optim_nodebug}" + cxxflags="${cxxflags} ${cflags_optim_nodebug}" + objcflags="${objcflags} ${cflags_optim_nodebug}" fi else - cppflags="${cppflags} ${cflags_nooptim}" + cflags="${cflags} ${cflags_nooptim}" + cxxflags="${cxxflags} ${cflags_nooptim}" + objcflags="${objcflags} ${cflags_nooptim}" fi # @@ -180,42 +197,42 @@ while test $# -gt 0; do --cflags) echo_cflags=yes ;; + --cppflags) + echo_cppflags=yes + ;; --cxxflags) echo_cxxflags=yes ;; --objcflags) echo_objcflags=yes ;; - --libs) + --ldflags) + echo_ldflags=yes + ;; + --libs|-libs) echo_libs=yes ;; -*) usage 1 1>&1 ;; - vlc) - cppflags="${cppflags} -D__VLC__ -I${top_builddir}src/misc" + libvlc) + cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc" ;; plugin) echo_plugin=yes - cppflags="${cppflags} -D__VLC__ -D__PLUGIN__" - ;; - pic) - echo_pic=yes + cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__" ;; builtin) echo_builtin=yes - cppflags="${cppflags} -D__VLC__ -D__BUILTIN__" + cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__" + ;; + pic) ;; mozilla) ;; external) echo_external=yes - if test "x${echo_pic}" = "xno" - then - ldflags="${ldflags} -lvlc" - else - ldflags="${ldflags} -lvlc_pic" - fi + libs="${libs} -lvlc -lvlc-control" ;; *) module="$1" @@ -231,8 +248,6 @@ while test $# -gt 0; do shift done -libs="-L@libdir@" - # # If a module was requested, use its name # @@ -270,11 +285,7 @@ if test "${echo_target}" = yes; then for module in `echo "${builtins}"`; do register_targets "${module}" done - if test "${echo_pic}" = yes; then - for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done - else - for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done - fi + for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done printf '\n' fi exit 0 @@ -310,43 +321,36 @@ fi if test "${echo_objcflags}" = yes; then echo "${cppflags} ${objcflags}" fi +if test "${echo_ldflags}" = yes; then + echo "${ldflags}" +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) +# - Give full libvlc linkflags + -lvlc (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" +# you need "builtin vlc" if test "${echo_libs}" = yes; then if test "${echo_builtin}" = yes; then for module in `echo "${builtins}"`; do register_targets "${module}" register_flags "${module}" done - if test "${echo_pic}" = yes; then - for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}_pic.a "; done - else - for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done - fi + for target in `echo "${list}"`; do printf "${top_builddir}modules/${target}.a "; done fi if test "${echo_external}" = yes; then - if test "${echo_pic}" = yes; then - for module in `echo "${builtins}"`; do - ldflags="${ldflags} @libdir@/vlc/lib${module}_pic.a" - done - else - for module in `echo "${builtins}"`; do - ldflags="${ldflags} @libdir@/vlc/lib${module}.a" - done - fi + for module in `echo "${builtins}"`; do + libs="${libs} @libdir@/vlc/lib${module}.a" + done for module in `echo "${builtins}"`; do register_flags "${module}" done register_flags "vlc" fi - echo "${libs} ${ldflags}" + echo "${libs}" fi