Add Autoconf/Automake build system

This commit is contained in:
Fabian Greffrath 2016-08-19 21:41:36 +02:00
parent 70a0d74de2
commit e010030d57
3 changed files with 43 additions and 0 deletions

1
Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = Source

4
Source/Makefile.am Normal file
View File

@ -0,0 +1,4 @@
bin_PROGRAMS = winmbf
winmbf_SOURCES = am_map.c d_deh.c d_items.c d_main.c d_net.c doomdef.c doomstat.c dstrings.c f_finale.c f_wipe.c g_game.c hu_lib.c hu_stuff.c i_main.c i_net.c info.c i_sound.c i_stretch.c i_system.c i_video.c m_argv.c m_bbox.c m_cheat.c m_menu.c m_misc.c mmus2mid.c m_random.c p_ceilng.c p_doors.c p_enemy.c p_floor.c p_genlin.c p_inter.c p_lights.c p_map.c p_maputl.c p_mobj.c p_plats.c p_pspr.c p_saveg.c p_setup.c p_sight.c p_spec.c p_switch.c p_telept.c p_tick.c p_user.c r_bsp.c r_data.c r_draw.c r_main.c r_plane.c r_segs.c r_sky.c r_things.c sounds.c s_sound.c st_lib.c st_stuff.c tables.c version.c v_video.c wi_stuff.c w_wad.c z_zone.c
winmbf_CFLAGS = @SDL_CFLAGS@ @SDL_mixer_CFLAGS@ @SDL_net_CFLAGS@
winmbf_LDADD = @SDL_LIBS@ @SDL_mixer_LIBS@ @SDL_net_LIBS@

38
configure.ac Normal file
View File

@ -0,0 +1,38 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([winmbf], [2.03])
AM_INIT_AUTOMAKE([foreign no-define])
AC_CONFIG_SRCDIR([Source/version.c])
#AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
AC_SEARCH_LIBS([pow], [m])
PKG_CHECK_MODULES([SDL], [sdl])
PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer])
PKG_CHECK_MODULES([SDL_net], [SDL_net])
AC_DEFINE([MY_SDL_VER])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stddef.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([atexit memmove memset mkdir pow putenv strcasecmp strchr strdup strerror strncasecmp strrchr strstr strtol])
AC_CONFIG_FILES([Makefile Source/Makefile])
AC_OUTPUT