vlc-config.in.in
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:7k
源码类别:

midi

开发平台:

Unix_Linux

  1. #!/bin/sh
  2. prefix="@prefix@"
  3. exec_prefix="@exec_prefix@"
  4. exec_prefix_set=no
  5. datarootdir="@datarootdir@"
  6. release="@release@"
  7. debug="@debug@"
  8. gprof="@gprof@"
  9. cprof="@cprof@"
  10. optim="@optim@"
  11. plugins="@PLUGINS@ "
  12. builtins="@BUILTINS@ "
  13. cppflags=""
  14. cflags=""
  15. cxxflags=""
  16. objcflags=""
  17. ldflags=""
  18. libs=""
  19. cflags_tuning="@CFLAGS_TUNING@"
  20. cflags_optim_size="@CFLAGS_OPTIM_SIZE@"
  21. cflags_optim_speed="@CFLAGS_OPTIM_SPEED@"
  22. cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@"
  23. cflags_nooptim="@CFLAGS_NOOPTIM@"
  24. #
  25. #  Do not touch below this place unless you really know what you are doing
  26. #
  27. usage()
  28. {
  29.         cat << BLAH
  30. Usage: vlc-config OPTIONS MODULES
  31. Options:
  32.         [--prefix[=DIR]]          set prefix
  33.         [--exec-prefix[=DIR]]     set exec prefix
  34.         [--version]               print version and exit
  35.         [--linkage]               print linkage mode (c, c++, objc)
  36.         [--list]                  print modules names and exit
  37.         [--libs]                  output linking flags
  38.         [--cflags]                output C compilation flags
  39.         [--cxxflags]              output C++ compilation flags
  40.         [--objcflags]             output Objective C compilation flags
  41. Modules:
  42.         vlc                       the main VLC object
  43.         plugin                    flags for plugin modules
  44.         builtin                   flags for built-in modules
  45.         pic                       flags for PIC code
  46.         MODULE                    any available module (dummy, gtk, avi, etc.)
  47. BLAH
  48.         exit $1
  49. }
  50. register_flags()
  51. {
  52.   case "$1" in
  53.     #@1@#
  54.     *)
  55.       ;;
  56.   esac
  57. }
  58. if test $# -eq 0; then
  59.         usage 1 1>&2
  60. fi
  61. #
  62. #  No need to include the default @*FLAGS@ values here because they are
  63. #  automatically added when using $(COMPILE), $(CXXCOMPILE) or $(OBJCCOMPILE)
  64. #
  65. if test "@includedir@" != "/usr/include"; then
  66.   includes="-I@includedir@"
  67. fi
  68. if test "${top_builddir}" != ""; then
  69.   top_builddir="${top_builddir}/"
  70. elif test "${TOP_BUILDDIR}" != ""; then
  71.   top_builddir="${TOP_BUILDDIR}/"
  72. fi
  73. includes="${includes}"
  74. cppflags="${includes}"
  75. module=""
  76. linkage="c"
  77. #
  78. #  On Linux and Solaris, activate 64-bit off_t (by default under BSD)
  79. #
  80. cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE"
  81. #
  82. #  Various additional defines
  83. #
  84. if [ "${debug}" = yes ]; then
  85.   cppflags="${cppflags} -DDEBUG"
  86.   cflags="${cflags} -g"
  87.   cxxflags="${cxxflags} -g"
  88.   objcflags="${objcflags} -g"
  89.   ldflags="${ldflags} -g"
  90. fi
  91. if [ "${cprof}" = yes ]; then
  92.   cppflags="${cppflags} -DCPROF"
  93.   cflags="${cflags} -finstrument-functions"
  94.   cxxflags="${cxxflags} -finstrument-functions"
  95.   objcflags="${objcflags} -finstrument-functions"
  96. fi
  97. if [ "${gprof}" = yes ]; then
  98.   cppflags="${cppflags} -DGPROF"
  99.   cflags="${cflags} -pg"
  100.   cxxflags="${cxxflags} -pg"
  101.   objcflags="${objcflags} -pg"
  102.   ldflags="${ldflags} -pg"
  103. fi
  104. if [ "${release}" = yes ]; then
  105.   cppflags="${cppflags} -DHAVE_RELEASE"
  106. fi
  107. if [ "${optim}" = size ]; then
  108.   cflags="${cflags} ${cflags_optim_size} ${cflags_tuning}"
  109.   cxxflags="${cxxflags} ${cflags_optim_size} ${cflags_tuning}"
  110.   objcflags="${objcflags} ${cflags_optim_size} ${cflags_tuning}"
  111.   if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
  112.     cflags="${cflags} ${cflags_optim_nodebug}"
  113.     cxxflags="${cxxflags} ${cflags_optim_nodebug}"
  114.     objcflags="${objcflags} ${cflags_optim_nodebug}"
  115.   fi
  116. elif [ "${optim}" = speed ]; then
  117.   cflags="${cflags} ${cflags_optim_speed} ${cflags_tuning}"
  118.   cxxflags="${cxxflags} ${cflags_optim_speed} ${cflags_tuning}"
  119.   objcflags="${objcflags} ${cflags_optim_speed} ${cflags_tuning}"
  120.   if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
  121.     cflags="${cflags} ${cflags_optim_nodebug}"
  122.     cxxflags="${cxxflags} ${cflags_optim_nodebug}"
  123.     objcflags="${objcflags} ${cflags_optim_nodebug}"
  124.   fi
  125. else
  126.   cflags="${cflags} ${cflags_nooptim}"
  127.   cxxflags="${cxxflags} ${cflags_nooptim}"
  128.   objcflags="${objcflags} ${cflags_nooptim}"
  129. fi
  130. #
  131. #  The main argument loop
  132. #
  133. while test $# -gt 0; do
  134.   case "$1" in
  135.   -*=*) optarg=`echo "$1" | sed 's/-[_a-zA-Z0-9-]*=//'` ;;
  136.   *) optarg= ;;
  137.   esac
  138.   # Mangle plugin name, if applicable
  139.   # This is just a convenience hack for modules/common.am
  140.   tgt="$1"
  141.   tgt="${tgt##*/}"
  142.   case "$tgt" in
  143.     lib*_plugin_la-*.lo)
  144.       tgt="${tgt#*lib}"
  145.       tgt="${tgt%_plugin_la-*.lo}"
  146.       ;;
  147.     lib*_plugin.la)
  148.       tgt="${tgt#lib}"
  149.       tgt="${tgt%_plugin.la}"
  150.       ;;
  151.     *)
  152.       ;;
  153.   esac
  154.   case "$tgt" in
  155.     --prefix=*)
  156.       prefix="${optarg}"
  157.       if test "${exec_prefix_set}" = no ; then
  158.         exec_prefix="${optarg}"
  159.       fi
  160.       ;;
  161.     --prefix)
  162.       echo_prefix=yes
  163.       ;;
  164.     --exec-prefix=*)
  165.       exec_prefix="${optarg}"
  166.       exec_prefix_set=yes
  167.       ;;
  168.     --exec-prefix)
  169.       echo_exec_prefix=yes
  170.       ;;
  171.     --version)
  172.       echo "@VERSION@"
  173.       exit 0
  174.       ;;
  175.     --linkage)
  176.       echo_linkage=yes
  177.       ;;
  178.     --list)
  179.       echo_list=yes
  180.       ;;
  181.     --cflags)
  182.       echo_cflags=yes
  183.       ;;
  184.     --cppflags)
  185.       echo_cppflags=yes
  186.       ;;
  187.     --cxxflags)
  188.       echo_cxxflags=yes
  189.       ;;
  190.     --objcflags)
  191.       echo_objcflags=yes
  192.       ;;
  193.     --ldflags)
  194.       echo_ldflags=yes
  195.       ;;
  196.     --libs|-libs)
  197.       echo_libs=yes
  198.       ;;
  199.     -*)
  200.       usage 1 1>&1
  201.       ;;
  202.     libvlccore)
  203.       cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc"
  204.       ;;
  205.     plugin)
  206.       echo_plugin=yes
  207.       cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__"
  208.       ;;
  209.     builtin)
  210.       echo_builtin=yes
  211.       cppflags="${cppflags} -D__LIBVLC__ -D__BUILTIN__"
  212.       ;;
  213.     pic)
  214.       ;;
  215.     mozilla)
  216.       ;;
  217.     *)
  218.       module="$tgt"
  219.       ;;
  220.   esac
  221.   # Register per-module *FLAGS
  222.   register_flags "$tgt"
  223.   shift
  224. done
  225. #
  226. #  If a module was requested, use its name
  227. #
  228. if test -n "${module}"; then
  229.   cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING="${module}""
  230. fi
  231. #
  232. #  Output what we were asked
  233. #
  234. if test "${echo_linkage}" = yes; then
  235.   echo "${linkage}"
  236.   exit 0
  237. fi
  238. if test "${echo_list}" = yes; then
  239.   if test "${echo_plugin}" = yes; then
  240.     echo "${plugins}"
  241.     printf 'n'
  242.   fi
  243.   if test "${echo_builtin}" = yes; then
  244.     echo "${builtins}"
  245.     printf 'n'
  246.   fi
  247.   exit 0
  248. fi
  249. if test "${echo_prefix}" = yes; then
  250.   echo "${prefix}"
  251. fi
  252. if test "${echo_exec_prefix}" = yes; then
  253.   echo "${exec_prefix}"
  254. fi
  255. if test "${echo_cppflags}" = yes; then
  256.   echo "${cppflags}"
  257. fi
  258. if test "${echo_cflags}" = yes; then
  259.   echo "${cppflags} ${cflags}"
  260. fi
  261. if test "${echo_cxxflags}" = yes; then
  262.   echo "${cppflags} ${cxxflags}"
  263. fi
  264. if test "${echo_objcflags}" = yes; then
  265.   echo "${cppflags} ${objcflags}"
  266. fi
  267. if test "${echo_ldflags}" = yes; then
  268.   echo "${ldflags}"
  269. fi
  270. # Libs
  271. # There are 4 possibilities
  272. #  - We are a plugin or a builtin
  273. #  - We are building something from the inside (builtin)
  274. #       - Link with builtins in place
  275. #  If you want something shared from the inside (binding),
  276. #  you need "builtin vlc"
  277. if test "${echo_libs}" = yes; then
  278.   echo "${libs}"
  279. fi