[Asterisk-code-review] asttest: allow to compile on fedora31 (testsuite[16])

Friendly Automation asteriskteam at digium.com
Tue Apr 28 08:58:34 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/14318 )

Change subject: asttest: allow to compile on fedora31
......................................................................

asttest: allow to compile on fedora31

On fedora pkg-config uses lua-5.1 instead of lua5.1 so asttest failed to compile.

Change-Id: I69e7f4607d9e838bb9013ab42580556329fb3f6c
---
M asttest/Makefile
M asttest/tools/lfs.diff
M asttest/tools/luaposix.diff
M asttest/tools/luasocket.diff
4 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/asttest/Makefile b/asttest/Makefile
index 9312d62..2bfebdc 100644
--- a/asttest/Makefile
+++ b/asttest/Makefile
@@ -46,11 +46,11 @@
 
 # Basic set of sources and flags/libraries/includes
 OBJS:=asttest.o lib/lua.o lib/testsuite.o lib/testutils.o
-CFLAGS:=-g -D_GNU_SOURCE -Wall `pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null` -Iinclude
+CFLAGS:=-g -D_GNU_SOURCE -Wall `pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua-5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null` -Iinclude
 L_MODULES:=$(LUAFILESYSTEM_OBJS) $(LUASOCKET_OBJS) $(LUAPOSIX_OBJS) 
 L_LIBS:=$(LUAPOSIX_LIBS)
 L_OBJS:=lib/lua/testlib.o lib/lua/astlib.o lib/lua/proclib.o
-T_LIBS:=`pkg-config --libs lua5.1 2> /dev/null || pkg-config --libs lua 2> /dev/null || echo -llua -lm -ldl`
+T_LIBS:=`pkg-config --libs lua5.1 2> /dev/null || pkg-config --libs lua-5.1 2> /dev/null || pkg-config --libs lua 2> /dev/null || echo -llua -lm -ldl`
 
 
 all: asttest
diff --git a/asttest/tools/lfs.diff b/asttest/tools/lfs.diff
index aad68dd..32457aa 100644
--- a/asttest/tools/lfs.diff
+++ b/asttest/tools/lfs.diff
@@ -6,7 +6,7 @@
  WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
  INCS= -I$(LUA_INC)
 -CFLAGS= $(WARN) $(INCS)
-+LUA_CFLAGS=`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
++LUA_CFLAGS=`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua-5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
 +CFLAGS= $(WARN) $(LUA_CFLAGS)
  CC= gcc
  
diff --git a/asttest/tools/luaposix.diff b/asttest/tools/luaposix.diff
index 2ff44e3..b6719dd 100644
--- a/asttest/tools/luaposix.diff
+++ b/asttest/tools/luaposix.diff
@@ -82,7 +82,7 @@
  CPPFLAGS=	-fPIC $(INCS) $(WARN)
  WARN=		-pedantic -Wall
 -INCS=		-I$(LUAINC)
-+INCS=		`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
++INCS=		`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua-5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
  
  MYNAME=		posix
  MYLIB= 		$(MYNAME)
diff --git a/asttest/tools/luasocket.diff b/asttest/tools/luasocket.diff
index 401236e..dba5891 100644
--- a/asttest/tools/luasocket.diff
+++ b/asttest/tools/luasocket.diff
@@ -13,7 +13,7 @@
 -#LUAINC=-I/usr/local/include/lua50
 -#LUAINC=-I/usr/local/include/lua5.1
 -#LUAINC=-Ilua-5.1.1/src
-+LUAINC=`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
++LUAINC=`pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua-5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null`
  
  #------
  # Compat-5.1 directory

-- 
To view, visit https://gerrit.asterisk.org/c/testsuite/+/14318
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-Change-Id: I69e7f4607d9e838bb9013ab42580556329fb3f6c
Gerrit-Change-Number: 14318
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200428/33991ffe/attachment-0001.html>


More information about the asterisk-code-review mailing list