[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-commits] master 5f44251 2/2: UPDATED configure script to use
From: |
Kai Sterker |
Subject: |
[adonthell-commits] master 5f44251 2/2: UPDATED configure script to use pkg-config to locate Freetype2 and Ogg Vorbis |
Date: |
Mon, 16 Apr 2018 15:28:56 -0400 (EDT) |
branch: master
commit 5f4425141dfce5c0f68351d8f4bdd846e23dc4e3
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>
UPDATED configure script to use pkg-config to locate Freetype2 and Ogg
Vorbis
---
configure.ac | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/configure.ac b/configure.ac
index a4dadae..ff516e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,13 +53,7 @@ AC_ARG_ENABLE([py-debug],
[AS_HELP_STRING([--disable-py-debug], [disable debugging of Python scripts
(enabled by default)])],
[pydebug=$enableval], [pydebug=yes])
AC_ARG_ENABLE([pyc],
- [AS_HELP_STRING([--disable-pyc], [Do not compile Python scripts])])
-AC_ARG_WITH([ogg],
- [AS_HELP_STRING([--with-ogg=DIR], [set where the Ogg library is located])],
- [ogg=none])
-AC_ARG_WITH([vorbis],
- [AS_HELP_STRING([--with-vorbis=DIR], [set where the Vorbis library is
located])],
- [vorbis=none])
+ [AS_HELP_STRING([--disable-pyc], [Do not compile Python scripts])], [], [])
AC_ARG_WITH([data-dir],
[AS_HELP_STRING([--with-data-dir=DIR], [directory where data will be
installed])],
[gamedatadir="$withval"], [gamedatadir=none])
@@ -126,35 +120,42 @@ dnl ********************
dnl Check for libraries.
dnl ********************
-AC_CHECK_LIB(pthread, main,
- PTHREADS=yes,
- PTHREADS=no)
+AC_CHECK_LIB([pthread], [main],
+ [PTHREADS=yes],
+ [PTHREADS=no])
-AC_CHECK_LIB(z, main,,echo "Adonthell requires Zlib. Exitting...";exit 1)
+AC_CHECK_LIB([z],
+ [main],
+ [LIBS="$LIBS -lz"],
+ [AC_MSG_ERROR([*** ZLib is required])])
dnl *******************
dnl Check for FreeType2
dnl *******************
-AC_CHECK_FT2(6.0.0,
- [LIBS="$LIBS $FT2_LIBS"],
- AC_MSG_ERROR([*** Freetype version >= 6.0.0 not found!])
-)
+PKG_CHECK_MODULES([FT2],
+ [freetype2 >= 6.0.0],
+ :,
+ [AC_MSG_ERROR([*** Freetype2 is required])])
+
+AC_SUBST(FT2_CFLAGS)
+AC_SUBST(FT2_LIBS)
dnl *******************
dnl Check for OggVorbis
dnl *******************
-OGG_VORBIS=no
-XIPH_PATH_VORBIS(
- OGG_VORBIS="yes"
+PKG_CHECK_MODULES([OGG], [ogg >= 1.0.0, vorbis >= 1.0.0], [
+ OGG_VORBIS="yes"
ogg_music="enabled"
- OGG_LIBS="$VORBISFILE_LIBS $VORBIS_LIBS"
OGG_DEFS="-DOGG_MUSIC"
- OGG_CFLAGS="$VORBIS_CFLAGS",
+ ],[
+ OGG_VORBIS=no
AC_MSG_RESULT(Disabling OggVorbis support)
ogg_music="disabled"
-)
+ ])
+AC_SUBST(OGG_CFLAGS)
+AC_SUBST(OGG_LIBS)
dnl *************
dnl Check for SDL
@@ -542,7 +543,7 @@ echo
echo "SDL ....................... : `sdl2-config --version`"
echo "Python .................... : $PY_VERSION"
echo "Python debugging .......... : $pydebug"
-echo "Freetype .................. : `freetype-config --version`"
+echo "Freetype .................. : `pkg-config --modversion freetype2`"
if test "x$haveswig" = "xyes"; then
echo "SWIG ...................... : $SWIG_VERSION"
fi