Skip to content

Commit 2ce8e47

Browse files
committedFeb 23, 2020
Updated default Makefile configuration to rely only on pkg-config, as gdlib-config no longer exists.
1 parent e60b13b commit 2ce8e47

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed
 

‎Makefile

+13-19
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,37 @@ VERSION=2.0.33r3
3131
# Command used to run Lua code
3232
LUABIN=lua5.1
3333

34-
# Path to the utility 'gdlib-config'. This may be changed to compile the
35-
# module with development versions of libgd.
36-
GDLIBCONFIG=gdlib-config
37-
3834
# Optimization for the brave of heart ;)
3935
OMITFP=-fomit-frame-pointer
4036

4137

4238
# ---------------------------------------------------------------------------
43-
# Automatic configuration using pkgconfig, gd-config and sed. These
44-
# lines should work on most Linux/Unix systems. If your system does not
45-
# have these programs you must comment out these lines and uncomment and
46-
# change the next ones.
39+
# Automatic configuration using pkgconfig. These lines should work on most
40+
# Linux/Unix systems. If your system does not have these programs you must
41+
# comment out these lines and uncomment and change the next ones.
4742

4843
# Name of .pc file. "lua5.1" on Debian/Ubuntu
4944
LUAPKG=lua5.1
5045
OUTFILE=gd.so
5146

5247
CFLAGS=-O3 -Wall -fPIC $(OMITFP)
53-
CFLAGS+=`$(GDLIBCONFIG) --cflags` `pkg-config $(LUAPKG) --cflags`
48+
CFLAGS+=`pkg-config $(LUAPKG) --cflags`
5449
CFLAGS+=-DVERSION=\"$(VERSION)\"
5550

56-
GDFEATURES=`$(GDLIBCONFIG) --features |sed -e "s/GD_/-DGD_/g"`
57-
LFLAGS=-shared `$(GDLIBCONFIG) --ldflags` `$(GDLIBCONFIG) --libs` -lgd
58-
59-
INSTALL_PATH := `$(LUABIN) -e' \
60-
for dir in package.cpath:gmatch("(/[^?;]+)?") do \
61-
io.write(dir) \
62-
os.exit(0) \
63-
end \
64-
os.exit(1) \
65-
'`
51+
GDFEATURES=-DGD_XPM -DGD_JPEG -DGD_FONTCONFIG -DGD_FREETYPE -DGD_PNG -DGD_GIF
52+
LFLAGS=-shared `pkg-config $(LUAPKG) --libs` -lgd
6653

54+
INSTALL_PATH := `pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
6755

6856

6957
# ---------------------------------------------------------------------------
7058
# Manual configuration for systems without pkgconfig.
59+
# WARNING: These instructions will only work on older versions of GD, since
60+
# gdlib-config has been removed in favor of pkg-config.
61+
62+
# Path to the utility 'gdlib-config'. This may be changed to compile the
63+
# module with development versions of libgd.
64+
#GDLIBCONFIG=gdlib-config
7165

7266
#OUTFILE=gd.so
7367
#CFLAGS=-O3 -Wall -fPIC $(OMITFP)

0 commit comments

Comments
 (0)
Please sign in to comment.