blob: 0e58fd4c4dbe6d61c822726a6b1708806b97f4c5 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From d9048788d906774b1475c3bb1b17e22455c2add4 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Saul Wold <sgw@linux.intel.com>
3Date: Wed, 16 Aug 2017 11:16:30 +0800
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004Subject: [PATCH] use pkgconfig instead of npth config
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6Upstream-Status: Inappropriate [openembedded specific]
7
8Signed-off-by: Saul Wold <sgw@linux.intel.com>
9
10Rebase to 2.1.23
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
William A. Kennington IIIac69b482021-06-02 12:28:27 -070012
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013---
William A. Kennington IIIac69b482021-06-02 12:28:27 -070014 m4/npth.m4 | 53 ++++++++---------------------------------------------
15 1 file changed, 8 insertions(+), 45 deletions(-)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016
17diff --git a/m4/npth.m4 b/m4/npth.m4
Andrew Geissler517393d2023-01-13 08:55:19 -060018index 619ed89..0cb354d 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019--- a/m4/npth.m4
20+++ b/m4/npth.m4
William A. Kennington IIIac69b482021-06-02 12:28:27 -070021@@ -19,25 +19,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022 if test "x$npth_config_prefix" != x ; then
23 NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
24 fi
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025+ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
26
William A. Kennington IIIac69b482021-06-02 12:28:27 -070027- use_gpgrt_config=""
Andrew Geissler517393d2023-01-13 08:55:19 -060028- if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
William A. Kennington IIIac69b482021-06-02 12:28:27 -070029- if $GPGRT_CONFIG npth --exists; then
30- NPTH_CONFIG="$GPGRT_CONFIG npth"
31- AC_MSG_NOTICE([Use gpgrt-config as npth-config])
32- use_gpgrt_config=yes
33- fi
34- fi
35- if test -z "$use_gpgrt_config"; then
36- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
37- fi
38-
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039- if test "$NPTH_CONFIG" != "no" ; then
William A. Kennington IIIac69b482021-06-02 12:28:27 -070040- if test -z "$use_gpgrt_config"; then
41- npth_version=`$NPTH_CONFIG --version`
42- else
43- npth_version=`$NPTH_CONFIG --modversion`
44- fi
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045+ if test "$PKGCONFIG" != "no" ; then
46+ npth_version=`$PKGCONFIG --modversion npth`
47 fi
48 npth_version_major=`echo $npth_version | \
49 sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
William A. Kennington IIIac69b482021-06-02 12:28:27 -070050@@ -62,7 +47,7 @@ AC_DEFUN([AM_PATH_NPTH],
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051
52 AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
53 ok=no
54- if test "$NPTH_CONFIG" != "no" ; then
55+ if test "$PKGCONFIG" != "no" ; then
56 req_major=`echo $min_npth_version | \
57 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
58 req_minor=`echo $min_npth_version | \
William A. Kennington IIIac69b482021-06-02 12:28:27 -070059@@ -83,32 +68,9 @@ AC_DEFUN([AM_PATH_NPTH],
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060 fi
61 if test $ok = yes; then
62 AC_MSG_RESULT([yes ($npth_version)])
63- else
64- AC_MSG_RESULT(no)
65- fi
66- if test $ok = yes; then
William A. Kennington IIIac69b482021-06-02 12:28:27 -070067- # If we have a recent NPTH, we should also check that the
68- # API is compatible.
69- if test "$req_npth_api" -gt 0 ; then
70- if test -z "$use_gpgrt_config"; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -050071- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
William A. Kennington IIIac69b482021-06-02 12:28:27 -070072- else
73- tmp=`$NPTH_CONFIG --variable=api_version 2>/dev/null || echo 0`
74- fi
75- if test "$tmp" -gt 0 ; then
76- AC_MSG_CHECKING([NPTH API version])
77- if test "$req_npth_api" -eq "$tmp" ; then
78- AC_MSG_RESULT([okay])
79- else
80- ok=no
81- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
Brad Bishopd7bf8c12018-02-25 22:55:05 -050082- fi
William A. Kennington IIIac69b482021-06-02 12:28:27 -070083- fi
84- fi
Brad Bishopd7bf8c12018-02-25 22:55:05 -050085- fi
86- if test $ok = yes; then
87- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
88- NPTH_LIBS=`$NPTH_CONFIG --libs`
89+ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
90+ NPTH_LIBS=`$PKGCONFIG --libs npth`
91+ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
92 ifelse([$2], , :, [$2])
William A. Kennington IIIac69b482021-06-02 12:28:27 -070093 if test -z "$use_gpgrt_config"; then
94 npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
95@@ -128,6 +90,7 @@ AC_DEFUN([AM_PATH_NPTH],
Brad Bishopd7bf8c12018-02-25 22:55:05 -050096 fi
97 fi
98 else
99+ AC_MSG_RESULT(no)
100 NPTH_CFLAGS=""
101 NPTH_LIBS=""
102 ifelse([$3], , :, [$3])