diff --git a/src/sbbs3/GNUmakefile b/src/sbbs3/GNUmakefile
index 7316ea5e5a1ee0f62cffd40ca292e6bad4111da1..0228efd06b67900dc0caadab493e51c5cf8887b3 100644
--- a/src/sbbs3/GNUmakefile
+++ b/src/sbbs3/GNUmakefile
@@ -48,8 +48,6 @@ UTIL_LDFLAGS	:=	$(LDFLAGS)
 UTIL_LDFLAGS	+=	$(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV_LDFLAGS) $(ENCODE_LDFLAGS)
 CONSOLE_LDFLAGS	+=	$(LDFLAGS) $(SMBLIB_LDFLAGS) $(XPDEV_LDFLAGS)
 UTIL_LIBS	+=	$(HASH_LIBS)
-FILE_LIBS	= $(shell pkg-config libarchive -libs)
-CFLAGS	+= $(shell pkg-config libarchive -cflags)
 
 ifndef bcc
  ifneq ($(os),sunos)
@@ -104,6 +102,12 @@ ifndef WITHOUT_MOSQUITTO
   endif
  endif
 endif
+ifeq ($(shell pkg-config libarchive --exists && echo "yes"),yes)
+ CFLAGS += $(shell pkg-config libarchive --cflags)
+ FILE_LIBS	= $(shell pkg-config libarchive -libs)
+else
+ FILE_LIBS	= -larchive
+endif
 
 include sbbsdefs.mk
 MT_CFLAGS	+=	$(SBBSDEFS)