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