summarylogtreecommitdiffstats
path: root/fix_libcd64_libieee1284.diff
blob: 5001593eb916a871ee468c380c635f859b9537cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff -Naur ./src.old/Makefile ./src/Makefile
--- ./src.old/Makefile	2019-05-19 12:35:45.185395051 +0200
+++ ./src/Makefile	2019-05-19 12:36:09.705081792 +0200
@@ -95,6 +95,21 @@
 
 ifdef USE_LIBCD64
 LDFLAGS+=backup/libcd64/libcd64.a
+# The following condition was added for the arch ucon64 AUR package:
+# https://aur.archlinux.org/packages/ucon64/
+# The arch/artix 'libieee1284' package ships the library as a shared 
+# library rather than a static one. As a result, libcd64 has no static
+# library to link against, and consequently ucon64 itself, when linking
+# in libcd64, needs to also link against the libieee1284 shared library.
+# See also src/backup/libcd64/Makefile
+ifndef DJGPP
+ifeq ($(shell if test -r /usr/include/ieee1284.h; then echo 1; else echo 0; fi),1)
+LDFLAGS+=-lieee1284
+$(info Building with libieee1284 support)
+else
+$(warning Building without libieee1284 support)
+endif
+endif
 endif
 
 ifdef USE_ZLIB
diff -Naur ./src.old/backup/libcd64/Makefile ./src/backup/libcd64/Makefile
--- ./src.old/backup/libcd64/Makefile	2019-05-19 12:35:45.185395051 +0200
+++ ./src/backup/libcd64/Makefile	2019-05-19 12:36:20.374945478 +0200
@@ -102,6 +102,9 @@
 ifeq ($(findstring Linux,$(OSTYPE)),Linux)
 ifeq ($(shell if test -r /usr/include/ieee1284.h; then echo 1; else echo 0; fi),1)
 LIBIEEE1284=1
+$(info Building with libieee1284 support)
+else
+$(warning Building without libieee1284 support)
 endif
 ifeq ($(shell if test -r /usr/include/linux/ppdev.h; then echo 1; else echo 0; fi),1)
 PPDEV=1
@@ -116,7 +119,15 @@
 
 ifdef LIBIEEE1284
 CFLAGS+=-DCD64_USE_LIBIEEE1284
+# The following condition was added for the arch ucon64 AUR package:
+# https://aur.archlinux.org/packages/ucon64/
+# The arch/artix (i.e linux) 'libieee1284' package ships the library as a 
+# shared library rather than a static one, so including the static file leading 
+# to a linking error. 
+# DJGPP (i.e gcc for DOS) probably still expects a static library.
+ifdef DJGPP
 LIBS+=/usr/lib/libieee1284.a
+endif
 LDFLAGS+=-lieee1284
 endif