Fixed x86 GRUB config label
[librecmc/librecmc.git] / package / libs / ncurses / patches / 103-fixup-pkg-config-handling.patch
1 Change handling of PKG_CONFIG_LIBDIR
2
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.
7
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.
13
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.
17
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19
20 --- a/configure
21 +++ b/configure
22 @@ -3623,27 +3623,20 @@ echo $ECHO_N "checking if we should inst
23  
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"
28         fi
29 +
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
32  
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
37 -else
38 -  enable_pc_files=no
39 -fi;
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
46         else
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;}
51 -               enable_pc_files=no
52 -       fi
53 +           enable_pc_files=no
54 +       fi;
55 +       echo "$as_me:3638: result: $enable_pc_files" >&5
56 +       echo "${ECHO_T}$enable_pc_files" >&6
57  fi
58  
59  echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
60 --- a/configure.in
61 +++ b/configure.in
62 @@ -174,20 +174,14 @@ if test "$PKG_CONFIG" != no ; then
63  
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"
68         fi
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],
75                         [enable_pc_files=no])
76 -               AC_MSG_RESULT($enable_pc_files)
77 -       else
78 -               AC_MSG_RESULT(no)
79 -               AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
80 -               enable_pc_files=no
81 -       fi
82 +       AC_MSG_RESULT($enable_pc_files)
83  fi
84  AC_SUBST(PKG_CONFIG_LIBDIR)
85