]> Dogcows Code - chaz/yoink/blobdiff - configure.ac
arch linux prefers pkgconfig for finding lua
[chaz/yoink] / configure.ac
index 813b6b51fb80a0df31ca10f8785fedfccddde44b..fa996164497112097c86a85f632056a99f660e60 100644 (file)
@@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE
 
 #
 # Checks for programs.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_PROG_CXX
 AC_PROG_CC
@@ -34,7 +34,7 @@ AC_SUBST(DOXYGEN)
 
 #
 # Configure platform-specific stuff.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 case "${host}" in
        *mingw32*)
@@ -62,7 +62,7 @@ AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
 
 #
 # Checks for configuration arguments.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_ARG_ENABLE([debug],
                          [  --enable-debug          include debugging symbols and features],
@@ -165,7 +165,7 @@ AC_DEFINE_UNQUOTED([YOINK_DATADIR], ["$DATADIR"],
 
 #
 # Split the version number into components.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 VERSION_MAJOR=$(echo $VERSION | cut -d. -f1)
 VERSION_MINOR=$(echo $VERSION | cut -d. -f2)
@@ -191,7 +191,7 @@ fi
 
 #
 # Checks for system functions/headers and compiler characteristics.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_C_STRINGIZE
 AC_C_INLINE
@@ -218,7 +218,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt],
 
 #
 # Checks for build dependencies.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 ##### boost #####
 website="http://www.boost.org/"
@@ -264,12 +264,12 @@ AC_SEARCH_LIBS([alEnable], [openal OpenAL32],,
 
 ##### liblua #####
 website="http://www.lua.org/"
-AC_CHECK_HEADERS([lua.h],,
-                                [missing=yes
-                                 echo "***** Missing lua headers ($website) *****"])
-AC_SEARCH_LIBS([lua_load], [lua],,
-                          [missing=yes
-                               echo "***** Missing liblua ($website) *****"])
+PKG_CHECK_MODULES([LUA], [lua],
+                                 [LIBS="$LIBS $LUA_LIBS"
+                                  CFLAGS="$CFLAGS $LUA_CFLAGS"
+                                  CXXFLAGS="$CXXFLAGS $LUA_CFLAGS"],
+                                 [missing=yes
+                                  echo "***** Missing liblua ($website) *****"])
 
 ##### libpng #####
 website="http://www.libpng.org/pub/png/libpng.html"
@@ -322,7 +322,7 @@ fi
 
 #
 # Find the game resources to install.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 DATA_FILES=$(echo $(cd data && find . -name "*.lua" \
                                                                   -o -name "*.ogg" \
@@ -333,7 +333,7 @@ AC_SUBST([DATA_FILES])
 
 #
 # Create the build files.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_CONFIG_FILES([Makefile
                                 data/Makefile
@@ -354,7 +354,7 @@ AC_OUTPUT
 
 #
 # Print a friendly little message.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 echo ""
 echo " Configuration complete! :-)"
This page took 0.020328 seconds and 4 git commands to generate.