1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00
hyperrogue/configure.ac

59 lines
2.5 KiB
Plaintext
Raw Normal View History

2015-08-09 13:38:09 +00:00
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
2016-01-02 17:44:54 +00:00
AC_PREREQ([2.68])
2016-08-26 09:58:03 +00:00
AC_INIT([hyperrogue], [8.3j])
2015-08-09 13:38:09 +00:00
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
2016-01-02 17:44:54 +00:00
${CXXFLAGS=""}
2015-08-09 13:38:09 +00:00
AC_CONFIG_SRCDIR([hyperpoint.cpp])
#AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
2015-08-22 11:43:16 +00:00
# Check for which host we are on and setup a few things
# specifically based on the host
AC_CANONICAL_HOST
AM_CONDITIONAL(DARWIN, test ["${host_os#*darwin}" != "$host_os"])
AM_CONDITIONAL(LINUX, test ["${host_os#*linux}" != "$host_os"])
AM_CONDITIONAL(MINGW, test ["${host_os#*mingw}" != "$host_os"])
export wincppflags=""
AS_IF( test ["${host_os#*mingw}" != "$host_os"], [export EXEEXT=".exe"],[])
2015-08-09 13:38:09 +00:00
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lGL':
2015-08-22 11:43:16 +00:00
AC_CHECK_LIB([GL], [main], [], AC_MSG_ERROR([GL library was not found]))
2015-08-09 13:38:09 +00:00
# FIXME: Replace `main' with a function in `-lSDL':
2015-08-22 11:43:16 +00:00
AC_CHECK_LIB([SDL], [main], [], AC_MSG_ERROR([SDL library was not found]))
2015-08-09 13:38:09 +00:00
# FIXME: Replace `main' with a function in `-lSDL_mixer':
2015-08-22 11:43:16 +00:00
AC_CHECK_LIB([SDL_mixer], [main], [], AC_MSG_ERROR([SDL_mixer library was not found]))
# FIXME: Replace `main' with a function in `-lSDL_gfx':
AC_CHECK_LIB([SDL_gfx], [main], [], [AS_IF( test ["${host_os#*mingw}" != "$host_os"], [export wincppflags=$wincppflags" dll/SDL_gfx.dll" && AC_MSG_RESULT([Building for windows, ignoring])] ,AC_MSG_ERROR([SDL_gfx library was not found]))])
2015-08-09 13:38:09 +00:00
# FIXME: Replace `main' with a function in `-lSDL_ttf':
2015-08-22 11:43:16 +00:00
AC_CHECK_LIB([SDL_ttf], [main], [], [AS_IF( test ["${host_os#*mingw}" != "$host_os"], [export wincppflags=$wincppflags" dll/SDL_ttf.dll" && AC_MSG_RESULT([Building for windows, ignoring])] ,AC_MSG_ERROR([SDL_ttf library was not found]))])
2016-08-26 16:36:03 +00:00
# Test for libpng
AC_CHECK_LIB([png], [main], [], AC_MSG_ERROR([png library was not found]))
2015-08-09 13:38:09 +00:00
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h unistd.h])
2015-08-22 11:43:16 +00:00
AC_CHECK_HEADERS([SDL/SDL.h], [], AC_MSG_ERROR([SDL/SDL.h header was not found]))
2015-08-09 13:38:09 +00:00
#AC_CHECK_HEADERS([SDL/SDL_gfx.h], [], [AC_MSG_ERROR([SDL/SDL_gfx.h header was not found])])
2015-08-22 11:43:16 +00:00
AC_CHECK_HEADERS([SDL/SDL_mixer.h], [], AC_MSG_ERROR([SDL/SDL_mixer.h header was not found]))
AC_CHECK_HEADERS([SDL/SDL_ttf.h], [], AS_IF( test ["${host_os#*mingw}" != "$host_os"], [] ,AC_MSG_ERROR([SDL/SDL_ttf.h header was not found])))
2015-08-09 13:38:09 +00:00
# Checks for typedefs, structures, and compiler characteristics.
2016-08-26 09:58:03 +00:00
# AC_CHECK_HEADER_STDBOOL
2015-08-09 13:38:09 +00:00
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([memset sqrt strstr])
2015-08-22 11:43:16 +00:00
AC_SUBST([wincppflags])
2015-08-10 11:27:17 +00:00
2015-08-09 13:38:09 +00:00
AC_CONFIG_FILES([Makefile])
AC_OUTPUT