@@ -156,10 +156,10 @@ function buildSDL() {
156
156
AC_MSG_ERROR ( [ libsdl2-dev not installed: configure failed.] )
157
157
fi
158
158
159
- AC_CHECK_PROG ( have_freetype2 , freetype-config , [ yes ] , [ no ] )
160
- if test "${have_freetype2}" = "no" ; then
161
- AC_MSG_ERROR ( [ libfreetype6-dev not installed: configure failed.] )
162
- fi
159
+ SAVED_CPPFLAGS="$CPPFLAGS"
160
+ CPPFLAGS="$CPPFLAGS `pkg-config freetype2 --cflags`"
161
+ AC_CHECK_HEADERS ( [ ft2build.h ] , [ ] , [ AC_MSG_ERROR ( [ libfreetype6-dev not installed: configure failed.] ) ] )
162
+ CPPFLAGS="$SAVED_CPPFLAGS"
163
163
164
164
AC_CHECK_PROG ( have_xxd , xxd , [ yes] , [ no] )
165
165
if test "${have_xxd}" = "no" ; then
@@ -178,7 +178,7 @@ function buildSDL() {
178
178
PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -mms-bitfields"
179
179
PACKAGE_LIBS="${PACKAGE_LIBS} -lwsock32 -lws2_32 -static-libgcc -static-libstdc++"
180
180
PACKAGE_LIBS="${PACKAGE_LIBS} -Wl,-Bstatic -Wl,-Map=output.map"
181
- PACKAGE_LIBS="${PACKAGE_LIBS} `sdl2-config --static-libs` `freetype -config --libs`"
181
+ PACKAGE_LIBS="${PACKAGE_LIBS} `sdl2-config --static-libs` `pkg -config freetype2 --libs`"
182
182
AC_DEFINE ( _Win32 , 1 , [ Windows build] )
183
183
;;
184
184
@@ -193,7 +193,7 @@ function buildSDL() {
193
193
dnl backlinking support for modules
194
194
PACKAGE_LIBS="${PACKAGE_LIBS} -ldl"
195
195
PACKAGE_LIBS="${PACKAGE_LIBS} ${FONTCONFIG_LIBS}"
196
- PACKAGE_LIBS="${PACKAGE_LIBS} `sdl2-config --libs` `freetype -config --libs`"
196
+ PACKAGE_LIBS="${PACKAGE_LIBS} `sdl2-config --libs` `pkg -config freetype2 --libs`"
197
197
;;
198
198
199
199
*)
@@ -207,10 +207,10 @@ function buildSDL() {
207
207
dnl backlinking support for modules
208
208
PACKAGE_LIBS="${PACKAGE_LIBS} -ldl -no-pie"
209
209
PACKAGE_LIBS="${PACKAGE_LIBS} ${FONTCONFIG_LIBS}"
210
- PACKAGE_LIBS="-static-libgcc ${PACKAGE_LIBS} `sdl2-config --static-libs` `freetype -config --libs`"
210
+ PACKAGE_LIBS="-static-libgcc ${PACKAGE_LIBS} `sdl2-config --static-libs` `pkg -config freetype2 --libs`"
211
211
esac
212
212
213
- PACKAGE_CFLAGS="${PACKAGE_CFLAGS} `sdl2-config --cflags` `freetype -config --cflags` -fno-exceptions"
213
+ PACKAGE_CFLAGS="${PACKAGE_CFLAGS} `sdl2-config --cflags` `pkg -config freetype2 --cflags` -fno-exceptions"
214
214
CXXFLAGS="${CXXFLAGS} -fno-rtti -std=c++11"
215
215
216
216
dnl preconfigured values for SDL build
0 commit comments