libdvdread.patch
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:2k
源码类别:

midi

开发平台:

Unix_Linux

  1. Index: configure.ac
  2. ===================================================================
  3. --- configure.ac (revision 1162)
  4. +++ configure.ac (working copy)
  5. @@ -137,27 +137,59 @@
  6.  dnl ---------------------------------------------
  7.  dnl dynamic linker
  8.  dnl ---------------------------------------------
  9. -case $host in
  10. -  *mingw32*)
  11. -    CFLAGS="-idirafter $(top_srcdir)/msvc/include $CFLAGS"
  12. -    LDFLAGS="-no-undefined $LDFLAGS"
  13. -    ;;
  14. -  *cygwin*)
  15. -    LDFLAGS="-no-undefined $LDFLAGS"
  16. -    ;;
  17. -  *os2*)
  18. -    LDFLAGS="-no-undefined -Zbin-files $LDFLAGS"
  19. -    ;;
  20. -  *)
  21. -    AC_CHECK_LIB(c, dlopen,
  22. -                 DYNAMIC_LD_LIBS="",
  23. -                 AC_CHECK_LIB(dl, dlopen,
  24. -                              DYNAMIC_LD_LIBS="-ldl",
  25. -                              AC_MSG_ERROR(dynamic linker needed)))
  26. -    AC_SUBST(DYNAMIC_LD_LIBS)
  27. -    ;;
  28. -esac
  29. +AC_ARG_WITH( [libdvdcss],
  30. +    [  --with-libdvdcss[=PATH]    force linking against libdvdcss],
  31. +    [if test x"$withval" != xno; then
  32. +       link_dvdcss=yes
  33. +     fi
  34. +     if test x"$withval" != xyes; then
  35. +       dvdcss_path=$withval
  36. +     fi])
  37.  
  38. +if test x"$link_dvdcss" != xyes; then
  39. +dnl dlopen libdvdcss
  40. +  AC_CHECK_FUNC( dlopen,
  41. +    [DL_LIBS="" ],
  42. +    AC_CHECK_LIB( dl, dlopen,
  43. +      [DL_LIBS=-ld ],
  44. +      AC_MSG_ERROR(You need libdl (dlopen))
  45. +    )
  46. +  )
  47. +else
  48. +dnl link with libdvdcss
  49. +  if test -z "$dvdcss_path"; then
  50. +    AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
  51. +      [ CSS_LIBS=-ldvdcss ],
  52. +      AC_MSG_ERROR(You need libdvdcss.so.2 or later)
  53. +    )
  54. +    AC_CHECK_HEADERS(dvdcss/dvdcss.h,
  55. +      [ ],
  56. +      AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
  57. +    )
  58. +  else
  59. +    saved_CFLAGS=$CFLAGS
  60. +    CFLAGS="$CFLAGS -L$dvdcss_path/lib"
  61. +    AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
  62. +      [ CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
  63. +        CSS_CFLAGS=-I$dvdcss_path/include ],
  64. +      AC_MSG_ERROR(You need libdvdcss.so.2 or later)
  65. +    )
  66. +    CFLAGS=$saved_CFLAGS
  67. +    dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
  68. +    saved_CPPFLAGS=$CPPFLAGS
  69. +    CPPFLAGS="-w $CPPFLAGS -I$dvdcss_path/include"
  70. +    AC_CHECK_HEADERS(dvdcss/dvdcss.h,
  71. +      [ ],
  72. +      AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
  73. +    )
  74. +    CPPFLAGS=$saved_CPPFLAGS
  75. +  fi
  76. +fi
  77. +
  78. +AC_SUBST(DL_LIBS)
  79. +AC_SUBST(CSS_LIBS)
  80. +AC_SUBST(CSS_CFLAGS)
  81. +
  82.  dnl ---------------------------------------------
  83.  dnl cflags
  84.  dnl ---------------------------------------------