0001-fixup-pkg-config-handling.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. Change handling of PKG_CONFIG_LIBDIR
  2. When PKG_CONFIG_LIBDIR was unset in the environment, the configure
  3. script was deducing the PKG_CONFIG_LIBDIR from the location of the
  4. pkg-config binary, which doesn't make a lot of sense, and isn't done
  5. by other autotools based packages.
  6. Also, the configure script was checking that the directory really
  7. exists. This forced to create the directory *and* provide an absolute
  8. path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that
  9. at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which
  10. means that we got two times the staging directory location.
  11. This patch fixes both of those issues. Also, since ncurses uses a fork
  12. of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix
  13. the configure script in this patch.
  14. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  15. Index: b/configure
  16. ===================================================================
  17. --- a/configure
  18. +++ b/configure
  19. @@ -3623,27 +3623,20 @@
  20. # Leave this as something that can be overridden in the environment.
  21. if test -z "$PKG_CONFIG_LIBDIR" ; then
  22. - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
  23. + PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
  24. fi
  25. +
  26. PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
  27. - if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
  28. -# Check whether --enable-pc-files or --disable-pc-files was given.
  29. -if test "${enable_pc_files+set}" = set; then
  30. - enableval="$enable_pc_files"
  31. - enable_pc_files=$enableval
  32. -else
  33. - enable_pc_files=no
  34. -fi;
  35. - echo "$as_me:3638: result: $enable_pc_files" >&5
  36. -echo "${ECHO_T}$enable_pc_files" >&6
  37. + # Check whether --enable-pc-files or --disable-pc-files was given.
  38. + if test "${enable_pc_files+set}" = set; then
  39. + enableval="$enable_pc_files"
  40. + enable_pc_files=$enableval
  41. else
  42. - echo "$as_me:3641: result: no" >&5
  43. -echo "${ECHO_T}no" >&6
  44. - { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
  45. -echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
  46. - enable_pc_files=no
  47. - fi
  48. + enable_pc_files=no
  49. + fi;
  50. + echo "$as_me:3638: result: $enable_pc_files" >&5
  51. + echo "${ECHO_T}$enable_pc_files" >&6
  52. fi
  53. echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
  54. Index: b/configure.in
  55. ===================================================================
  56. --- a/configure.in
  57. +++ b/configure.in
  58. @@ -174,20 +174,14 @@
  59. # Leave this as something that can be overridden in the environment.
  60. if test -z "$PKG_CONFIG_LIBDIR" ; then
  61. - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
  62. + PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
  63. fi
  64. PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
  65. - if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
  66. - AC_ARG_ENABLE(pc-files,
  67. + AC_ARG_ENABLE(pc-files,
  68. [ --enable-pc-files generate and install .pc files for pkg-config],
  69. [enable_pc_files=$enableval],
  70. [enable_pc_files=no])
  71. - AC_MSG_RESULT($enable_pc_files)
  72. - else
  73. - AC_MSG_RESULT(no)
  74. - AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
  75. - enable_pc_files=no
  76. - fi
  77. + AC_MSG_RESULT($enable_pc_files)
  78. fi
  79. AC_SUBST(PKG_CONFIG_LIBDIR)