From: Eugeniy Meshcheryakov <eugen@debian.org>
Subject: Build checker using SWI prolog
Forwarded: not-needed
--- a/checker/Makefile
+++ b/checker/Makefile
@@ -17,6 +17,12 @@
 
 .NOTPARALLEL:
 
+SWI_GOAL = \
+  expects_dialect('sicstus'),            \
+  redefine_system_predicate(apply(_,_)), \
+  style_check(-singleton),               \
+  compile('checker.pro')
+ 
 ################################################################################
 # PURPOSE
 #-------------------------------------------------------------------------------
@@ -60,8 +66,7 @@
 # and includes respectively.
 
 ${OUTPUT_NAME}${EXE_EXTN}: *.pro
-	sicstus ${SICSTUS_SWITCHES} --goal "compile('checker.pro'), buildsav."
-	spld ${SPLD_CONF} -o $@ --static --resources=${OUTPUT_NAME}${SAV_EXTN}=/${OUTPUT_NAME}${SAV_EXTN},${SICSTUS_LIBS}
+	swipl -O -g "${SWI_GOAL}, swisav_checker."
 
 # Manifest only required on Windows.
 ifeq ($(findstring ${TARGET},Windows),${TARGET})
--- a/common/Makefile.inc
+++ b/common/Makefile.inc
@@ -106,10 +106,12 @@
 PREP_OPTS:=-c
 
 # Common compiler options.
-SICSTUS_LIBS:=codesio
-SICSTUS_SWITCHES:=-f --nologo --noinfo
-SAV_EXTN:=.sav
-
+SWI_GOAL = \
+  expects_dialect('sicstus'),            \
+  redefine_system_predicate(apply(_,_)), \
+  style_check(-singleton),               \
+  compile('checker.pro')
+ 
 ################################################################################
 # PLATFORM SPECIFIC CONFIGURATION
 ################################################################################
